Created
July 31, 2014 19:51
-
-
Save redperadot/e6231470ff78b5aea494 to your computer and use it in GitHub Desktop.
Revisions
-
Cody Hannafon created this gist
Jul 31, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/usr/bin/env ruby # # vtplayer.rb - A simple script to play vt100 animations. # Made with ❤︎ by [email protected] - v0.1 # # Some places to find vt100 animations: # http://artscene.textfiles.com/vt100/ # http://www.scovetta.com/archives/textfiles/art require 'open-uri' Signal.trap("INT") { puts; exit 0 } abort("[Error] Need a file to play. Give the path of a remote or local file as an argument.") if ARGV[0].nil? path = ARGV[0] file = ( path[0,4] == 'http' ? open(path).read : IO.read(path) ) $stdout.sync = true file.each_char do |char| print char sleep 0.0005 end puts