Skip to content

Instantly share code, notes, and snippets.

@solidsnack
Created January 12, 2011 22:32
Show Gist options
  • Save solidsnack/777035 to your computer and use it in GitHub Desktop.
Save solidsnack/777035 to your computer and use it in GitHub Desktop.
#!/bin/bash
function hosts_fetch {
mkdir -p ./tmp
dig heroku.com > ./tmp/dig.list
}
function hosts {
sed -n '/^;; ANSWER SECTION:$/,/^$/ {
/^heroku\.com\..*[^.0-9]\([.0-9]*\)$/ {
s//\1/
p
}
}' < ./tmp/dig.list
}
function trial_run {
for host in $(hosts)
do
echo "## $host"
time curl -I -H 'Host: heroku.com' http://$host
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment