-
Python
9 April 2013
I’m using virtualenv and have some python scripts as part of a django project. The scripts need to be run by cron, but have to use the virtualenv.
There’s a few solutions around, but I w...
-
Django, Python, web development and things (un)related - Flapping Head
Flapping Head
2 September 2013
I’m not a huge fan of Perch, but I’ve used it for one client. Getting the excerpt for a blog post isn’t straight-forward. Here’s a way to do it using the API.
$api =...
-
Django
Note that it updates the files in-place.
Make sure you have a backup and/or they’re committed to version control just in case something goes wrong and messes up your templates. You’ve been warned.
...
-
JavaScript
8 July 2010
Last night I ported some JavaScript code that used MooTools to use jQuery instead. In many ways I prefer MooTools to jQuery, but jQuery is easier to integrate in code that uses other libr...
-
UK Postcodes to Latitude/Longitude
UK Postcodes to Latitude/Longitude
27 August 2010
For location-based stuff, it’s useful to take a UK postcode and get the lat/long to plot it on a map (such as Google Maps).
The Google Maps API only h...
-
Hosting
Serving from a working copy
A simple way to update sites is to serve them from Subversion working copies. Checkout the code on the server, develop and commit changes, then
svn update the server when...