Putting this in my hosts file helped me maintain my focus.

127.0.0.1 news.ycombinator.com

127.0.0.1 reddit.com

127.0.0.1 facebook.com

for good measure, here are 83k additional domains:

https://github.com/StevenBlack/hosts