Skip to content

Comment on Show HN my christmas project: Focus.app, cut off your Internet so you can focusparent

Comments

Does your solution support: ifconfig down except (site-a.com, site-b.com, site-c.com, site-d.com, site-e.com)

Don't quote me on the exact syntax (I do know the syntax for iptables):

ipfw add allow tcp from site-a.com to any http; ipfw add allow tcp from site-b.com to any http; ipfw add allow tcp from site-c.com to any http; ipfw add deny ip from any to any; sleep $HOWEVERLONG; ipfw flush;

I guess the other way would be simply to do ifconfig up when you need a site and take it down again. I don't tend to use such methods because if I'm really susceptible to distraction something else will distract me anyway. I think that self-discipline could be better (when the urge comes to load twitter, just don't do it).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.