Skip to content

Instantly share code, notes, and snippets.

@jorisbontje
Created November 14, 2012 10:22
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 jorisbontje/4071385 to your computer and use it in GitHub Desktop.
Save jorisbontje/4071385 to your computer and use it in GitHub Desktop.
Heroku total number of dynos
#!/bin/sh
# Return total number of Heroku dynos for an account
#
# Uses:
# jutil <https://github.com/misterfifths/jutil.git>
# underscore.js <http://underscorejs.org/>
API_KEY="<your Heroku API key>"
curl -s -H "Accept: application/json" -u :$API_KEY https://api.heroku.com/apps | jselect 'dynos' | jutil 'return _.reduce($, function(memo, num){ return memo + num; }, 0);'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment