Skip to content

Instantly share code, notes, and snippets.

@Nikamura
Created February 10, 2016 19:56
Show Gist options
  • Save Nikamura/e864371062a422b51c59 to your computer and use it in GitHub Desktop.
Save Nikamura/e864371062a422b51c59 to your computer and use it in GitHub Desktop.

Revisions

  1. Nikamura created this gist Feb 10, 2016.
    9 changes: 9 additions & 0 deletions btc.30s.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/usr/bin/env ruby
    require 'json'

    begin
    data = `curl -s https://localbitcoins.com/bitcoinaverage/ticker-all-currencies/`
    price = JSON.parse(data).fetch('EUR').fetch('avg_1h').round(2)
    puts "\xEF\x85\x9A #{price} | font=FontAwesome"
    rescue
    end