Skip to content

Instantly share code, notes, and snippets.

@jorisbontje
Created November 14, 2012 10:22
Show Gist options
  • 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