Skip to content

{ Category Archives } Tips

Importing Delicious bookmarks to Google Bookmarks, with tags

Along with a lot of other people, I was a bit perturbed by the impending closure of Delicious. I’ve been using it for years and have hundreds of bookmarks, and none of the new crop of competitors seem up to the job, either lacking in features, having no bulk-import facility, or just being too new [...]

Tagged ,

Posting to Twitter automatically using OAuth

Twitter recently switched off basic HTTP authentication, forcing developers to use the more complex (but hopefully safer) OAuth. There are lots of OAuth examples out there, but they all seem to focus on interactive apps, where the user is sent to Twitter to authenticate, and then the app uses the resulting access token to post [...]

Tagged ,

Installing Spotify on Fedora 13

I’ve recently taken possession of a flashy new workstation running Fedora, and with joy in my heart went to install Spotify on it, only to discover… Noooo… They only offer .deb packages for Debian and Ubuntu. Thankfully, the solution was easier than I thought. Do all the following as root… 1. Install dpkg, the Debian [...]

Tagged , , ,

Tunnelling a connection through 2 servers via ssh

This took a bit of head-scratching, so for future reference, or anyone else looking: Say I am working outside the office firewall, on a machine called home, and I need to get into a MySQL server inside it. (Doesn’t have to be MySQL, but just for argument’s sake.) There’s a machine called gateway I can [...]

Tagged ,

Best new feature in Eclipse 3.6 Helios

… is hidden away on the last tab of the Java Formatting Profile editor (Preferences -> Java -> Code Style -> Formatter -> Edit). They’ve finally (after nearly six years) added the ability to temporarily turn the code formatter off for a tricksy block that needs its own custom formatting. e.g.: // @formatter:off xml .append( [...]

Tagged , ,

Back up all MySQL databases to separate files

Note to self — so I don’t have to think about it again next time. #!/bin/bash export MYSQL_PWD=myrootpassword BACKUP_DIR=/mnt/backups/mysql_backups DATE=`date -I` for dbname in `mysql -uroot –batch –skip-column-names -e "show databases;" | grep -v information_schema`; do /usr/local/bin/mysqldump -u root $dbname | gzip -9 > $BACKUP_DIR/$dbname-$DATE.sql.gz done   # Clear backups older than 7 days /usr/local/bin/find [...]

Tagged ,

Google Chrome (actually Chromium) on Centos

Joy at last! Chris Staite from the University of Birmingham has built a statically-linked version of Chromium, the open source version of Google’s Chrome browser, for Centos. You can get it from here. I was getting so sick of Firefox’s slowness and bloat, and Chromium is so much snappier, and more memory-efficient too. Although to [...]

Tagged ,

Things to try when VirtualBox networking messes up

This is really a note-to-self but it might help other people too. I have two network interfaces in my Ubuntu guest (on OS X 10.4 host), one NAT, one host-only. Sometimes one of them doesn’t get an IP address — in ifconfig it has an inet6 address but not an inet address. Today I tried [...]

Tagged , ,

NoSuchMethodError when running JUnit tests in Eclipse

This is worth a quick post as I couldn’t find a solution on Google and it took me an hour or two of fiddling. I have a Maven project, call it frontend-war, which contains the main service code for FuncNet. A unit test kept failing in Eclipse with NoSuchMethodError, one of my least favourite screw-ups [...]

Tagged , , ,

How to make sure your media disk is mounted before starting iTunes

This is an Apple Annoyance that’s been bugging me for a while — if your iTunes library is on an external HD, and you start iTunes without it mounted, the bloody thing can seriously mangle its own library index (under Tiger at least). So I’ve replaced my iTunes Dock icon with a little AppleScript that [...]

Tagged