Monthly Archives: February 2008

Geohash PHP class

geohash.org popped up recently with a method of generating short hash codes for geographical locations. The codes have some interesting properties and the algorithm is documented on wikipedia.

I recently started doing a Project Euler problem a day as a fun diversion. I found the geohash algorithm intriguing, so it became my “Euler problem” for the day!

Having done it, I’m not sure I’ll find a use for it myself, but if anyone else finds it handy, do let me know!

Download it here.

Munin plugin for graphing MySQL slave delay

I wanted to track the delay of a mysql slave server in Munin, and found nothing appropriate after a quick google. So, in case anyone else finds it useful, here is a plugin which will allow you to do just that.

Here’s a typical graph:

Slave Delay Graph

Download: mysql_slave (1 Kb)

EDIT: I wrote this so I could better understand the recovery time of a slave which had 13 hours of updates to catch up on. While it was good for that, it’s less useful for the day-to-day lag as munin will only be polling it every 5 minutes. A better way would be to use mk-heartbeat to get a more accurate moving average.

I’m walking 62 miles in less than 30 hours!

I’ve formed a team to take on the Oxfam Trailwalker Challenge – a 62 mile walk on the South Downs that must be undertaken in less than 30 hours! Our training is well underway, and it looks like we’ll be shooting for around 25 hours.

On the big day I’ll be sending pics and reports to the team blog, and you’ll also be able to send us messages of support via SMS too.

We’re hoping to raise £1500 for Oxfam, so if you can possibly afford it, please consider sponsoring me.

You can keep track of our training and out how to sponsor us on our team blog at http://trailwalker.dixo.net