Whisky Web 2012

Scotland has a thriving and diverse tech community, reflected in such events and organisations as Tech Meetup; various Linux User Groups; the annual Highland Fling web conference; Culture Hack ScotlandThe Turing Festival and the Edinburgh International Science Festival to name but a few.  I have been fortunate enough to attend previous Highland Flings, and I know others in the web industry who have had fun and positive experiences at other tech events hosted in Scotland.

Continue reading

The Highland Fling 2011 – Web Standard In Scotland

July 8th 2011 saw the welcome and eagerly anticipated return of “The Highland Fling — Web Standards in Scotland”.  Set up and organised by Alan White in 2007 to increase awareness of web standards and best practice, it’s the only conference of it’s kind in Scotland.  I’ve been fortunate enough to have been able to attend each conference, although there was a hiatus in 2009/2010.  The inaugural event really set the bar high for what could be achieved by a dedicated developer passionate about his work.

Continue reading

Revert to PHP 5.2 in Ubuntu 10.04 (Lucid Lynx)

Despite suppressing updates of my LAMP stack, the upgrade to Ubuntu 10.04 ignored that, and as such I now have PHP 5.3.X installed.  Ordinarilly this woud be fine, but one of the open source web applications I work with doesn’t play well with PHP 5.3.X.  I needed a simple way to revert to a previous 5.2.X version of PHP.  The version in the Ubuntu 9.10 (Karmic) repositories would do the trick, so it was jsut a case of forcing Ubuntu to honour the 9.10 versions of various PHP packages over the 10.04 versions.

First, we get a list of all the currently installed PHP packages:

sudo dpkg -l | grep php > /tmp/php.packages

Next we remove the currently installed PHP packages:

sudo apt-get remove --purge $(dpkg -l | grep php)

Now we need to create an alternative sources list:

sed s/lucid/karmic/g /etc/apt/sources.list |\
sudo tee /etc/apt/sources.list.d/karmic.list

Having done that, we need to generate an aptitude preferences file for PHP:

awk '{print "Package: " $0; print "Pin: release a=karmic\nPin-Priority: 991\n"}' /tmp/php.packages |\
sudo tee /etc/apt/preferences.d/php

This preferences file tells aptitude that for each listed package, we want to pin down the installation candidate to that from the Karmic repositories. We can now install the packages that we previously removed, but this time the versions from the Karmic repositories:

sudo apt-get update && apt-get install $(cat /tmp/php.packages | tr "\n" " ")

A quick restart of Apache and everything seems to be working with the older version of PHP!

UK Geocoding

After a little hard work, I’m releasing my attempt to address the shortfall in accurate UK geocoding services.  Courtesy of open data provided by Ordnance Survey Open Click-Point, some sed, SQLite, PHP and YQL I’ve produced a REST API, and a YQL datatable.  I’ve also written a more thorough account of this by way of documenation.