purl’s posterous

unicode list in one-liner

pp -e 'print eval qq(qq(\\x{@{[sprintf(q(%04x),$_)]}})),qq(\t),sprintf(q(%04x),$_),qq(\n) for 0x0000..0xffff' -o bin/unicodes

Comments [0]

tools for encode & decode of HTML entities

pp -e 'use HTML::Entities; print decode_entities(<>)' -o bin/html-decode-entities
pp -e 'use HTML::Entities; print encode_entities(<>)' -o bin/html-encode-entities

Comments [0]

managed to setup the plone login with SQLPASPlugin

Thanks for the links at http://blog.fourdigits.nl/using-sqlpasplugin-for-mysql-user-authenticating

This helped me to authenticate crypted password stored in mysql, instead of put them inside ZODB file.
One point to note is the hack of valid function can be changed to the single below:

return reference == crypt.crypt(attempt, reference)

and I also do import crypt at the head of this file encrypt.py, it's for safe :)

Comments [0]

Links for CJK compatible

統一碼相容字符 http://zh.wikipedia.org/zh-cn/%E7%B5%B1%E4%B8%80%E7%A2%BC%E7%9B%B8%E5%AE%B9%E5%AD%97%E7%AC%A6

This is what I have talked about at Beijing Perl Workshop 2009.

Comments [0]

PW Workshop

This is for the WFL session demostration.

Comments [0]

The songs I love very much

Comments [0]

Why ADSL is better than DSL for PERL_UNICODE

% echo 调查资料 | perl -e 's{@{[shift @ARGV]}}{INFO} && print $_ while (<STDIN>)' 资料
调查INFO

% echo 调查资料 | perl -e 's{资料}{INFO} && print $_ while (<STDIN>)'
调查INFO

% echo 调查资料 | PERL_UNICODE=DSL perl -e 's{资料}{INFO} && print $_ while (<STDIN>)'

% echo 调查资料 | PERL_UNICODE=DSL perl -e 's{@{[shift @ARGV]}}{INFO} && print $_ while (<STDIN>)' 资料

% echo 调查资料 | PERL_UNICODE=ADSL perl -e 's{@{[shift @ARGV]}}{INFO} && print $_ while (<STDIN>)' 资料
调查INFO

Comments [0]

Waiting for Lord's Grace


         
Click here to download:
Waiting_for_Lords_Grace.zip (5 KB)

Comments [0]

诗篇91 亲近神的必蒙荫庇

住在至高者的隐密处的,必在全能者的荫庇下安居。
我要对耶和华说:“你是我的避难所,我的保障,你是我的神,我所倚靠的。”
他必救你脱离捕鸟的人的网罗,脱离致命的瘟疫。
他必用自己的羽毛遮盖你,你要投靠在他的翅膀底下;他的信实像盾牌,像坚垒。
你不必害怕黑夜的惊恐,或是白日的飞箭;
也不必害怕黑暗中流行的瘟疫,或是在正午把人毁灭的毒病。
虽有千人仆倒在你的左边,万人仆倒在你的右边,但灾害必不临近你。
不过你要亲眼观看,看见恶人遭报。
你既然把耶和华当作自己的避难所,把至高者当作自己的居所,
祸患必不临到你,灾害必不临近你的帐棚。
因为他为了你,会吩咐自己的使者,在你所行的一切路上保护你。
他们必用手托住你,免得你的脚碰到石头。
你必践踏狮子和虺蛇。你必踏碎少壮狮子和大蛇。
耶和华说:“因为他恋慕我,我必搭救他;因为他认识我的名,我必保护他。
他求告我,我必应允他;他在患难中,我必与他同在;我必拯救他,使他得尊荣。
我必使他得享长寿,又向他显明我的救恩。”

Comments [0]

Llama book 5th edition hit paper finally

http://www.china-pub.com/48392

Although O'Reilly site has not yet reflected this fact. Thanks Chunzi for blog this.
After so long wait I am almost lost in waiting, but it get into a surprise in this long journey.

Comments [0]