On the subject of version control – moving to github

When I started programming, we considered ourselves lucky to have a filesystem… Well, ok, I’m not quite that old, but up til now, git was something that had eluded me. CVS and svn have served me fine so far in my career (let’s not talk about Visual SourceSafe). As I commented to a friend, I […]

testing vs. documentation

I have made some progress on my automatic ipod transfer script The first step is to set Nautilus (that’s the file browser in the Gnome desktop) preferences, since it is the program which deals with automatically mounting media. So in Nautilus->Edit->Preferences->Media I set the ‘Media Handling’ for ‘Music Player’ to run a script of my […]

bash twitter

There are probably lots of variants out there. In fact mine is largely copied from here Inspired by BLT #!/bin/bash # a twitter client (uses .netrc for auth)   confdir=~/.bt seenfile=$confdir/seen feedstyle=$confdir/btfeed.xsl   if [ "$1" == "-h" ]; then echo " use: $(basename $0) -h | [ tweet ]" echo " -h help" echo […]

dns323 podcast and torrent downloader

I’ve expanded on my previous podcast downloader program so that it gets torrents as well. I was running Automatic but it seemed silly to have two programs doing more or less the same thing. I also didn’t like the configuration of Automatic, which has a global set of regexps it applies to all feeds to […]

dns323 podcast downloader

Our server box is taking over lots of little download tasks for us. The next thing I wanted it to do is automatically get podcasts. Being a Ruby fan I knocked up a little script – it’s handy having RSS reading as a core language library! #!/ffp/bin/env ruby require ‘open-uri’ require ‘rss’   CONFFILE=’/ffp/etc/mypodder.conf’ PODCASTDIR=’/mnt/HD_a2/podcasts’ […]

args4j – command line option parsing in Java

I was a bit sceptical about args4j to start with, but it has grown on me. There is an initial extra step you have to make to add it to a program, but this is mostly boilerplate like this: @Option(name = "—help", usage = "Show option help", aliases={"-?", "-h"}) boolean showHelp = false;   private […]

merb + datamapper version frustration

I read about Merb and Datamapper and wanted to try them out. Merb does not have particularly good documentation at the moment, but I found some blog posts about how to install. Unfortunately it turns out that at the moment just doing a “gem install merb” and equivalent for datamapper leaves you with a system […]

canvas gotcha

I was learning to use Javascript Canvas recently, but was almost stumped by a little issue with sizing the thing. In Firefox 2 at least it looks like the canvas size needs to be set on the canvas tag. When I applied a width and height with CSS, it just resulted in the whole canvas […]

currency exchange fixes

I have had some trouble recently with my Currency graph site. The data for this site comes from an email subscription I have to an xe.com daily feed. The emails were identified by Procmail on my server, and piped into a script which parses them and inserts the rates into the database. The initial problem […]

JNI hacking

For some reason this week I decided it would be handy to learn something about how JNI works. And when I say learn, I mean write something that would work. The Linux event interface is fairly fresh in my mind, due to working with buffalo’s ruby library for it recently so I decided to re-implement […]