Created
December 17, 2014 04:27
-
-
Save hirakun/a100fca2e0ea1e5f7a6d to your computer and use it in GitHub Desktop.
Snow 2014 - Make your terminal snow with Perl
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
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);}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment