Skip to content

Instantly share code, notes, and snippets.

@hirakun
hirakun / Snow 2014
Created December 17, 2014 04:27
Snow 2014 - Make your terminal snow with Perl
perl -e 'binmode STDOUT, 'utf8';use Time::HiRes "sleep";$| = 1;$m="\x{2603}";($y,$x)=split(/ /,`stty size`);print "\033[2J";while(1){push @snows,{y=>1,x=>int(rand($x))};for(@snows){print "\e[".($_->{y}-1).";$_->{x}H \e[$_->{y};$_->{x}H$m\e[1;1H";$_->{y}++;shift(@snows) if $_->{y} > $y}sleep(0.1);}'