Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Check the total once every 60 seconds and print stats.
ruby -rjson -ropen-uri -e 'last = - 1; while true; dollars=(JSON.parse(open("").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
You can’t perform that action at this time.