Created
May 15, 2018 02:54
-
-
Save kuahyeow/f95ab7dd01bc6493362c119a5d160543 to your computer and use it in GitHub Desktop.
A little script to delight the kids - increase the font size in your terminal !
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
def color(index, text) | |
normal = "\e[#{index}m#{text}\e[0m" | |
bold = "\e[#{index}m\e[1m#{text}\e[0m" | |
"#{normal} #{bold} " | |
end | |
if ARGV.empty? | |
puts "Usage: ruby #{__FILE__} NAME" | |
exit | |
end | |
name = ARGV.join(" ") | |
while true do | |
8.times do|index| | |
line = color(index + 1, name) | |
line += color(index + 30, name) | |
line += color(index + 90, name) | |
puts line | |
sleep 1 | |
end | |
sleep 3 | |
system "clear" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment