Selfcontrol (free; Mac only, Linux alternative here): This app pretty much only does one thing. Prevent you from accessing the internet for a set period of time without allowing you to overrider the disconnect. Essentially, if you have to reconnect before the timer runs out you'll have to change around some system config files. While I've only tried this a handful of times, I'm surprised to say that it does work... but it takes a lot of willpower to click on the start button. Also, it might be a good idea to turn off the iPhone/BlackBerry/other Smart Phone as well, incase you get tempted to use that instead.
Freedom ($10; Mac and Windows): Like Selfcontrol Freedom offers similar abilities of being able to disconnect yourself without an option to reconnect before the timer is done.
While I think that these applications alone may not help you get rid of your habit of browsing youtube videos or checking Facebook videos, they may prove to be helpful when you're really under a deadline and can't afford getting side tracked even for a few minutes.









