Category Archives: Code

JavaScript-like innerHTML access in PHP

As part of an update to the Five Filters Full-Text RSS service, I’ve been porting some JavaScript code (Arc90’s current version of Readability) to PHP. It contains a lot of DOM manipulation which translates very easily – thanks to PHP5’s DOM support. But one thing I wasn’t able to do was manipulate the DOM tree […]

Posted in Code | Tagged , , , | 9 Comments

Greasemonkey + jQuery

It used to be difficult to combine Greasemonkey and jQuery (or any other javascript library). Looking into it again, I came across 3 methods and this comment from Stephan Sokolow: For the record, the newest Greasemonkey versions should now provide a much better alternative to this. See http://wiki.greasespot.net/Metadata_block#.40require for an example of how to efficiently […]

Posted in Code | Tagged , , , , , | Leave a comment

Geocoding UK Postcodes with PHP

I’ve just come across a simple PHP solution to getting latitude and longitude values for UK postcodes. It relies on existing mapping sites for the information.

Posted in Code | Comments closed

Bazaar: push-and-update plugin with putty’s plink

I recently came across the push-and-update plugin for Bazaar (a version control system). The plugin is useful for anyone pushing changes to a remote server and wanting to keep the remote working tree up to date as well. According to Bazaar docs: “When you push a branch to a remote system, a working tree will […]

Posted in Code | Leave a comment

Sorting Animation

Java applet showing three different sorting algorithms in action.

Also posted in General | Comments closed