Skip to content

Instantly share code, notes, and snippets.

@schliflo
Created September 7, 2017 09:09
Show Gist options
  • Save schliflo/5534913fc40ccb7263e60944ca581a6c to your computer and use it in GitHub Desktop.
Save schliflo/5534913fc40ccb7263e60944ca581a6c to your computer and use it in GitHub Desktop.
bash one-liner to find the nearest DigitalOcean data center
for DC in nyc1 nyc2 nyc3 ams2 ams3 sfo1 sfo2 sgp1 lon1 fra1 tor1 blr1; do echo "$DC: $(ping -i .1 -c 100 -q speedtest-$DC.digitalocean.com | awk -F/ '/^round|^rtt/{print $5}')"; done | sort -n -k2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment