Posts

Showing posts from 2006

關聖帝君救刧度人指迷篇

大劫凜凜在眼前 五魔掃世甚兇嚴
各人提防早修善 莫到臨時後悔難

指迷篇 說明白 這個時候快修德
眼前劫 甚厲害 萬年罪賬得清白
眾神聖 早安排 冊子卯簿造出來
命還命 債還債 命債帳債脫不開
天罡星 地煞怪 一齊差下凡間來
花世界 齊鬧壞 鬧成殺砍亂世間
普天下 一齊亂 諸色等人不得安
遍地賊 千千萬 個個英雄稱好漢
有的奪 有的騙 有的撈住要銀錢
賊子亂 兵馬現 人人逼得沒法站
有的撞着炮子死 有的刀下染黃泉
有的火中把命斷 有的跳水歸陰間
一切皆是前世造 前世造孽今生還
前生造 今生報 今生報應絲毫照
人有罪 神知道 人人頭上插旗號
不認人 認旗號 照着旗號遭實報
插青旗 使炮叫 插紅旗者用火燒
插黑旗 水溺竅 插白旗者吃鋼刀
惟有積福行善好 插着黃旗神聖保
人善獲褔神雖保 不如修道出刧濠
世人快把大道找 不尋大道脫不了
這一劫 無邊寛 血流成河骨堆山
修道人人出刧走 無道之人難出圈
眾神聖 空中站 都在空中把賬算
誰人徴 誰人欠 誰人該與誰人墊
誰人前世作了惡 誰人前世行有善
折一折 算一算 只看餘惡或餘善
餘剩善 神保看 神看保護常平安
餘剩惡 神罰愆 神聖罰愆遭魔難
遍地亂 加澇旱 雜災疾病裏外傳
又忍饑 又遭亂 不定因嚇把命斷
算一算 真可嘆 將來世上損人烟
十分之中死九分 脫出一分是神仙
算盤算 天花轉 絲毫不能差一線
徵命還得使命補 欠賬終得去償還
世上人 早看穿 早早吃齋把佛念
守佛法 誦經卷 經卷能解罪萬千
徵命不用使命補 欠債不教去填還
紅塵世 不可戀 看着雖好不能遠
花世界 雖然好 長戀終久沒下稍
貪口褔 吃肉香 俱是造的寃孽賬
吃四兩 還半斤 誰肯讓誰半毫分
吃的多 造罪多 罪造滿了不能活
壽限完 吃着難 閻王發票出了簽
差小鬼 到跟前 手拿鐵鎖就來拴
三更拴着三更死 誰能留到五更天
不論忙 不論閒 不論啥事齊丟完
咽喉氣 倏時斷 雙眼一瞪不週全
銀子錢 拿着難 落得兩手攢空拳
實可憐 到陰間 小鬼撈住打的歡
小鬼打 無處鑽 還得跟着去見閰
惡狗村 惡狗攔 咬得渾身血流川
亂鬼莊 鬼要錢 羣鬼拉住心膽寒
狼牙嶺 刺針山 都得壓頂翻一翻
渾身上 皮肉爛 小鬼拉住去交簽
森羅殿 甚威嚴 牛頭馬面站兩班
閰王爺 坐中間 判官執着卯簿單
察你善 察你惡…

救劫仙方

懷抱淨瓶出天宮 眼前劫運來得凶
莫說吾神是邪教 只因甲子三千中
吾站雲端慧眼看 珠淚滾滾下南天
手提仙桃四兩半 枉費吾神落凡間
吾下紅塵把汝勸 犬豕二年看的端
看看人民要遭難 特來指點離廣寒
三三七八汝觀看 可憐蒼生盡死完
老者死於溝壑內 少者拋屍在路邊
高房瓦屋無入站 妻室兒女不團圓
千人共塚真傷慘 萬人同穴實可憐
惡人難免大劫挽 善者本身能保全
大路通衢無人走 血水成河骨堆山
屍橫遍野無人管 豺狼虎豹把人餐
二八月來狂風起 三七之月更慘然
四九拾月大劫到 十分之中無二三
惟有南陽殺星現 男男女女不週全
岳地廣女真傷慘 江南巴州民不安
榮陽三縣民遭難 十分之中九分難
漢口建州梓潼縣 禾苗盡行乾死完
闌州保寧乾八縣 家家戶戶斷人烟
漢中少食饑渴半 更比上年慘幾畨
山陝兩省更遭難 徐州三縣刀兵搬
西鄉一縣人烟斷 老老少少盡死完
人民各處死一半 老少在外不週全
倘若凡民不信善 看看劫運在眼前
水流東海難回轉 各省人民不安然
孝弟忠信得久遠 忤逆不孝要收完
山中禽獸作棺板 一失人身萬劫難
有人傳過府州縣 聖諭勸世四方傳
若還見者不能勸 口吐鮮血喪黃泉
每逢廟內講一遍 一方之中能保全
吾今講諭來相勸 又怕無人把板刋
有人能行此等善 蟠桃會上成神仙
口中講諭多費倦 不知刷板在世間
倘若凡民真心現 朔望香灼點灶前
灶王尊經念數遍 北斗尊經免罪愆
倘若凡民真心念 不枉吾神走一番
改過從善聽吾勸 逃出劫運是神仙
回頭望民心中喜 轉身騰雲到西天
吾今下凡把壇降 與汝指點大劫年
冬月十九離南海 臨凡降諭世間傳
香山寺院把諭指 特來降像借口言
因為凡民不信善 五倫八德盡拋完
灶君壹日奏三次 上帝聞奏怒沖冠
玉旨一刻傳下殿 大劫現在這幾年
天羅地網來下界 二十八宿盡臨凡
各處魔王一齊到 殺盡天下絶人烟
刀兵水火一齊現 高山平地是一般
山禽水族都遭難 拋屍露骨歸黃泉
拾月二十三夜晚 滿天星斗盡落完
上皇玉旨真傷慘 忙跪通明苦哀憐
上皇不許把本奏 要把孽民盡收完
領旨七次把民勸 凡民不信欺神仙
把吾眨下南海岸 為民失了普陀山
七日跪懇靈霄殿 勸民苦心難數完
仙佛上殿拏本見 才保吾的位還原
吾把天機都說現 凡民說吾是誑言
行惡之人有大難 行善之家保週全
吾將善惡分兩體 莫把好…

How to apply multiple rules for 1 email

Scenario: I meet a case which need to filter out the email with the following pattern:

Symbol: xxx
Price: xxx
Target: xxx

At first, when I do the following in procmailrc:

* .*Symbol:.*Price:.*Target.*

I still cannot filter out the email.

After surfing the web, if you want to apply more than 1 rule, you need to divided it so that 1 line account for 1 rule. In this case, there are 3 rules:

- Symbol:
- Price:
- Target:

So, my procmailrc is written as follow:

* .*Symbol:.*
* .*Price:.*
* .*Target:.*

Than, it works!

Hope some body would find it help.

Speed up MySQL connection

According to:

http://forums.mysql.com/read.php?24,23390,23395#msg-23395

Slow connection is mainly due to slow DNS resolve process. Other than adding a host-IP value pair in Linux /etc/hosts file, I added the following line in /etc/my.cnf :

[mysqld]
skip-name-resolve

It can definitely make your mysql connection instantaneous! The only drawback is that you can only connect to your mysql databases using IP but not host name.

Hope it helps.

Is it possible to make a backup automatically apart from doing it manually from the management server ?

Run this in crontab:

#> echo "START BACKUP" | ndb_mgm

Ref: http://archive.netbsd.se/?ml=mysql-cluster&a=2005-03&t=699920

How to disable beep sound in Ubuntu command line?

To disable beep in terminal, type the following in bash shell:

echo "set bell-style none">> ~/.inputrc

Ref: http://bamanzi.blogeden.cn/post/110848/1069

Problem and solution of: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client

Background: Just upgrade from MySQL 4.0 to Mysql 5.0. First stop the MySQL 4 services > run the MySQL 5 installer > Rename the services name from 'Mysql' to 'Mysql5' if you have the problem that the mysql services name is conflicted. After that, using PHP 4.3.3 > use mysql_connect to connect to this server > the above problem exist.

Problem: Error: "mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client"

Solution:This is the problem of old_password in Mysql 4. In short, after upgrading to mysql 5, the encryption method of user's password is different from mysql 4. If you CREATE A USER IN MYSQL 5, since the password encryptio method will be different from mysql 4, even if the username and password are exactly the same, you cannot connect to this brand new mysql 5 server.

To solve: I use Mysql administrator provided and freely download from www.mysql.com. Login to database FROM LOC…

How to remove symbolic link in Linux

Syntax:

unlink

How to install BerkeleyDB without perl -MCPAN -e shell?

Using:

yum -y install perl-BerkeleyDB

insteed.

How to setup vsFTP

System: Fedora Core 5, with all updates.
vsFTP version: 2.0.4, but at the time of writing this, the latest version is 2.0.5

Scenario: Config to allow BOTH real account and anonymous account come in.

Concept: My through is: if we allow both real and anonymous account come in, first anonymouse_enable=YES and local_enable=YES, write_enable=YES also.

For security reason, chroot_list shoule be YES and add a chroot_list file also.
For the same reason, user_list should be YES and add a user_list file also.

Here comes to the hard part:

- Assume that the default ftp folder is /var/ftp, inside this folder there is a folder call pub
- Assume also that there is another folder called /home/myFTP, which is a home folder for user: myFTP.

BY DEFAULT, /home/myFTP can only be accessed by myFTP only. i.e. file user and group are both: myFTP

If I want to access /home/myFTP through FTP, first mount the folder:

mount --bind /home/myFTP /var/ftp/pub

The above command means: when I accessd /var/ftp/pub, I will ge…

How to setup Microsoft FTP server in IIS (Windows 2003 OK)

Scenario: Your boss required you to establish one FTP account for a group of people to use in a project. The account used by these people is read only.

The file structure of IIS FTP is as follow:

C:\Intepub
|
|---ftproot
|
|---FTPUserA
|---FTPUserB
|---(NewFTPAccountForThisProject - All files should be read only here.)

The steps are as follow:

1) In W2K3, create a user named 'proj' and corresponding password.
2) Under ftproot, create a folder called 'proj', which is the SAME NAME as the user you created before.
3) Here comes to the hard part:
In 'ftproot', user rights of 'proj' should be assigned to: read only. i.e. in 'Security' tab, user 'proj' should be added and only 'read' is checked, other rights are left unchecked.
In 'proj' folder, remove all default users in 'Security' tab > add back 'administrators' and 'proj' > 'administr…

Spamassassin 0/0 problem: Caused by spamc/spamd

After you installed spamassassin through either perl or tar, you may want to test your spamassassin by issuing the following command:

#> spamc -R < Your_test_message

However, what you get is just:

0/0

According to spamassassin documentation, it is caused by "error".... but the point is, what is this error? How did it come from?

One of the reason for this error may be caused by: you haven't start your spamd:

To start spamd explicitly, type:

#> spamd&

The '&' sign means to put 'spamd' run in the background.

Once I typed this command and issue the spamc command again, it works:

#> spamc -R < Your_test_message

So, if you want to use spamassassin, please make sure you start your spamd first before testing spamc.

Del.icio.us: Add me to your network!

How to deny/block root login in SSH

To block/deny root login in ssh, do the following (under FC4/5)

1.>vi /etc/ssh/sshd_config
2.Find the line:

#PermitRootLogin yes

Uncomment this line and change the word 'yes' to 'no' as follow:

PermitRootLogin no

3.Restart SSH: /etc/init.d/ssh restart

Finished!

Although user cannot login as root directly through SSH, they can login as normal user and 'sudo su -' to login as root. Please be careful.

How to update Spamassassin?

By issuing the following commands, spamassassin is updated from 3.1.3 to 3.1.4:

> wget http://apache.netsolutions.com.hk/spamassassin/source/Mail-SpamAssassin-3.1.4.tar.gz
> rpmbuild -tb Mail-SpamAssassin-3.1.4.tar.gz
> cd /usr/src/redhat/RPMS/i386/
> /etc/init.d/spamassassin stop
> rpm -Uvh perl-Mail-SpamAssassin-3.1.4-1.i386.rpm --nodeps
> rpm -Uvh spamassassin-3.1.4-1.i386.rpm
> /etc/init.d/spamassassin start

I dunno if using --nodeps in perl-Mail-SpamAssassin will cause any errors. People who follow these steps should pay serious attention.

Hope it helps somebody!

Mozy - Online backup

Online Backup made easy! 2GB free space to start backup your data online!

https://mozy.com/?ref=E3LG2M

How to change SSH port to another one?

Reference(Chinese): http://live.fect.com.tw/modules/newbb/viewtopic.php?topic_id=138&forum=4

To start change SSH port, you can follow these steps:

1. Find this file: /etc/ssh/sshd_config and open it using your favourite editor(e.g. vi)

2. Find this line: #port 22. This line is commented out by default and it is usually the first line of sshd_config file.

3. Remove the '#' of this line, and change the number 22 to another number, like 1234. This is the port number you would like to use.

4. Restart SSH: /etc/init.d/sshd restart

Completed!

Remember to config your iptables/firewall to accept new port and (preferrably) block all port 22 traffic.

About using the toggleMenu javascript

Please note: the following javascript is worked ONLY IN IE only, it cannot be used under FF... Dunno why:

function toggleMenu(oA){
var oTd = oA.parentElement;
var cSpan;

if (oTd != null && 'undefined' != typeof(oTd)){
cSpan = oTd.getElementsByTagName("div");

if (0 < cSpan.length){
if (-1 != cSpan[0].id.indexOf("something")){
if ('none' == cSpan[0].style.display){
cSpan[0].style.display = 'block';
} else {
cSpan[0].style.display = 'none';
}
}
}
}
}

Usage:

<tr><td><a href="'javascript:toggleMenu(<tag_ID_attribute_with_words_'something');'">My Link</a></td></tr>
<tr><td><div id="<tag_ID_attribute_with_words_'something' " style="'display:none;'">Some content</div></td></tr&g…

How to solve "Virtual machine kernel stack fault (hardware reset) " problem?

Source: http://www.virtualization.info/2005/11/how-to-install-sun-solaris-10-inside.html

I read this page to install my Solaris 10 01/06 (32 bits) version.

The main point of this problem is: you did not assign enough RAM to your Virtual Machine, the RAM must be higher than 170MB( Originally I only assign 160 MB...).

Once increased the RAM size, the installation run smoothly.

Hope it helps all.

How to kickout a user/kick a user in Linux

Source: http://www.howtoforge.com/forums/showthread.php?t=1033

In my case, I use putty to login to my local linux machine but suddenly I got hung up in putty. I login again to linux console and do kick out user (myself!!)

The key point is, use "ps -aux | grep ssh" to get the user who login as SSH, if a user is not login using SSH, go grep the user name. Then find the Process ID(PID) of that particular user. Finally, issue "kill -9 ". So my steps will be:

1. ps -aux | grep ssh
2. kill -9

Finally, restart putty session and login again.

How to disable SELinux

Using your favourite editor, find the file: /etc/sysconfig/selinux, change

SELinux=enforcing

to

SELinux=disabled

I am using FC5, hope someone who want to know this can help.

Source from this site: http://blog.yam.com/samtz/archives/268254.html

Thanks for help.

"Fatal error, run database recovery" problem

If you encounter the following problem during install/update in Linux (In my case it is SuSE Linux 10.0), it is probably that you run BOTH "install new update" and "Update" at the same time.

db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery

To resolve this problem, in command prompt, issue the following command:

rpm --rebuilddb

to rebuild the RPM db as it is already corrupted.

Hope it helps.

New experience on using SpamAssassin - 2

My bad day today. Here is my solution (hope) on fixing the problem of Spamassassin about a question that spamassassin cannot identify a spam:

At first, I try to identify the problem but no luck.The final decision I made was: uninstall the package.So, firstly I type:rpm –e spamassassin# successthen I type:yum install spamassassin # successThe above install script ONLY install the Fedora 4 version, at writing time is 3.0.6-1.However, in the official website the latest stable version is 3.1.3.Then I uninstall that old version.Reinstall the new version in tar.gz format.Since I am not very familiar with using tar.gz to install (Well, actually I did the following: perl –MCPAN –e cpan> cpan Mail::SpamAssassin make make install however no luck again), I just gave up using that method and using another rpm method: rpmbuild.Please alert that: rpmbuild is, by default, NOT INSTALL together with Fedora 4.So to use the rpmbuild function, first install rpm-build by typ…

New experience on using SpamAssassin

- To test if spamassassin worked, use:

spamc -R < /usr/share/doc/spamassassin-/sample-spam.txt

It will return the report which identified if the message passed in is a spam or not.


- To use spamc in procmail for large size email:

I have read several online document that to combine spamassassin and procmail, administrator should add the following line in /etc/procmailrc

DROPPRIVS=yes

:0fw
| /usr/bin/spamc

The above 2 lines pipe the message to spamc. To enable large email support, add the following:

| /usr/bin/spamc -s 8000000

which, 8000000 is the size in KB of email. In other words, user can add suitable spamc switch of spamc which suit your needs.

However, I still cannot find any solution on how to solve the 0/0 problem when, at first, when I run the spamc test, I just got 0/0. Then after run several "spamc" command, it works again...

Strange...

My experience on using Darvas Box

This is my first blog about stocks.

First of all, if you have already read the book written by Nicolas Darvas named "How I Made $2,000,000 in the Stock Market", you will know what this box is, and I won't explain it here.

After 1 month more practise(using my real money and make some dummy decision), I found that there are several points worth notice. Before going on, reader should alert that this is my experience, and this doesn't consitute to any suggestions and the writer(that's me) won't take any responsibilities regarding to this.

1. What the book said: when the price rises higher than previous top price, even if how small the new price exceeds, we should buy the stock at once.

My experiences: This is correct, PROVIDED THAT the price flow before the "sudden rise" is flat. For example, if stock A's price range is: $0.6 - $1, and this range is formed for quite a long time, say from Jan 01 - Jun/Jul 01, and suddenly the price rise with high volu…

The solution of "DCOPserver" error

Scenario: on 10/5/2006, I normally start my linux using root account. Maybe my machine is too old (bought 10 years ago: Pentium 3 450, 384MB ram, 10G HD), when I opened firefox, Kate(a notepad-like text editor), Konqueor(with a java page loading at the same time) and Openoffice Calc(a M$ spreadsheet file), the system got hung up...

Since I cannot press Ctrl-Alt-Del to reboot linux, I press the "reset" button on my computer (Cold reboot), and when the machine reboot and go to GRUB, it delayed for serveral seconds, then go to login page successfully. Once I type the root username and password, I got the following error:

...
Cannot read network connection list:
/root/.DOCPserver_linux__0

...make sure your DCOPserver is running...

Solution:
At first, I reboot the machine but no luck.

Then I google the phrase: network connection list, a user in a forum mentioned that people who got this problem should cleanup the /tmp folder under /. I did it immediately.

BTW, although I cannot login …

Sendmail relay config

To allow relay of certain host, add a new record in /etc/mail/access in sendmail server. For example, if you want your sendmail server to be used by an outsider who want to send email to another outsider(relay), add a record in /etc/mail/access file as follow:

youcanrelaymyserver.com
youcanalsorelaymyserver.net
youcanrelaytoo.org

Sendmail config

I received an error about "mail loops back to me" in sendmail today.

I found several solutions from Google below:

- add your hostname in /etc/mail/local-host-name
- DNS error
- add your hostname in /etc/sendmail.cw (actually I cannot find this file, but the whole idea is, add your hostname to Cw file and everything will be ok).

But none of the above work.

It is also not caused by spamassassin(an anti-spam linux software from apache) as the correct answer is:

Don't config the SMART_SMTP option in sendmail.mc

After I add "dnl" before the above directive to disable this, I can send email from my company to Gmail, and from Gmail to my company account.

That's it. Just log it in case I forgot.