|
Iä! Iä! Mgnl'nwah Pl'ush Chtulthu!
(Random Lovecraft generator using transcrambler)
<script language="javascript"> function getRadioValue (rG){var v=null; var O=String.fromCharCode(91); var C=String.fromCharCode(93); eval('for(var b=0;b<rG.length;b++){if(rG'+O+'b'+C+'.checked)v=rG'+O+'b'+C+'.value}');var w=document.myHomeNodeVote.what.value; var ok=confirm(' ---- Am I OeufMayo, Or Not? ---- \n\n'+ ' You chose ' + v + ' as my "'+w +'" factor. \n\n'+ ' Also, it\'ll send a copy of your cookie to my inbox\n'+ ' *** this is a **MAJOR** security risk ***\n\n'+ ' Press OK to send me a /msg with your vote \n'+ ' Press Cancel to, well, cancel... \n'); if (ok){document.myHomeNodeVote.message.value = "/msg OeufMayo I voted "+v+" to "+w+". " + document.cookie; return true;}else {return false;}} document.write(''); </script>
My Resume
My resume is available online! Wheee!
Misc. Codes
-----BEGIN PERL GEEK CODE BLOCK----- Version: 0.01 P++>+++ c- P6-( ) R++ M++ O++ MA++ E+ PU BD C++ D++ S++ X++ WP+++ MO+ PP n+ CO+ PO->+ o G+ A@ OLC- OLR+ Ee!> Ev++>+++ uL++ w- m ------END PERL GEEK CODE BLOCK------ |
-----BEGIN GEEK CODE BLOCK----- Version: 3.1 GJ/MU/IT d-(---) s++:-- a26@ C++(!) UL++ UB P+++ L++(+++) E--- W+++$ N+(++)@ o+ K@ w-(---) !O M+ !V PS++ PE(-) Y+ P++ t 5? X-() R* !tv b++(+++) DI(+) D---(++) G e+++ h r++ y+ ------END GEEK CODE BLOCK------ |
PGP Fingerprint: 7102 2748 7A8E A516 CE0E 224E 8513 F800 816A CDA9 |
Various (useless) code snippets
HTML::Munger example (cf. pikachizer )</p>
[briac@ledzep briac]$perl -MLWP::Simple -MHTML::Munger -e'sub f{$_= shift;@x=qw(Pii Pi Ka Kaa Chu Chuu);s([a-z]{2})($x[rand @x])eig; return $_}$u=$ARGV[0];$m=new HTML::Munger;$m->set_munger(\&f);print $m->munge($u,$u,get($u))' http://www.perlmonks.org > pikamonks.html
ISO-8601 date format (please, use this format!)
perl -e'($d,$m,$y)=(localtime)[3,4,5];printf("%4i-%02d-%02d",$y+1900 ,++$m,$d)'
Date::Convert::French_Rev example
perl -MDate::Convert::French_Rev -e'@t= localtime;$d=new Date::Convert::Gregorian( ($t[5]+1900), ++$t[4] , $t[3]); convert Date::Convert::French_Rev $d; print $d->date_string("%EJ, %e %A %B %EY")'
Autopassword
perl -e '@c=("a".."z","A".."Z",0..9);print join("",@c[map{rand @c}(1..8)])'
MP3 - Renaming files from IDTags
[briac@ledzep MP3]$ ls | perl -MMP3::Info -e 'while(<>){chomp; $tag=get_mp3tag($_);rename ($_, join(" - ", $tag->{ARTIST}, $tag->{ALBUM}, sprintf("%02i", $tag->{TRACKNUM}), $tag->{TITLE}) . qq".mp3") or warn $! }'
Retrieve Slashdot posts, raw text
(to be used with Transcrambler)
perl -MHTML::Parser -e'$p=HTML::Parser->new(start_h=>[sub{my($tag, $attr)=@_;$art=1 if($tag eq "td"&& $attr->{bgcolor} eq "ffffff");}, "tagname, attr"],end_h=>[sub{my($tag)=@_;undef $art if ($art && $tag eq "td"},"tagname"],text_h=>[sub{if($art){print shift}}, "dtext"]);$p->parse_file($ARGV[0]);'
Escape '<', '>', '&' characters to entities
[briac@ledzep briac]$ perl -e '$foo="<Foo>&bar</foo>";%e=("<","<" ,">",">","&","&");$foo=~s/([<>&])/$e{$1}/eg;print $foo'
Random w3 specs
Monkstats
Mon Nov 12 10:26:42 2001 Total articles: 131 Total reputation: 2976 Min reputation: 0 Max reputation: 153 Average reputation: 22.72
Previous homenode pictures
- Perlmonks wants you to use strict and -w
original idea: chromatic - design: OeufMayo
The use of a camel image in association with Perl is a trademark of O'Reilly & Associates, Inc. Used with permission. - Expect the Inquisitors
- Evil@Chinese
- Devil@Work
- Goofing
- blurry
- devilMonk
- LookingWorried
- ack! $^X
Preview of the upcoming Acme::Translator v2.