Skip to content

Instantly share code, notes, and snippets.

@isaacs
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaacs/8994430 to your computer and use it in GitHub Desktop.
Save isaacs/8994430 to your computer and use it in GitHub Desktop.
ips=( 165.225.157.156
skimdb.npmjs.com
165.225.157.64
72.2.119.219 )
pkg=browserify
for i in "${ips[@]}"; do
echo -n host=$i" "
curl -sk https://$i/$pkg -H user-agent:'node/v0.10.23-pre darwin x64' -H accept:application/json -H host:registry.npmjs.org | json _rev
echo -n host=fastly" "
curl -sk https://registry.npmjs.org/$pkg -H user-agent:'node/v0.10.23-pre darwin x64' -H accept:application/json | json _rev
echo -n via npm" "
npm cache clean $pkg
npm view -q $pkg _rev
done
# host=165.225.157.156 697-13b6e4201c37556145bf9bbdee345e18
# host=fastly 695-36528b1c5531b89813482cc05e783bc6
# via npm 695-36528b1c5531b89813482cc05e783bc6
#
# host=skimdb.npmjs.com 697-13b6e4201c37556145bf9bbdee345e18
# host=fastly 695-36528b1c5531b89813482cc05e783bc6
# via npm 695-36528b1c5531b89813482cc05e783bc6
#
# host=165.225.157.64 697-13b6e4201c37556145bf9bbdee345e18
# host=fastly 695-36528b1c5531b89813482cc05e783bc6
# via npm 695-36528b1c5531b89813482cc05e783bc6
#
# host=72.2.119.219 697-13b6e4201c37556145bf9bbdee345e18
# host=fastly 695-36528b1c5531b89813482cc05e783bc6
# via npm 695-36528b1c5531b89813482cc05e783bc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment