Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fish compatible version of productivty scripts https://gist.github.com/bennylope/dd0c723b6586ded254b3bd673a7861a3
function slacktime
while read line;
if [ (string match "*WORKTIME" "$line") ]
continue
else
echo $line
end
end < /etc/hosts > /tmp/hosts
sudo cp /tmp/hosts /etc/hosts
end
function worktime
while read line;
echo "127.0.0.1 $line # WORKTIME"
echo "fe80::1%lo0 $line # WORKTIME"
echo "127.0.0.1 www.$line # WORKTIME"
echo "fe80::1%lo0 www.$line # WORKTIME"
end < $HOME/.blocked_sites | sudo tee -a /etc/hosts > /dev/null
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment