I don't use any external scripts, I just set mine to block problematic domains for me (places where I find I sink a lot of time, HN, Reddit, Twitter are the primary ones), and usually I make it close my IM client (or sometimes set my status to Busy), close Twitter, and my feed reader. Then I'm good to go.
I find 50 minutes is a good duration for me. During the ten minutes downtime in an hour, I let myself read Twitter, and get up and walk around the office. Then back to work.
It's marvellous for staying on task.