The one I've found that's worked best for me is a Chrome extension called Delayed Gratification that actually only delays my access to the site for 30 seconds. It's enough that I can convince myself to sit there and wait for 30 seconds rather than turn it off when I really want access to the site and feel it's justified.
But 30 seconds is also a decent amount of time to convince myself that I don't really need to see that site right now, and often I'll just close the tab a few seconds in and get on with work.
Self-control only goes so far, but if (like me) you have trained yourself to flick to reddit as soon as you get even slightly bored, it's a good way to untrain that behaviour.
I'm in this camp--if I'm working on something in a browser and I get bored, my reflex is to open a new tab and do HN or reddit before I know what I'm doing.
Did a combination of Chrome/Safari nanny plugins for a while, but the effort of `sudo` + password seems to be working better and is a bit easier to turn on/off for me.