Skip to content

Instantly share code, notes, and snippets.

@Medeah
Last active September 21, 2015 18:04
Show Gist options
  • Save Medeah/a20428f36bf807765808 to your computer and use it in GitHub Desktop.
Save Medeah/a20428f36bf807765808 to your computer and use it in GitHub Desktop.
Simple script to get the newest hostfile from http://someonewhocares.org/hosts/
# This is free and unencumbered software released into the public domain.
# Assume nothing works, and you may be pleasantly surprised; and when it breaks, you get to keep both pieces.
wget http://someonewhocares.org/hosts/zero/hosts && \
echo "127.0.0.1 $(cat /etc/hostname)" >> hosts && \
sudo cp /etc/hosts /etc/hosts.bak && \
sudo mv hosts /etc/hosts && \
grep --color=auto "Last updated" /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment