Sunday, July 30, 2006
Tuesday, July 18, 2006
procmail msql
http://mt.freebsd.org.hk/archives/000029.html
Monday, July 17, 2006
php mail2db
#!/usr/local/bin/php -q
$fd = fopen("php://stdin","r");
while (!feof($fd)) {
$data = fgets($fd, 4096);
if ( eregi("^From:",$data) ) {
$email = eregi_replace( "From: ", "", $data);
$email = str_replace ("\n", "", "$email");
}
if ( eregi("^Subject:",$data) ) {
$subject = eregi_replace( "Subject: ", "", $data);
$subject = str_replace ("\n", "", "$subject");
}
if ( eregi("^Reply-To:",$data) ) {
$replyto = eregi_replace( "Reply-To: ", "", $data);
$replyto = str_replace ("\n", "", "$replyto");
}
if ( eregi("^To:",$data) ) {
$autoresponder = eregi_replace( "To: ", "", $data);
$autoresponder = eregi_replace( "<", "", $autoresponder); $autoresponder = eregi_replace( ">", "", $autoresponder);
$autoresponders = strstr($autoresponder, "@");
$id = str_replace ("$autoresponders", "", "$autoresponder");
}
$testdata = "$testdata$data";
}
fclose ($fd);
Sunday, July 09, 2006
二孔插座的火線與地線
一般水線的洞比較大,火線的洞比較小,
但因為施工單位有時不會注意施工品質而亂放
不知道是火線還是地線,去買驗電筆來測
使用方式:手碰驗點筆"最末端的金屬",
前端插入插座內驗電筆會發光表示那個是火線(有電),
另一個則是地線了~~
Monday, June 19, 2006
unix log 時間欄位的轉換
1. 以 Excel 打開 logfile 並以空格為分隔欄位
假設時間為 A1 (第一欄) 在右測新增空白欄 B1
在 B1 填上公式 =(A1+8*60*60)/86400+DATE(1970,1,1)
其中 8*60*60 為 UTF+8 所以共 8*60*60 秒
2. 將 B 欄格式改為時間 往下複製 即可
使用 perl
perl -e 'print scalar localtime(x),"\n"'
Sunday, April 09, 2006
小畫家武功秘笈
如果不喜歡複雜的繪圖軟體 有個 阿 Q 先生特別將他小畫家的武功秘笈貢獻給大家
http://home.kimo.com.tw/q3dc.tw/index.htm
其實看了真是不錯喔
對於不喜歡 Photoshop 圖層概念的人 小畫家功能雖少可是也是可以做很多效果喔
Ultimate Boot CD
Or you may need some diagnostic tools into one bootable CD.
Ultimate Boot CD can match your need!
Saturday, April 08, 2006
SSL-Explorer
You can download GPL version at SourceForge web.
http://sourceforge.net/projects/sslexplorer/
You can install SSL-Explorer on Microsoft Windows XP/2000/2003 and Red Hat Linux 8.0.
It can support Active Directory authentication and UNIX authentication, or you can use Built-in database authentication if you want to manage accounts by yourself.
