Skip to content

Instantly share code, notes, and snippets.

@ramn
Created March 26, 2013 10:26
Show Gist options
  • Save ramn/5244400 to your computer and use it in GitHub Desktop.
Save ramn/5244400 to your computer and use it in GitHub Desktop.
Watch Bitcoin last price (shell)
CMD='last=JSON.load(ARGF.read)["data"]["last"]["display"]; puts "#{Time.now}: #{last}"'; watch "curl https://data.mtgox.com/api/2/BTCUSD/money/ticker 2>/dev/null | ruby -r json -e '$CMD'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment