Author Archives: Edward

About Edward

Edward Harman

jaq@ethelred.org
This hCard created with the hCard creator.

log sampling

A little Perl snippet for sampling a log file (or whatever): grep something myfile | perl -n -e ‘print if $. % 12 == 1;’

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 […]

Latest Idiotic Hack

I run MPD to play music at home. In a burst of inspiration, today I hacked a new feature into my twitter client. If it sees a hashtag of #MPD in a tweet (or direct message), it takes the rest of the message, tries to find a song with a matching title (in my collection), […]

Peppa Popper

I was inspired by a children’s TV show Peppa Pig visits Daddy Pig’s Office and the fact that my daughter (aged 16 months) has been taking marginally more interest in the computer. So I did a quick hack to write a program like Mrs Cat uses in the show. It shows a white screen, and […]

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 […]

what’s in a name

In some conversations recently, I found that some other people were interested in a little tool I have written. I started wondering about setting up a Google Code project for it, since that makes it easier to ‘expose’ in some ways. The first hurdle is that it would need to have a unique name. I […]

the step beyond ‘it works for me’

I wrote a new version of my command line twitter client1. It now has coloured output, which helps me read more easily. Also it grabs direct messages and tweets referring to me, as well as the regular friends updates. As with most of the personal software I write, it is some files with links into […]

how to loop by line in bash

ORIGIFS=$IFS; IFS=`echo -en "\n\b"`; for line in $(cat my_list_file); do echo $line; done; IFS=$ORIGIFS

automatic podcast transfer to ipod?

I have an iPod and a PC. When I connect the former to the latter, I would like it to automatically copy over the most recent podcast(s) from a certain directory on the PC, onto the iPod. This should not require any user interaction after plugging in the iPod. The PC is running Ubuntu 9.10, […]

web testing with curl

It happened again. You have an annoying bug with your Java web application, and you’re stepping through with your debugger, and… whoops! looks like you just missed an important line. You fire off the same request again, so you go back to your browser and go through the steps to that point – did I […]