Created
November 14, 2012 10:22
-
-
Save jorisbontje/4071385 to your computer and use it in GitHub Desktop.
Heroku total number of dynos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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