StayFocusd has your back.
Block any sites that take up a lot of your time. You can also block the entire Internet, except for the sites you allow. This mode allows you to focus as much as possible and not be distracted.
Set the rules for blocking by days, exactly when it is most important for you to be in focus and not waste time on distracting sites.
Set individual time settings when you need to be as productive as possible.