Thursday, April 19, 2007

Beijing trip

I'm going to Beijing next Monday to attend the Zorpia meeting. it will be last until Apr. 28th.

I buy a 子弹头 train ticket today. it will be a cool trip. :)
Wednesday, April 18, 2007

WWW::Mechanize::GZip

well, for some web like mail.yahoo.com, it compressed using gzip.
so when we get the page content by WWW::Mechianize, it may return some content with gziped.

so I would suggest to use WWW::Mechanize::GZip. it handles gzip pretty well.

have fun.
Thursday, April 05, 2007

encrypt a file then decrypt it use key with Perl

well, computer crashes without any reason sometimes, so we need save some important data into somewhere like Email or one subversion repos. but plain text is not so security, it would be better if we use one "key" to encrypt a file, then use this "key" to decrypt it when we need.

sure, I know winrar or something else can do that. but Perl can do that too. :)
just with Crypt::CBC.

I write a simple script to do this task. that's in http://fayland.googlecode.com/svn/trunk/script/misc/dencrypt.pl
pretty easy but useful for me.

try with:
perl dencrypt.pl encrypt mysecretkey E:/1.txt
then decrypt it use:
perl dencrypt.pl decrypt mysecretkey E:/1.txt.encrypt

That's it, enjoy!

Labels: ,