Friday, December 18, 2009

Linux Shortcuts and Commands

http://linux.about.com/od/linux101/l/blnewbie5_1.htm
http://www.unixguide.net/linux/linuxshortcuts.shtml

Tuesday, September 01, 2009

GIMP Animated GIF

It is not quite straight-forward to do animated gif.

The following is the solution with GIMP.
http://www.csb.yale.edu/userguides/image/moviemaker/anim_gif.html

Monday, August 24, 2009

职场“冷暴力”

http://www.ftchinese.com/story.php?storyid=001028296

智联招聘网站近日公布一项逾万名职场人参与的调查结果:七成以上的职场人曾遭受过职场“冷暴力”。

在这个崇尚和谐的年代,玩勇斗狠的暴力路线不再时髦,但平静海面下“潜伏”的冷暴力现象,却像泰坦尼克号遇到的冰山一角,远远一瞥,足以令人不寒而栗。初入职场的新鲜人可能会瞪大眼睛抛出疑问——什么是职场冷暴力?

所谓职场“冷暴力”,通常是指上司或同事用非暴力的方式刺激对方,导致对方情绪受挫心灵受伤的行为。打个比方,从前被皇帝抛在脑后长期不理不睬的妃子,遭遇的便是职场冷暴力,如果该妃子甚至被派去打扫庭院端茶倒水,那就是相当严重的职场冷暴力。

我有位八零后闺蜜,自从怀孕之后骤然察觉职场冷暖,在她妊娠反应最严重的怀孕初期,她的老板不仅拒绝了她在家办公的申请,而且大张旗鼓地招聘新人接替她的工作。刚招到人没两天,便要求她抓紧完成工作交接,提前回家“享受”产假外的无薪长假——“不用着急,生孩子是大事,哺乳期结束再回来上班也来得及!”大肚子的闺蜜二话不说收拾东西乐颠颠回家,回过味儿来又忍不住碎碎念——他们这是为我好呢?还是想赶我走呢?

我说,都这么赤裸裸的职场冷暴力了,明摆着想把你扫地出门节约成本,你还看不穿!跟善于算牌的职场前辈相比,有些八零后职场人确实显得天真了那么一点点,别人都快要胡了,自己还傻傻在旁边准备点炮。

正是这类“很傻很天真”的年轻人,往往更容易遭遇所谓的“职场冷暴力”。调查显示,职场人遭受的“冷暴力”中,被打入冷宫“不受领导重用”以44.5%的比例排在第一位,其次是“拼命工作而升职、加薪总是轮不到自己”,比例为41.2%,排在第三位的是“领导时常给自己小鞋穿”,如安排根本不可能完成的任务,比例为29.2%。

刚入职的新人,常会抱怨主管给自己分配的工作技术含量低,公司里的前辈不把自己放在眼里,汇报工作时上司态度不冷不热不置可否,并将之简单归结为“职场冷暴力”,典型言论如下:“哎,成天干活那么辛苦没人体谅,白眼倒是没少捱,真不想在这种充满冷暴力的环境中继续呆下去了!”

其实仔细想想,以上种种算是真正的“职场冷暴力”吗?很多时候,让你做小事是为了奠定做大事的基础,不把你放在眼里是因为你什么都不会,汇报工作收效不佳是因为你没领会领导意图,而不是什么人成心跟你过不去。在这种情况下,与其抱怨遭遇“职场冷暴力”,不如以开放性的状态加强人际沟通和学习,努力提高自身能力和素养,尽快赢得别人的尊重和认可。

真正可怕的职场冷暴力,往往是针对强者的。因为你强,才会招致同事嫉妒,因此遭遇不动声色的联合抵制。在这种情况下,要想跳出受人摆布的境地,只有两件事可做:一是让自己变得更强,强到别人的冷暴力无法阻挡你前进的步伐。二是学会站队的艺术,选择和能够帮助自己的同事和上司站在一起,找到适合自己的位置才能立于不败之地。

所以,当传说中的职场冷暴力发生在你身上时,如果你是弱者,不要抱怨,你所要做的就是努力提高自己的战斗力;如果你是强者,不要惧怕冷暴力的袭击,因为这是你锻炼人际艺术的最佳实战机会,也是通往成功之路的必要考验。

Renew Singapore PR + Apply China Visa 中國簽證

With SingPass and Credit Card,
Singapore PR can renew Re-Entry Permit and update new passport number via the following website:

http://www.ica.gov.sg/page.aspx?pageid=152&secid=150
https://erep.ica.gov.sg/erep/index.do

Fill in everything online. So convenient!!!!

Validity date starts on the renewal day. So renew it on the later day.


Renew Malaysia Passport

Revelent website: http://www.imi.gov.my/index.php?option=com_content&view=article&id=47%3Apma&catid=34%3Apasport&Itemid=34&lang=en

Items to bring:
* Print out the form, 2 sided in 1 paper.
* 2 blue background head photo.
* 1 IC front/back copy in 1 page.
* RM300 for 5 years.

Steps:
1. Go to the queue number counter. The officer will give you form if you haven't prepared and verified your items. Then he will give you queue number.
2. Wait for calling. Submit Form, 2 blue background photo and 1 IC copy.
3. Wait for calling. Submit RM300 payment. You'll get a receipt. The receipt will tell you when the new Passport is ready.
4. Come back 1 hour later, to collect the new Passport.


China Travel Visa application in Singapore

Revelent website: http://www.visaforchina.com.sg/SGP_EN/

Items to bring:
1. Fill in the ONLINE APPLICATION FORM. At the end it will produce PDF document. Print it out.
2. 1 white background head photo.
3. 1 passport copy.
4. 1 IC front/back copy.

Submit the above items to http://www.visaforchina.com.sg/SGP_EN/others/249388.shtml

China Travel Visa application in Malaysia

http://www.visaforchina.org.my/KUL_ZH/sqqzxz/index.shtml

China China Travel Visa application in Macau

Revelent website: http://www.cts.com.mo/visa/htm/vs_t3.htm

I am foreigner working in Macau, blue card holder. I cannot apply China Visa longer than my blue card expire date. So I can only apply 1/2 year multiple entries.


Items to bring:

1. Fill in 中華人民共和國簽證申請表 ( can be downloaded online https://www.google.com/search?q=%E4%B8%AD%E5%8D%8E%E4%BA%BA%E6%B0%91%E5%85%B1%E5%92%8C%E5%9B%BD%E7%AD%BE%E8%AF%81%E7%94%B3%E8%AF%B7%E8%A1%A8 )
2. 1 white background head photo.
3. 1 passport copy.
4. 1 blue card front/back copy.
5. 1 employer letter showing you are working in Macau, with company seal.

Friday, July 17, 2009

Show / Extract content from HttpServlet request

The following code will extract HttpServlet request content.

System.out.println("DUMP HttpServletRequest");
java.util.Enumeration parmNames = request.getParameterNames();
int index=1;
String tem, values[] ;
int temLen; // Length of the tem String array.
while (parmNames.hasMoreElements())
{
tem = (String)parmNames.nextElement();
values = request.getParameterValues(tem);
temLen = values.length;
System.out.print("[" + (index++) + "][" + tem + "][");
for (int i=0; i < temLen; i++)
{
if (i==0)
{
System.out.print(values[i]);
}
else
{
System.out.print(", " + values[i]);
}
}
System.out.println("]");
}

index=1;
System.out.println("DUMP HttpServletRequest Attribute");
java.util.Enumeration attrNames = request.getAttributeNames();
index=1;
while (attrNames.hasMoreElements())
{
tem = (String)attrNames.nextElement();
System.out.println("[" + (index++) + "][" + tem + "][" + request.getAttribute(tem).toString() + "]");
}

Monday, June 22, 2009

Loops in Shell

http://www.softpanorama.org/Scripting/Shellorama/Control_structures/loops.shtml

Loops with PL/SQL

http://www.adp-gmbh.ch/ora/plsql/loops.html

Tuesday, May 19, 2009

Running Firefox 2 and Firefox 3 in the same machine

When doing website development, sometimes we need to see the page behaviour on both Firefox 2 and Firefox 3 for backward compatibility.

Refer to the following articles on how to setup both Firefox 2 and 3 running on the same machine.

http://blog.andreloker.de/post/2008/06/Firefox-2-and-3-side-by-side.aspx
http://www.command-tab.com/2008/06/18/how-to-run-firefox-2-and-3-simultaneously/

Friday, May 15, 2009

Open Citibank account in JB, Malaysia

Citibank branch in Johor Bahru, Malaysia.
http://www.citibank.com/locations/ap/my/johor_bahru/johor_bahru/johor_bahru_br.htm

It opens on 2nd and 4th Saturday morning.

Saving account - RM20 deposit.
Current account (with cheque book) - RM500 deposit.

Bring:
1) IC.
2) Bank statement.
3) Working proof, e.g. employment letter.

TT:
Citibank charges RM46 commision.
Overseas bank charges RM20 commision.

Citi Global Transfer - Fund transfer internationally free of service charge
Singapore - Macau (considered Citibank China)

Friday, March 27, 2009

Fatal error: Allowed memory size of xxx bytes exhausted

Source: http://forum.mamboserver.com/showthread.php?p=56808#post56808

Fatal error: Allowed memory size of 8388608 bytes exhausted

1. Edit php.ini file and restarting Apache:

memory_limit = 32M (add the line if it is missing)

2. If you do not have access to php.ini but your webspace is able to handle ".htaccess" files. Edit .htaccess file

php_value memory_limit 32M

3. Put the following line into the PHP source file.

ini_set("memory_limit","24M");

Sunday, March 01, 2009

Embed music into HTML

《bgsound loop="infinite" src="http://www.sister.co.jp/pettybooka/mp3/ukulele_lady.mp3"》《/bgsound》

(Press Esc to stop the music.)

Thursday, February 05, 2009

Setup Voice for Chatting Software - Microphone Boost

When using Skype, MSN, etc voice chatting software, by default the sound is recorded softly and the opposite party has difficulty to listen clearly.

In Windows XP, we can enable Microphone Boost.

Go Control Panel -> Sounds and Audio Devices -> Audio tab -> [Volume] in Sound recording


Then, in Recording Control -> [Advance] -> tick [x]Microphone Boost


Enable this option will help the computer to boost up the voice. People will listen clearer.

In some of the Voice Chatting software such as Skype and VoipCheap, inside Tools -> Options -> Audio Settings.

There is a setting called "Let Skype adjust my audio settings". The feature will most likely disable the Microphone Boost which you have just set. So untick "Let Skype adjust my audio settings".

Tuesday, January 13, 2009

Online Chat Interface

URL for creating Google Online Chat Badge
http://www.google.com/talk/service/badge/New

URL for creating MSN Online Chat Messenger
http://settings.messenger.live.com/applications/CreateHtml.aspx
(note: remember to "Allow anyone on the Internet to see my online status and send me messages")

Direct click-able link which will need client side software installed:
MSN: msnim:chat?contact=yangchengsoon@hotmail.com
Skype: skype:oraclesoon?call