But the trick that really made the difference is this. I run a cron job which will over write the /etc/hosts with a file which has yc/reddit blocked. This way, when ever I open access for good reasons or even to have my 30 minutes per day of YC reading, the file gets overwritten in the next 30 min window and I get fed up with editing it again and again. So I give up and go back to work, sort of like nagging myself very effectively.
Then you just add a 30 minute cron job to do
cp /etc/hosts.override /etc/hosts
Make sure the user who runs the job has permission to overwrite the file.