Skip to content

Instantly share code, notes, and snippets.

@lukaszkorecki
Created December 7, 2012 11:38
Show Gist options
  • Save lukaszkorecki/4232742 to your computer and use it in GitHub Desktop.
Save lukaszkorecki/4232742 to your computer and use it in GitHub Desktop.

ruby winter.rb

# encoding: utf-8
def w;f="❄❅❆❈❊";x=[];x << "☁ "*10;(0..100).to_a.map{|z|z=f.split('').sample;rand(10)%5==0?z:" ";}.each_slice(10){|s|x<<s.join(' ')};x<<" "*20;x<<"☃ "*10;x.join("\n");end
while(true)do;puts "\e[H\e[2J";puts w;sleep 0.5;end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment