Last active
August 29, 2015 14:03
-
-
Save mattb/90b7d6f9bc1f96ddb3af to your computer and use it in GitHub Desktop.
Check the mayday.us total once every 60 seconds and print stats.
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
ruby -rjson -ropen-uri -e 'last = - 1; while true; dollars=(JSON.parse(open("https://pledge.mayday.us/r/total").read)["totalCents"] - 100000000)/100; puts "$#{dollars} raised. $#{5000000-dollars} to go.#{last == -1 ? "" : " #{sprintf("%6s", "$"+(dollars-last).to_s)} in the last 60 seconds. #{"*" * ((dollars-last)/250.0).round}"}"; last = dollars; sleep 60 ; end' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment