When I bought the BMW, the tires were old, dry rotted, and worn out. It was time to replace them, so I bought a new pair of Michelin Pilot Activ’s off the ‘net. The idea was to ride the motorcycle to the shop and have them install the new tires. Sounds simple enough, right? The back tire went on without giving the installer any trouble. The front tire however caused the man a great deal of pain; the bead wouldn’t seat on the rim! He tried for over an hour, screaming, yelling, and bleeding all over the place before giving up. His solution to the problem was to just sell me a different tire as the one I bought was “too small”. I figured since this guy puts motorcycle tires on motorcycle rims all day he probably knows what he is doing. A few blocks away the bike started feeling really weird. I looked down and the front tire was flat! Grahhgh!!! The bike went back into the shop where he decided to install a tube this time. By the time I got home, the tire was flat again. I thought “What the hell?”. I talked to some people over at the BMW R65 forum and they advised me to seek a second opinion. Off came the front tire and to the second motorcycle tire shop we went. The installer at this shop was a younger guy. He had a bit of trouble putting the tire on as well, but he was able to do so within 10 minutes. “It’s just a new tire” he said. Great! He also informed me that the tube the original installer used was much to big; it was all bunched up in the rim! You can bet I’ll never go back to the shop that does shoddy work.
I need to setup Linux machines for streaming audio to an Icecast2 server from time to time and I always forget how to do it. This post will outline the install process on a machine with a minimal Debian Lenny system.
After you first boot into a fresh system, log in as root and install a couple things to make the next steps work.
$ apt-get install openssh-server sudo htop alsa g++ gcc oss-compat
You need to add your username into the sudoers file by running visudo and adding yourusername ALL=(ALL) ALL
once that’s done, find your IP address by
write down whatever eth0 says and you can get rid of your keyboard and monitor attached to the target machine. SSH into the box with your username and download source code for lame, then compile it.
$ tar xfz lame-3.91.tar.gz $ cd lame-3.91 $ ./configure –with-fileio=lame –without-vorbis –disable-gtktest –enable-expopt=full –prefix=/usr $ make $sudo make install
For the last step, you need to be root or have write permissions in the target directories.
You might as well use ogg vorbis too. Go find libogg +libvorbis tarballs somewhere.
$ tar xfz libogg-1.0.tar.gz $ cd libogg-1.0 $ ./configure –prefix=/usr $ make $ sudo make install $ cd .. $ tar xfz libvorbis-1.0.tar.gz $ cd libvorbis-1.0 $ ./configure –prefix=/usr $ make $ sudo make install
You need to be root to make install. Now, grab the darkice source code and compile.
$ ./configure –with-lame –with-vorbis –with-alsa $ make $ make install
You should probably make a configuration fie in /etc as well. A sample config file is in /usr/local/etc/
Here is my config file for your reference.
[general] duration = 0 # duration of encoding, in seconds. 0 means forever bufferSecs = 5 # size of internal slip buffer, in seconds reconnect = yes # reconnect to the server(s) if disconnected # this section describes the audio input that will be streamed [input] device = /dev/dsp # OSS DSP soundcard device for the audio input #device = hw:0,0 sampleRate = 44100 # sample rate in Hz. try 11025, 22050 or 44100 bitsPerSample = 16 # bits per sample. try 16 channel = 2 # channels. 1 = mono, 2 = stereo [icecast2-0] format = mp3 bitrateMode = vbr bitrate = 128 quality = .8 server = (your server) mountPoint = conway128 port = 8000 password = (your pass) name = rev.mook description = rev. mook url = mookserve.com genre = Mix public = yes [icecast2-1] format = mp3 bitrateMode = vbr bitrate = 320 quality = 1 server = (your server) mountPoint = 320 port = 8000 password = (your pass) name = rev. mook description = rev. mook url = mookserve.com genre = Mix public = yes
What is it?
Digital cameras are cool. So is GPS. And, EXIF tags are really cool too.
What happens when you merge the three? You end up with a set of photos taken with a digital camera that are “stamped” with the location at which they were taken.
The EXIF standard defines a number of tags that are for use with GPS.
The program takes GPS data in GPX format. This is an XML format. I recommend using GPSBabel – it can convert from lots of formats to GPX, as well as download from several brands of popular GPS receivers.
1) The program can “interpolate” between points (linearly) to get better results. (That is, for GPS logs that are not one sample per second)
2) The resolution is down to one second. But that should be good enough for most things. (This is a limit of the EXIF tags format, as well as GPX)
3) For best results, you should synchronise your camera to the GPS time before you start taking photos. Note: digital cameras clocks drift quickly – even over a short period of time (say, a week).
Installing is easy if you are running debian unstable (sid) or Ubuntu you can just run the following command install it.
$ apt-get install gpscorrelate gpscorrelate-gui
So, here we will see if the photo’s end up on the map, and if they do, make sure they are in the correct position.
Max elevation: 1008 ft
Total climbing: 6127 ft
Total time: 07:37:17
Well, that didn’t work at all. The image on the map isn’t anywhere near where I took it!
I have several .gpx files from commuting to work and other small trips around town. What if I want to merge several files into one big file? Use gpsbabel!
What is GPSBabel?
GPSBabel converts waypoints, tracks, and routes between popular GPS receivers and mapping programs. By flattening the Tower of Babel that the authors of various programs for manipulating GPS data have imposed upon us, it returns to us the ability to freely move our own waypoint data between the programs and hardware we choose to use. It also has powerful manipulation tools for such data. It contains extensive data manipulation abilities making it a convenient for server-side processing or as the backend for other tools.
Oh, it’s also open source (free) and runs on almost every OS. Sounds perfect for a Linux user. Here is how I installed and used it on my Debian server.
Grab the source code tarball from the ‘net and compile.
$ tar zxvf gpsbabel-x.x.x.tar.gz $ ./configure $ make $ sudo make install
Then my first time using the program with the merge option….
$ gpsbabel -t -i gpx -f 20120706.gpx -i gpx -f 20120707.gpx -x track,merge,title="COMBINED LOG" -o gpx -F bigtracks.gpx GPX: This build excluded GPX support because expat was not installed.
Oh no, an error! Probably missing a library. I will need to find out what is causing the problem, fix it and recompile the program. Some quick Googling and…..
$ sudo apt-get install expat libexpat-dev
That worked! The results of all the random .gpx files I had at the time are merged on the map below.
Max elevation: 925 ft
Total climbing: 18516 ft
Total time: 19:34:29
I was having issues with my WordPress installation running very slow. In addition there were problems when sending updating from my mobile device. It took me a minute to note that things were working just fine until I installed the Facebook plugin. A bit of digging on the ‘net revealed that curl “might” needed, however I didn’t really find anything in the documentation that would suggest otherwise. I was able to fix this problem on my Debian server by installing a few new packages.
$ sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
After everything installs, restart Apache.
$ sudo /etc/init.d/apache2 restart
Now the Facebook plugin is playing nicely within WordPress.