Skip to content

Instantly share code, notes, and snippets.

@kuahyeow
Created May 15, 2018 02:54
Show Gist options
  • Save kuahyeow/f95ab7dd01bc6493362c119a5d160543 to your computer and use it in GitHub Desktop.
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 !
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