Category Archives: Code

WordPress London Meetup – 17 November 2011

On Thursday 17th there was the November WordPress London meetup in the Headshift | Dachis Group offices. I recorded the 3 presentations and have uploaded them to YouTube:

WordPress News by Chris Adams

Chris gave a roundup of the latest changes and releases in the WordPress community. [Updated video with typo in title fixed.]


WordPress Site Structure for SEO by David Bain

David gave an introduction to setting up WordPress for good SEO practice.


Using Custom Post Types by Keith Devon

A technical talk by Keith on how to create a new custom post types.


London WordPress Meetup – 28th July 2011

On Thursday there was the July 2011 London WordPress meetup in the Headshift | Dachis Group offices. I recorded the presentations and have uploaded them to YouTube:

Ice-breakers & Introductions

Introduction to WordPress by Emily Webber

Beginner Theme Development by Keith Devon

Looking Under the Hood of WordPress by Chris Adams

If you’d like to come along to future meetups, please join the London WordPress Meetup group.

OpenStreetMap Shortlinks

Shortlinks were introduced to OpenStreetMap at the end of June 2009, by Matt Amos, as a way to have a short url to get to a specific point on the map. It is a method to go from the code to a latitude, longitude and zoom. It also works in the reverse direction too. You will see the shortlink in the bottom right hand corner of the map on If you have a location that you want to show to people, say on twitter, then the shortlink may be a nicer method than using the standard tinyurl services.

Here is an example of the difference:

You can even add markers by appending ?m to the end of the short link and the marker will appear in the centre.

If you are a developer you may want to include support for the shortlink, in addition to or instead of the standard permalink. A good example is if your app sends twitter messages with your current location, where there is a limited number of characters that can be used, thus a shorter url is needed.

For some code take a look at the bottom of the site.js file, site_controller and the shortlink library.

Update: With the move of the OpenStreetMap codebase having moved from svn to git the new file locations are: sites.js, site_controller.rb, and the ruby shortlink library.

Installing ImageMagick on Snow Leopard (64-bit)

This blog post is only relevant if you are on Snow Leopard, have a 64-bit Intel Mac, and need to install ImageMagick.

There are many Ruby on Rails projects out there that have some form image manipulation, thus use ImageMagick for that. Up until recently it was a real pain to install, with some huge list of library dependancies that need to be downloaded, compiled and installed. The ImageMagick project is now supplying a Intel 64-bit binary, specifically for Snow Leopard user so that they don’t need to install from source.

Another nice little tips that I learned for installing gems that have native extentions, is that you can put the ARCHFLAGS environment variable into your ~/.profile so that you don’t have to manually set it (and then wonder why the gem doesn’t compile elsewhere). You need to add:

export ARCHFLAGS="-arch x86_64"


Last weekend I was at Mashed08. I stayed there overnight, so didn’t get much sleep.

Didn’t do any mashing up, though I did finally start writing a bit of ruby code to take a file with a list of street names, and ask the OSMXAPI whether that street exists within a specified bounding box.
It was interesting to see what people were doing. There was very few people doing anything with maps. There were a few groups who using high resolution satellite imagery rather than plain old maps. A lot of people were working on something that was tv or audio related, such as ripping the subtitles and translating them into another language in almost real time. Twitter seems to be rather popular.
The event was featured in this week’s BBC News Click programme. (BBC iPlayer only works in the UK and programmes are only available for one week.)
I’m uploading the better photos to Flicker with the Mashed08 tag.
P1020874.JPG P1020881.JPG P1020869.JPG P1020892.JPG P1020899.JPG P1020919.JPG
When your at a station waiting on a delayed train, just get some bean bags out to sit on:
P1030112.JPG P1030115.JPG
(Kinda ideal for getting passers by ask were the bean bag sale is).