Skip to content

Instantly share code, notes, and snippets.

@joker1007
Created July 30, 2013 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joker1007/6109962 to your computer and use it in GitHub Desktop.
Save joker1007/6109962 to your computer and use it in GitHub Desktop.
Earthquake.init do
output do |item|
next unless item['text']
next unless config[:separator]
unless config[:screen_width]
begin
require 'curses'
screen = Curses.init_screen
config[:screen_width] = screen.maxx
Curses.close_screen
rescue LoadError
config[:screen_width] = 72
end
end
puts config[:separator] * config[:screen_width]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment