In the move to put as much of my house onto twitter as possible, MythTV was the next victim. I’d previously made a PHP script that sent MSN alerts, but now I don’t use MSN, it needed a revamp.

I knocked up a small PHP script that grabs the backend status, finds what is being recorded or watched, compares with the previous run, and sends a message to twitter using wget.
To use it, grab the script, change the username/password variables, chmod +x it, and then add it to your “Startup Applications” or equivalent if you’re not using Ubuntu.
Since writing “Get number of unread posts from google mail”, I realised that I didn’t care about a lot of emails that I get on a regular basis, things like ebuyer emails, stock-market alerts etc. I only want to be notified when I’ve got emails from real people.
By applying a “Newsletters” label on GMail to all automated messages by filtering messages, I can now see how many unread emails I have, then subtract the number of unread newsletters I have, and flash the ambient light that number of times.
Grab getGoogleMail.sh, change the usernames and passwords, and change “Newsletters” to whatever your google label is. Then use the $count variable to do whatever you want.