Skip to content

Instantly share code, notes, and snippets.

@GarrisonJ
GarrisonJ / spark.rb
Last active December 10, 2015 13:18 — forked from jcromartie/spark.rb
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
# prints a sparkline in the terminal using the supplied list of numbers
# examples:
# spark.rb 10 20 30 100 90 80
# spark.rb 1 2 0.4 0.1 1.3 0.7
@ticks = %w[▁ ▂ ▃ ▄ ▅ ▆ ▇]
values = ARGV.map { |x| x.to_f }