Archive for the ‘Uncategorized’ Category

Syncing Google Calendar With Everything

Saturday, October 28th, 2006

I have a lot of devices that I’d like to keep the same calendar in sync on: Two phones, an iPaq, my work PC, my home PC and Google Calendar. The smartphone and iPaq played nicely with outlook but there was some “glue” needed to get my Sony Ericsson phone and Google Calendar in on it.

The “glue” is a few pieces of software I found recently. First of all, to sync my Sony Ericsson with GCal I use GCalSync over GPRS, then to sync GCal with Outlook I can use either Companionlink for Google Calendar (a little buggy, doesn’t auto-update, not free) or RemoteCalendars which is Open Source and very flexible. A no brainer which one I picked, really.

More info on using RemoteCalendars with Google Calendars on

Essential TV Viewing

Friday, October 27th, 2006

If there’s anything good about Summer ending and Autumn and Winter rolling in it’s a new season of TV the world over. In the UK some shows have already had an entire new series and in the US they’re just warming up.

Here’s what I’ve been watching:

Dexter. A forensics expert who is also a serial killer. Sounds naff, actually really good.
Everybody Hates Chris season 2. Same as the last season, hasn’t lost its charm yet
Family Guy season 6. Unlike the Simpsons, this just gets better and better. Currently on episode 3
Heroes. A new favourite of mine. This series follows the lives of ordinary people as they discover they have super powers. Brilliant characters, compelling plot.
My Name Is Earl series 2. Proper feel-good, laugh-out-loud stuff
Robot Chicken series 2. Pop culture gags animated with action figures with plenty of ultraviolence.
Freak Show A new surrealist cartoon from David Cross about the most ineffective superhero team in the world
The Mitchell and Webb Look Sighs all round as Mitchell and Webb transition their show seamlessly from Radio 4 to TV. Not a bad miss at all.
Extras series 2. Trailed off and got a bit formulaic and then pulled it all back for a brilliant last episode
Lead Balloon. New comedy from Jack Dee who is basically playing himself. Same sort of uncomfortable deadpan humour as Curb Your Enthusiasm and Extras. Great stuff.

Managing podcasts with, Visiting sites l8ter

Friday, October 6th, 2006

I found a neat little site drift past on the popular links feed: It’s a simple idea – you enter your email address and the URL of a site that is currently being DDoS’d by Slashdot or Digg and it emails you back when it’s popped onto the internet again.

I thought this would be really cool if there was a Firefox feed or Javascript bookmarklet for it so you could just hit a button when you see an error 500. A few emails with the creator, John and he’s added a bookmarklet to the confirm page. Kudos!

File this under hacks: As you might guess I use my own PHP script, Automated Serendipity to aggregate all my podcast feeds. This squirts them onto the end of my current Winamp playlist. I’ve been using it this way for a little over a year, but now I’m using to manage all my feeds. My podcast feeds (and MP3 blogs) are all tagged with “podcast feeds” so all that’s required is a quick bit of PHP to drop it down into the flat file format the my script expects et voila, I now manage my podcast subscriptions by adding them to, giving me one centralised base to refer to.

If you want the PHP to drop a page into flat text, you’ll want this zip. It’s got a little hack in there to extend the number of records to 100 as the RSS feed limit is 40 and the page limit default is around 25 (I think).

Some handy vim key mappings

Thursday, October 5th, 2006

This has just saved me a whole load of keystrokes on some very dull HTML marking up of content pasted into vim from a Word document. I’ll post it here in case anyone else finds it useful:

:map <F2> 0i<p><CR> <Esc>$a<CR></p><Esc>
:map <F3> 0i <li><Esc>$a</li><Esc>
:map <F4> 0i<ul><CR><Esc>
:map <F5> $a<CR></ul><Esc>
:map <F6> 0i<CR><h4><Esc>$a</h4><Esc>
:map <F7> 0i<ol><CR><Esc>
:map <F8> $a<CR></ol><Esc>
:map <F9> 0i<blockquote><CR> <Esc>$a<CR></blockquote><Esc>
:map <F11> bi<strong><Esc>ea</strong><Esc>
:map <F12> :%s/^• \(.*\)$/ <li>\1<\/li>/ge<CR>:%s/^[0-9]\+\. \(.*\)$/ <li>\1<\/li>/ge<CR>:%s/…/\.\.\./ge<CR>

Either run each one of these commands or paste the whole lot into the end of your vimrc file. This will map all the F-keys as follows:

F2 – Wrap line in paragraph tags
F3 – Wrap line in list item tags
F4 – insert unordered list tag before current line
F5 – Insert unordered list close tag after current line
F6 – Insert a new line, then wrap current line in header 4 tags
F7 – Insert ordered list tag before current line
F8 – Insert ordered list close tag after current line
F9 – Wrap current line in blockquotes and indent
F11 – Wrap current word in strong tags
F12 – Perform the following substitutions:
– bullet points into list items
– numbered lists into list items
– Word elipsis character into 3 full stops

Have some useful links on vim to go with that:
And my bookmarks tagged vi

Warwick Arts Centre Atom Feed, Bus Times Offline

Wednesday, September 20th, 2006

My local arts centre is Warwick. They have loads of great events and shows, however even though I get a “What’s On?” style pamphlet every quarter I always manage to miss great things because I don’t discover they’re on until it’s too late. Probably because it’s made of paper.

So I’ve just thrown together an Atom Feed for monitoring new events, so I can just be notified of them as soon as they’re on the site.

Subscribe to the feed.

On the subject of stealing other sites’ data for my own purposes, the Travel West Midlands site has just in the last week or so updated its online timetables, so my rip-off, mobile-friendly version doesn’t work anymore. The new timetables are an improvement, but it’s still all done with HTTP POSTs, so you still can’t bookmark a timetable. I’ve got a car now anyway, so what the fuck do I care? 😀

Custom Rails Scaffold

Wednesday, August 30th, 2006

A short while ago I mentioned creating custom scaffolds for Rails to cut out all the tweaking you need to do to the layouts for each object in the project. It was pretty easy to do, but I put off uploading the scaffold for a while because there were a few tweaks to do and then that massive bug in Rails was discovered so I’ve just gone through and made sure the code doesn’t clash with anything in 1.1.6

What I’ve done is largely changes on the semantic HTML / code neatness side of things. That is:

– Switched a lot of the tables (semantically fine, but not flexible) for lists
– Added a “confirm” action which replaces “destroy” and provides a seperate page with the confirm form on it
– A lot of things are now list items – navigation etc
– Added some useful class names to elements
– Dropped the H1s at the top of each page to H2s
– Created a layout with header, footer, main. Header contains the H1
– Hidden the flash element unless it’s actually used
– Removed nearly all of the default stylesheet. Styling happens after coding! 😉
– Made forms more semantically correct (labels and fields)

These are all changes I would have done manually after the default scaffold.

To use this, download the custom scaffold archive and unzip it to a folder next to the default scaffold. On my machine, at the time of writing I have it in: C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\rails-1.1.6\\lib\\rails_generator\\generators\\components\\custom_scaffold.

Then, instead of running script/generate scaffold, you run script/generate custom_scaffold.

You might want to edit the file layout.rhtml as it currently says “Site by Iain” at the bottom of every page.

let me know if this ends up being useful to you. (I’ve really got to get on and add a decent comments system to my site).

Recursive RSS feeds

Monday, August 7th, 2006

RSS is ace at what it does. It takes the thought out of syndication formats and countless applications support it. The thing is, as far as keeping track of all those feeds go, I’ve got my work PC, my home desktop, a laptop, a podcast aggregator and a bittorrent client aggregating vidcast feeds and TV shows from all over the ‘net. To make matters worse, as soon as I think that I’ve finally remembered which feeds I’m subscribed to and I’ve got them all subscribed in the various places that they’re needed, I see another one I need and they’re all out of sync again.

What I need is an RSS feed *for* my RSS feeds.

Someone has already thought of this, and come up with an XML schema called OPML, sadly it doesn’t seem widely supported either as a data source or by aggregator applications, plus it doesn’t seem all that well designed. Why have a feed of RSS feeds, which is effectively a two-level hierarchy when you could have n-depth and describe any number of feeds-within-a-feed and have just one point of subscription in your clients.

Anyway, until that happens I’ve come up with my own personal stop-gap solution. Using I track which feeds I’m subscribed to. I can then subscribe to the RSS for that page, and any time I pick up a new feed I can add it to the list and the addition will be mirrored in all the applications which are subscribed to it.

Of course, using tags you can slice those feeds any way you want, depending on what the feed is used for, for example I’ve got my podcasts, news and videos which are used by three seperate applications.

Azureus PHP gets CVS server

Thursday, August 3rd, 2006

Ages ago someone asked me if Azureus PHP had a CVS he could subscribe to and get in-development files so I applied to have the project added to Sourceforge. I awaited my project confirmation email from SF and never got one. Assuming that my project had been rejected I forgot about it until a few days ago nosing around the DOPAL project pages and other Azureus-related projects I noticed that I was actually on there!

I’ve just added all the relevant files to CVS, which is one step towards making the project more Open. If you’d like to develop on it, let me know.

I am actually working on an update right now, BTW.

My Podcasts

Friday, July 21st, 2006

Just over a year ago I started listening to Podcasts in a big way and wrote Automated Serendipity to facilitate my new obsession. Since then the feeds I’ve been subscribed to have changed a lot. I keep the feeds list online so that I’m not replicating a list at work and a list at home.

Here’s what’s in it:

Funky16Corners – Miscellaneous funk
Adam and Joe’s XFM podcast – hilariously immature
John Snow’s snowmail – short takes on current affairs by a media hero
The Sounds In My Head – miscellaneous great music
The Bitterest Pill – Basically winey standup comedy material about being a stay-at-home dad’s 1UP Yours – games discussion
Mark Kermode’s Film Reviews – Reminds me why I used to listen to Radio 1. I guess I should listen to Five Live instead, eh?
Channel 4’s music podcast – various unsigned artists from all genres
Engadget – gadget discussion
Inside The Net – Web and internet discussion with the Godfather of IT broadcasting and a Canadian who looks too fit to be into IT
This Week In Tech – Tech discussion with various people who know what they’re talking about
Coverville – Cover versions
Tracks Up The Tree – Random good tunes
I Motor Away – More random good tunes
The Chaos Report – Again, more random good tunes
BBC Radio Newspod – In case I missed the news from the previous day
The Now Show – Punt and Dennis with Marcus Brigstock. Series has ended now but I expect they’ll be back soon enough
Ebrotunes – Mashups
Infinite Potential’s Oddcast – Awesome mixes of UK hip-hop. Get a real RSS feed, guys!
Rhymes and Beats – Hip hop mixes
Radio Clash – REAL alternative music (and currently the only podcast that gives me a heads up to cool goings on at GYBO)
Make Some Noise – Another GYBO connection, just not updated often enough
50 Pound Note – More real alternative and general quality stuff
FreeMotion Hip-hop – Selected hip-hop tracks
FluxBlog – Vaguelly pop-y, sometimes excellent tunes
Soul Sides – Great soul
Moistworks – Soul and funk mainly
Earfuzz – More soul
Lemon Red – Misc hip-hop. Currently taking a break for the summer.
Certified Bananas – Great mixes on the occasion they’re released
Cocaine Blunts – Hip-hop
Beatlife – More Hip-hop
Moebius Rex – More Hip-hop
CCC Mashups – Fantastic mashup mixes
Sploitcast – security hacking discussion
Security Now – Brilliant network security discussion with that Leo bloke and some kind of /ninja/

Now I just need to work out a way of syncing that lot with my new car 🙂

Jumping into Rails

Tuesday, July 4th, 2006

I’ve just picked up Rails after a course at OpenAdvantage (great course BTW, if your feedback form was on the web I would have filled it in guys, and you would have got “excellent” on all counts! Who uses paper feedback forms these days, honestly?!) Having been a PHP developer for about 5 years and having developed web apps in Coldfusion, .NET, Java, ASP and PERL in between I thought this needed a look in. From what I’d seen of Rails, my PHP development was getting incredibly close to what Rails was trying to acheive anyway.

It turns out Rails rocks, but it needs some tweaks to the default install. The problems I have with it at the moment is that although scaffolding is brilliant, the code it produces isn’t. Sure, it’s only supposed to be a “scaffold”, but why should you have to touch it at all? Isn’t Rails supposed to be DRY?

Turns out you can fairly easily create your own custom scaffold which will stop you having to go back and tweak things. I’m going to have a go now, and I’m going to try and “fix”:

– H2 at page start instead of H1s
– OLs for listing objects instead of tables
– Consistent whitespace usage
– Use of a “confirm” page for deleting objects instead of that horrid JS hack that creates a form to post on the fly and uses client validation
– More semantic form markup
– AJAX forms, without any JS on the page prior to onload

If it works I’ll zip up my scaffold and post it on here