Skip to content

Instantly share code, notes, and snippets.

@ushis
Created January 16, 2013 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ushis/4545407 to your computer and use it in GitHub Desktop.
Save ushis/4545407 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'terminfo'
system('clear')
y, x = TermInfo.screen_size.map { |d| (d / 2) - 1 }
$stdout.write("#{"\n" * (y - 3)}#{" " * (x - 10)}Man Blowing A Bubble\n\n\n")
indent = " " * (x - 1)
%w(:, :o :O :x).each do |state|
$stdout.write("#{indent}#{state}\r")
sleep(1)
end
system('clear')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment