Skip to content

Instantly share code, notes, and snippets.

@jonleung
Created September 26, 2011 10:26
Show Gist options
  • Save jonleung/1241985 to your computer and use it in GitHub Desktop.
Save jonleung/1241985 to your computer and use it in GitHub Desktop.
HerokuPoke
count_sheep () {
COUNTER=100
while [ $COUNTER -gt 0 ]; do
echo $COUNTER
sleep 1
let COUNTER=COUNTER-1
done
}
function poke {
if curl $1 2> /dev/null | grep -q -i "html"; then
echo OK $1
count_sheep
else
echo -en "\007"
poke $1
fi
}
while :
do
poke "jonathanjl.com"
poke "cis195.com"
poke "slidefeed.com"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment