Prepare a hosts file as
127.0.0.1 news.ycombinator.com
127.0.0.1 reddit.com
127.0.0.1 twitter.com
etc
A shell script to rename the regular hosts file and this one at will. Add it in cron if you want it scheduled.