Scared of the Peacock Revolution since 2006
Blog » Geek Day 5 - Quick nifty hacks you're proud of
I get into trouble for most hacks now, so that rather limits the scope I can respond with. One recent hack I'm rather proud of is a screen scraper I had to write (they don't provide an API for the data I want) that has to login in first. Initally, I was logging in manually then handing off the session cookie. That started breaking for some reason (I found out why later), so, instead of attempting to fix it, I rewrote it to script the entire process.
Another reason hack was for my Facebook SSL Safari extension. Facebook, in its infinite stupidity, has most of the links it puts out hardcoded to http://www.facebook.com/<blah>. This uses more data than they need to, and also means that following a link from the SSL site takes you to the non-SSL one.
The solution was to use a function that checks for a different amount of <a>/<form> tags every 350ms and loops through them all. I can write it nicer (I thought of how in the shower, as you do) but haven't found the time yet. Could do it now though.