Skip to content

Instantly share code, notes, and snippets.

@gudmundurh
Created March 9, 2009 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gudmundurh/76322 to your computer and use it in GitHub Desktop.
Save gudmundurh/76322 to your computer and use it in GitHub Desktop.
Fork of CNN dada by Páll Thayer (GPLv3) http://pallit.lhi.is/microcodes/
#!/usr/bin/perl
use LWP::Simple;
`clear`;
$width = `tput cols`;
$height = `tput lines`;
$text = get 'http://rss.cnn.com/rss/edition.rss';
$text =~ s/<[^>]+>//g;
@words = split ' ', $text;
sub color { "\e[", 31+int(rand(7)), ";40m", @_, "\e[0m" }
while(1){
system 'tput', 'cup', int(rand $height), int(rand $width);
print color $words[int(rand @words)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment