User login

Even banks get it wrong sometime...

Saw this recently in a bank statement

Make's me think again how important TESTING TESTING TESTING is :)

Raspberry Pi One-Wire sensors stopped working?

Yeah OK, so it happened, I knew it would.

All my sensors on a very remote rPI installation (on the other side of the world infact) stopped working after an update, so my first guess was that they've changed something.

Creating and running a Internet Radio Station with Drupal

Recently for fun I setup "TShirtSlayer Radio", designed to let the community members of TShirtSlayer ( who are often also in their own metal bands ) upload their songs to the new radio station.

This had a few key requirements

- They had to use their existing Drupal account to login and upload the songs (mp3/wav/etc)

- The actual internet stream radio station website would be a subsite (

- The subsite had to have some functionality like being able to request a track

Arduino JPEG Color Camera LS-Y201 is broken, don't waste your time!

Recently I picked up a cheap JPEG Color Camera LS-Y201 from eBay, I didn't expect it to be amazing but the interesting thing is that if you're on a low-end Arduino (atmega328 based), then SoftwareSerial is not recommended to go about 19200BPS.

Now all good and well you say, because the LS-Y201 has a function to change the bitrate down to 19200 from the default 38400

Wrong! The LS-Y201 has a bug when setting the baudrate, more about that bug here


Gimp colour profiles and Firefox/Safari PNG colour troubles

So unlike Chrome, Firefox will ALWAYS apply the embedded ICC colour profile to an image, adding the adobeRGB1998.icc profile is not what you want todo here, you want to be sure you've removed all the profiles.

Noodling around with (un)setting various colour profile values in TheGimp did not help

Fortunately imagemagick to the rescue again, I simply used the -strip option to remove all profile and comment info

Drupal signup forms, validate the domain name has a valid MX server

Whilst the general regex validation of email addresses is fairly good in Drupal, what happens if they enter a domain that does not exist? Well they can still sign up, and the email will bounce.

Let's use the simple but reliable dns_get_record in PHP to do the dirty work for us.

function my_helper_form_user_register_form_alter(&$form, &$form_state) {
  $form['#validate'][] = 'my_email_form_validate';


Extending Drupal's Honeypot module with log checking

Using some simple bash command like awk and sed, I cooked up this quick drush hack to examine the server logs, there's a specific robot getting around that continuously hits up the "/user/password?name=xyz" URL, this simple line fed script grabs the IP address in the first column, sort's them, counts how many uniq's there are, then uses awk again to only print out IP's that have tried this URL more than 2 times.

Facebook style realtime event notifications in Drupal+Node.JS

Ok so this one is a bit of a hack, but on my TShirtSlayer website it fits very nicely.

Essentially I wanted to do something similar to the way FB does automatic realtime notifications but instead of focusing on people, I wanted the the focus to be on the taxonomy (things added to the site broken down by category), this is our message/event we want to spread to other users.


Subscribe to Front page feed