Created
May 1, 2013 09:00
-
-
Save hiroism007/5494392 to your computer and use it in GitHub Desktop.
マトリックスのOPみたいな感じをコマンドライン上で表現
This file contains 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 characters
class String | |
def colorize(color_code) | |
"\e[#{color_code}m#{self}\e[0m" | |
end | |
def green; colorize(32); end | |
end | |
def like_matrix(size=1) | |
[*0..9,*'a'..'z',*'A'..'Z'].sample(size).join | |
end | |
loop do | |
print like_matrix.green + " " + like_matrix.green + " " | |
sleep(0.001) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment