My bike

This is a chance to obtain a real 80`s classic road bike. Frame size is 59cm, the top tube is 56cm in length (.Built by John Hardisty of Newcastle).Would fit rider of 6ft plus. Crankset is Campagnolo 53/39, pedals Shimano ( look cleat). The rear block is a 7 speed Regin. Front and rear mech are both campag also. The brakeset is Campag, as is the seatpost. Stem and bars both Cinelli, wheels are Mavic Ma40 on Campag hubs 32/32, DB spokes. Tyres and tubes are very new, Racelite. Saddle is Selle Italia Turbo. Everything works as you would expect, although the existing Synchro levers may need adjusting, but work OK. As you can see the paint is in good condition for age, ( it has been refinished at some time.) This is a beautiful machine, and these days quite a classic. Buyer to collect from near High Wycombe, by arrangement.Paypal or cash upon collection. I would not wish to risk posting! If you have further questions, please ask. Good luck, and happy bidding

Quicker booting for Ubuntu 9.10

If you're using Karmic Koala (or Lucid Lynx), the boot loader, Grub will seem a little bit different from previous Ubuntu releases. Previously to make changes like the timeout before loading the default OS, you edited /boot/grub/menu.lst

Grub is now configured by editing (as a root user)

Make changes to the GRUB_TIMEOUT or whatever else you needed to change. The config now needs to be made live. Do this by calling

The changes are now written to an auto-generated file /boot/grub/grub.cfg but this file shouldn't be edited by hand.

For more info, see the Ubuntu's official docs on the subject.

Setting up WordPress with a WebFaction account

I read WordPress' instructions on setting up their blog. WebFaction are a lovely bunch of hosters but it does take a few minutes more than WP claim to get your blog up and running. These are very basic instructions but I couldn't imagine some friends getting through the whole process without a hitch...

Log in to the Webfaction control panel at

Go to the domain page ( This part is telling WebFaction that you plan on using their hosting for a domain name you've just bought

  • Under name, enter the domain eg. ""
  • In the bottom right of the page, click on the page icon with the " + " marker
  • In the subdomain text box, enter "www"
  • Click Create

Again on the control panel's menu, go to "Domains / websites" and then choose Applications.

  • In the bottom right hand, click the Add New icon
  • In the name box enter a name for the application (Something like "my_blog")
  • Under App type, find the WordPress version not marked "insecure"
  • Click create
  • The WordPress application is now installed including a MySQL database to hold your posts.
  • The confirmation page you now see has the password to the database by the Extra info label. Make a note of it somewhere

You now have a WordPress application and a domain for it to use. These two parts need to be linked together under "Domains / websites" > Websites

  • Click to add a new Site, adding the following information:
  • Name: a unique name -  (eg. my_example)
  • Subdomains: add all of the URLs from the list that will point to the new website
  • Under Site apps, add a new entry and choose the name of the application you made earlier (setting the URL path to be "/" if the website will only be a blog)
  • Click Create

Point your web browser now to You should get a page from WordPress but go to the root URL ( and there's an error message:
"Not Found. The requested URL /defaultsite was not found on this server."

To correct this problem, SSH on to your WebFaction account and log in to the MySQL database that was created by the installer (For this command, you'll need the database name which is listed under Databases > "List databases":
mysql -u _your_db_username_  -p

You'll be prompted for the password which you were given after doing the Application part of the setup.

Once you've logged in, use the "show databases;" command to see all of the databases. There should be one named like your application. You need to switch to this DB and then view the tables in this database.
use your_db_username;
show tables;

Something in these tables has some bad data from the initialisation. We're going to delete all of the tables and let the official WordPress setup recreate them properly. Delete each of the tables shown from the previous call using "drop table name_of_table". There are 10 in my blog, each beginning with "wp_". Get rid of them all.

Do "show tables;" again and there should be nothing.

No go back to

And you should be ready to go.

Choose a name, make a post and should be there with your first post.

Django ImageFields in forms

Until recently, I'd swerved the image parts of my Django web app as it seemed it would be as much effort customising the field for the development server as it would for a full apache instance. (However with hindsight, I'm not so sure). Here are my steps to get a model / view and templates working with an ImageField.

First you need the right configs in

The root setting is where on the filesystem the base directory where the images/files will be uploaded to. media_url is the corresponding url where a client can request the files from.

In the model to store the image, you need some field

The upload_to value will be a sub-directory of /home/username/webapps/media

To capture an image from user input, the form's attribute just needs a

The form in a template is a little different from other forms as it needs an additional attribute to cope with the file being uploaded:

The final part is the view which changes slightly to accept a dictionary of files

And now the user-profile object has an image or file referenced to it, stored on the filesystem under

This file can then be used in a template:

Hope this helps someone. If you have any feedback, please let me know.

EuroPython Vows - Where to after the map/filter functions

As I was saying to someone at the EuroPython conference; I had been struggling as a Python programmer to get beyond the map, filter (and reduce) functions. Functional programming "done", I just didn't know where to go next to apply more learning having reached this glass ceiling.

After three days of overwhelming talks, the list is now ballooning with new areas for me to approach.

Russel Winder's talk on Gil was a warning about difficult methods to parallelise code and recommended the multiprocessing module.

From a technologies perspective, Esteve Fernandez's talk Twisted, AMQP and Thrift was the most provoking to give-a-try in some free time. I've always felt daunted by the complexity of Java RMI tools, Twisted, AMQP and Thrift would surely struggle to be more complex than their Java cousins.

Rob Collins had a talk on his FilterPype framework which seemed like a fantastic development of the piping mechanism in unix. It was this talk which started the "I remember something about that from uni" klaxons going off and Bruce Eckel continued in this, during in his presentations.

The main theoretical subjects which I heard mentioned again and again, but feel ashamed to know little about were:

  • Continuations
  • Subroutines
  • Closures
  • Generator expressions

I also heard the following Python tools / techniques mentioned

and should investigate these

  • wsgi
  • zope
  • @memoize decorator to do as haskell does when first calculating factorial of 6 and then 7 after (factorial(7) does 7 * _cached_factorial(6))
  • (Also Lua, a different language)

David Jones' What Sucks About Python was another great talk on positive (and some negative) features of python where he demonstrated continuation issues which I need to follow on my own interpreter.

(I also heard Kamaelia sporadically for concurrency)

A thoroughly worthwhile use of three days. I am sure the event will help me develop as much as a programmer as a pythonista

Firefox 3.5 on Ubuntu Intrepid Ibex (8.10)

I had a small amount of hassle trying to find instructions for an easy way to install the new 3.5 version of firefox on an Intrepid version of ubuntu. Here is what worked for me...

1) System > Administration > Software Sources > Third-Party Software tab

2) Add this repository to the list:
deb intrepid main
I think this should be the same for jaunty jakalope too i.e.
deb jaunty main

3) sudo apt-get update

4) sudo apt-get install firefox-3.5

Firefox 3.5 is now installed here:

5) Go to this folder and make a shortcut by dragging "firefox-3.5" to somewhere on the navigation bar.

If there's any problem with this, please let me know