Author: ben

BBC iPlayer alerter – Part 2: Data storage

Before reading this article you should read my first post of this series: BBC iPlayer alerter – Part 1: JSON processing before you dive into this one. You will remember that for step 2 of my plan to automate detection of

BBC iPlayer alerter – Part 1: JSON processing

As I am unable to read during my morning commute, I have taken to listening to audiobooks to fill the time usefully. A great source of material to listen to are the shows on BBC Radio 4 Extra. I have a

Update a MySQL column trimming a constant number of characters

Will remove the first 4 characters. E.g. ABCD1234, ABCD1235 -> 1234, 1235: UPDATE table_name SET title = RIGHT(column_name, CHAR_LENGTH(column_name) – 4) WHERE clause;

Display your Twitter feed from a website

I have put up several posts on how to display recent Tweets in a webpage with PHP. However, Twitter has switched to it’s API v1.1 from today, so all of my previous articles have become obsolete. The easiest thing to

Identify a (web) link in a string with PHP

If you want to process some text and output the same text with HTML links automatically created for you, then look no further: $newstring = preg_replace(‘!(http|ftp|scp)(s)?://[a-zA-Z0-9.?&_/]+!’, “<a href=”\” target=’_blank’></a>”,$sting);

UK to MySQL Date in C#

A C# snippet that will allow a function to be written where a string is passed in, containing a date in the format dd/mm/yyyy, and have that replaced by yyyy-mm-dd: // Matches 2 digits forward slash 2 digits forward slash

Displaying your latest Tweet in PHP – updated

Back in 2011 I posted a method for displaying your latest tweet in php. However times change, and the twitter API has been changed beyond all recognition. I have updated my script to interpret the JSON response from the latest

Notes on the Raspberry Pi

OS used: debian6-19-04-2012 I wanted to be able to play with my Pi, but allow others in my household to watch TV, so I picked up a 3.5″ TFT monitor from ebay for under £15, to make use of the RCA

Plink.exe “Login as” error

Using plink.exe at the command line allows for all the functionality of PuTTY from a Windows batchfile: plink.exe -ssh -pw password user@10.0.0.1 command In spite of providing the username and password this command, you may find that you are still

Set date and time of a Linux device from a Windows batchfile

I had a client with Linux device that whose clock is not as reliable as it should be, running a time-critical application. As a workaround fix I wrote a Windows batchfile to update the Linux date and time, and  he

Top