One trick to help get started is to make it just annoying enough to switch to the distracting task that you don't bother. Editing your hosts file which you then have reverse before surfing the distracting stuff, creating a separate login for the distracting stuff, closing your laptop lid on every task switch[1], etc.
[1] http://blog.xkcd.com/2011/02/18/distraction-affliction-corre... This works surprisingly well