Last active
June 30, 2016 09:31
-
-
Save moronkreacionz/dcd90d477dbc3cec3ac31142c3e20636 to your computer and use it in GitHub Desktop.
focus-on-self-shell-script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## ## | |
cat ~moronkreacionz/bin/focusonself | |
-- start | |
#!/bin/sh | |
cp -f /etc/hosts_backup_on.0 /etc/hosts_backup_on.1 | |
cp -f /etc/hosts /etc/hosts_backup_on.0 | |
cat /etc/template_blocking_hosts >> /etc/hosts | |
-- end | |
## ## | |
cat ~moronkreacionz/bin/focusonselfoff | |
-- start | |
#!/bin/sh | |
cp -f /etc/hosts_backup_off.1 /etc/hosts_backup_off.2 | |
cp -f /etc/hosts_backup_off.0 /etc/hosts_backup_off.1 | |
cp -f /etc/hosts /etc/hosts_backup_off.0 | |
sed '/#blockingdomains-start/,/#blockingdomais-end/ d' /etc/hosts_backup_off.0 > /etc/hosts | |
-- end | |
## ## | |
cat /etc/hosts | |
-- start: add the below list | |
#blockingdomains-start | |
0.0.0.0 facebook.com | |
:: facebook.com | |
0.0.0.0 www.facebook.com | |
:: www.facebook.com | |
0.0.0.0 snapdeal.com | |
:: snapdeal.com | |
0.0.0.0 www.snapdeal.com | |
:: www.snapdeal.com | |
0.0.0.0 amazon.com | |
:: amazon.com | |
0.0.0.0 amazon.in | |
:: amazon.in | |
0.0.0.0 www.amazon.com | |
:: www.amazon.com | |
0.0.0.0 www.amazon.in | |
:: www.amazon.in | |
0.0.0.0 flipkart.com | |
:: flipkart.com | |
0.0.0.0 www.flipkart.com | |
:: www.flipkart.com | |
0.0.0.0 www.jabong.com | |
:: www.jabong.com | |
0.0.0.0 jabong.com | |
:: jabong.com | |
#blockingdomains-end | |
-- ends here | |
## | |
cat /etc/template_blocking_hosts | |
-- starts here | |
#blockingdomains-start | |
0.0.0.0 facebook.com | |
:: facebook.com | |
0.0.0.0 www.facebook.com | |
:: www.facebook.com | |
0.0.0.0 snapdeal.com | |
:: snapdeal.com | |
0.0.0.0 www.snapdeal.com | |
:: www.snapdeal.com | |
0.0.0.0 amazon.com | |
:: amazon.com | |
0.0.0.0 amazon.in | |
:: amazon.in | |
0.0.0.0 www.amazon.com | |
:: www.amazon.com | |
0.0.0.0 www.amazon.in | |
:: www.amazon.in | |
0.0.0.0 flipkart.com | |
:: flipkart.com | |
0.0.0.0 www.flipkart.com | |
:: www.flipkart.com | |
0.0.0.0 www.jabong.com | |
:: www.jabong.com | |
0.0.0.0 jabong.com | |
:: jabong.com | |
#blockingdomains-end | |
-- ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment