Skip to content

Instantly share code, notes, and snippets.

@im-grey
im-grey / soma.rb
Created July 29, 2017 08:43 — forked from pachacamac/soma.rb
soma
#!/usr/bin/env ruby
require 'json'
def load_json(url) JSON.parse(`wget -q -O- #{url}`, symbolize_names: true) end
class String
#extend: http://misc.flogisoft.com/bash/tip_colors_and_formatting
def black; "\e[30m#{self}\e[0m" end
def red; "\e[31m#{self}\e[0m" end
def green; "\e[32m#{self}\e[0m" end