check into the browser add on called "Stayfocusd". You can block certain websites, all of the internet, everything except a few allowed websites, etc for a given amount of time (the "nuclear option") or also just limit the amount of time you have available to you to access your "black listed" websites (facebook, etc) or the amount of time you spend on the internet in general.
some people would say it is childish and you should be able to control your use on your own, but oh well. it helps me. especially the nuclear option when i had a paper/presentation to work on in UG