Geekery
Some useful snippets of technobabble, code and such for the discerning geeks and programmers amongst you.
Comments
Leave your comment?
Reactions
Geekery Archive
-
Tip: Latest Chromium Browser on Debian Squeeze
The version of Chromium browser in the Squeeze repositories is pretty outdated and lacking in some functionality that nor needed for a project she was working on (its a plugin that fades the page based on the number of hops on a traceroute). I wasn't keen to compile it myself. So first I spent a fruitless 20 minutes searching for a backport. It didn't seem to exist. What does exist is an Ubuntu Chromium Daily Builds Repository . So this is just how to use that to get a daily build of Chromium on your Squeeze machine.
What a great site to test a browser on
From the commandline Read More …- 2011-12-13 21:37:35
- Published: 2011-12-13 21:37:35
-
UK Postcode Lookup - My First Drupal7 Module
I'm moonlighting on a project for an extremely cool client at the moment, it involves mapping and will be made out of Drupal. One of the things that it will need to do is to transform UK postcodes into latitude and longitude data, so my first cract at writing a Drupal module is to implement that. I've put up a tar.gz of the ukpostcodelookup module code, but it is far from tested as yet. You have been warned.
The module will use StreetMap.co.uk's postcode lookup abilities, screen scraping the data from there and using that to populate the latitude and longitude fields for a particular content type. If you know of a non-corporate looku service I'd love to hear about it (storing the lookup data locally may be an option, since the state has released the data now(finally)). Read More …- 2011-11-19 23:11:04
- Published: 2011-11-19 23:11:04
-
MySQL tip: Counting total number of rows even when LIMIT is set
Pagination is a pain in the arse, right? That's one of the lovely things about using an ORM or something to do it for you. But that isn't always possible, so at some point you'll need to use a LIMIT on your select. Now, MySQL has a nice little feature called SQL_CALC_FOUND_ROWS which puts the number of rows that would be returned before your LIMIT was applied.
You do something like this in your SQL SELECT statement.SELECT SQL_CALC_FOUND_ROWS my_table.* FROM my_table,another_table WHERE my_table.id=another_table.id LIMIT 1,10;Then you can do something like this to find out the total number of rows that would have been returned had you not applied the limit.SELECT FOUND_ROWS();Read More …- 2011-11-19 11:05:51
- Published: 2011-11-19 11:05:51
Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don't log these details. Those services will. I do log everything you type into the form. Full privacy statement.