Some ramblings and reflections on life.

Tuesday, September 05, 2006

Moving on...

This blog has moved to: http://anchorvale.wordpress.com

The frequent outages at blogger.com has been frustrating. Not to mention the lack of trackbacks and categorization.

So, please update your bookmarks and let's go over now! :-)

http://anchorvale.wordpress.com

--
sc

Friday, June 23, 2006

Happy birthday to me

祝我生日快乐, 祝我生日快乐。。。

:)

Wednesday, May 31, 2006

Deja Vu

Have not had this fatigue feeling for quite some time. Today it came back to me again.

The familiarity of it all: having to take deep breaths, pinching the area between the eyes, trying to catch a few winks even while riding up the escalators, etc.

Praying that the next few days will not be as draining.

Tuesday, May 23, 2006

1+1 cannot be equals to 3 wat

A light-hearted cartoon, illustrating the importance of discerning the truth from fiction. It comes in both Singlish and Hokkien versions. :-D



Created by Singapore Youth For Christ (SYFC).

Sunday, May 21, 2006

Mini movie marathon

Yesterday, on a hot Saturday afternoon, SY and I headed to Balestier Cineplex to catch Poseidon movie. After 90 mins of breath-taking action, we proceeded to catch another movie at the same cineplex - Over the Hedge.

Our first mini movie marathon. :-)

Saturday, May 20, 2006

Error at GV website

After hearing countless positive reviews about the MI3 movie, SY and I finally decide to catch it today. But oops, we had a hard time trying to book the tickets from GV website. Keep on getting this error:



Must be one of the signs of an improving economy. ;-)

Thursday, May 18, 2006

Diesel car?

Was toying with the idea of getting a diesel car. In fact, I spotted a Renault Kangoo on sgCarMart that is quite cool:



However, the high price of the diesel road tax is too much of a put-off.

After doing some calculations, I realise the savings on buying diesel fuel is not sufficient to offset the much higher road tax.

So, my car-owning dream gets shelved once again. :-)

Preparing for World Cup

Wow, a health advice by CNA: http://www.channelnewsasia.com/stories/health/view/208783/1/.html , warning of increased cardiac arrests during the previous World Cups.

"In the 1998 World Cup, the number of heart attacks in Britain rose by 25 percent when England lost to Argentina in a penalty shootout, according to a study in the British Medical Journal (BMJ).

Compared with admissions for the same day in previous years, 55 more people were treated for a heart stoppage as a result of the match, say the University of Birmingham researchers"

Better start preparing my heart now by watching more late-night soccer. Haha. :D

Sunday, May 07, 2006

Opposition improves performance in GE2006

In GE 2006, Singapore's Opposition parties have been given a stronger support by the people.

In particular, the Workers' Party (WP) saw its percentage of votes rose sharply to 16.34%, up from 2.7% in the GE 2001.

On the other hand, PAP saw its support drop to 66.6%, down from 75.3% in GE 2001.

Thursday, March 30, 2006

Sri Nada rules!

I wanted to have a haircut at Compass Point last week.

I have always been quite a Sri Nada regular (erm, ok, not quite a regular lah since i only cut my hair once every 2 to 3 months). Anyway, curiousity prompted me to try out EC House instead, which is in the same shopping complex. So I walked into EC House and prepared to buy a ticket with my $50 note. This conversation followed:

Hairstylist: Sir, this machine can accept only $10 notes.
Me: Oh, then can I change my $50 note into $10 notes here?
Hairstylist: No, you cannot change your notes here. You must change it somewhere else.
Me: O.. (hairstylist walks off to sweep the floor) ..kay.

So I walked over to my Sri Nada to have my hair cut instead. This episode makes me realise that Sri Nada still provides the best customer service. Come with your $100 notes, $50, $10 and even your piggy bank coins, the uncles at Sri Nada will accept them! :-)

Thursday, February 09, 2006

Of shell scripts and jogging

Oops, my Unix scripting skills have gone rusty. Took a few hours to come up with a few simple shell scripts. Still got several scripts to do. Hopefully it's all downhill from here with my Uni memory slowly coming back to me. :-)

Oh no, it's been a week since I last jogged. Must try to be more disciplined to jog more often. Ok, must endeavour to jog one more time before leaving for Taiwan next week.

Monday, February 06, 2006

ASP Calendar

Chanced upon this calendar written in ASP: http://www.asp101.com/articles/jacob/calendar/default.asp. Will be test driving it soon for an upcoming project.

Friday, February 03, 2006

Changes at Ann Siang hill

Happened to pass by Ann Siang hill today, and saw some big changes since I last set foot there 2 years ago. Saw this new boutique hotel The Scarlet that has sprung up along the whole stretch of shophouses. (right)

And this is where our favourite lunch joint Abang's Nasi Padang used to be. (below)

Tambun cookies for breakfast

Mum-in-law just popped by from Malaysia for a weekend visit.

Hence today's breakfast is the Tambun Cookies that she brought here. Hmmm, not bad tasting, except a little bit dry because of the dried 'tao sa' fillings. Need to wash them down with some kopi. :-)

By the way, the Panda biscuits managed to make it into the photo by lurking in the background. My favourite Panda biscuit flavour is strawberry. By the way, just found out from the box that each flavour has a different calories - the highest being chocolate followed by strawberry followed by vanilla. Bet you didn't know that. ;-)

Thursday, February 02, 2006

Last tree standing


Spotted this lone tree standing proud in the field that faces Compass Point's Metro entrance.

Hope that this tree will survive the development of the buildings and complexes around the area.

Breakfast at Ya Kun


Hmmm.... nothing beats starting the morning with a cuppa kopi and kaya toasts.

Wednesday, February 01, 2006

Jogging


This afternoon, I popped over to Hougang Stadium for a quick jog after attending my friend's mum's funeral wake.

And at 3pm in the afternoon, the sun was at its most scorching temperant. You can almost see mirages forming over the running tracks. :-)

I tried to run 8 rounds, starting from the outermost lane 8, 7 and then all the way to lane 1. However, had to stop after 6 rounds due to the heat. Haha, super unfit, definitely not IPPT material (yet). :P

Anyway, a picture of me after being humbled by the scorching heat.

Tuesday, November 15, 2005

How to configure httpd for Subversion

./configure --enable-status --enable-so --enable-mods-shared=max --enable-dav --enable-ssl

How to install Subversion

./configure --with-apxs=/usr/local/apache2/bin/apxs --prefix=/usr/local/subversion --with-expat=/root/Download/subversion-1.2.1/apr-util/xml/expat --without-berkeley-db --enable-ssl --with-ssl

Tuesday, August 30, 2005

Welcome back, life

Hi life,

It's good to have you back.

I can still remember the dark days for the whole of April, May and June when I completely lost you.

Looking back at those dark days...

On Mother's Day, I was so tied up that I couldn't spare the time to go to my mother's place to have dinner with her. When I told her so over the phone, she was very understanding and kept assuring me that it's ok. Her understanding only made me felt more remorseful. There's even more to come. After dinner time, she rang me up and told me that she'll be bringing dessert over for me. Gosh, I felt I'm the most unfilial son in the world when she later arrived at my place with her homemade desserts. I hated myself as I saw her lonely departing silhoutte.

There's another day when SY and I need to attend my uncle's funeral wake on a Saturday evening. Before that, we dropped by Braddell for dinner. It was a small cosy eatery at Braddell. SY ordered fish-and-chips while I ordered braised chicken. That was indeed a very dark period... couldn't get to enjoy the food and ambience at all. I was also running a slight fever and had to buy Lemsip (and a non-drowsy one at that coz I still have a loooong night ahead).

I'm glad that now I have you back.

Yours longingly,
sc

Monday, August 29, 2005

Open Source PC

This article lists the alternatives that one has if one intends to migrate totally to an open source OS: all the way from open source OS to open source productivity suite.

http://news.yahoo.com/s/ttzd/20050817/tc_techtues_zd/158312

Friday, August 12, 2005

How to enforce comments during CVS commits

  • Create a simple script $CVSROOT/CVSROOT/logcheck:
#!/bin/sh
# Exit 0 (no error) if the log message is not empty

if [ $# -eq 0 ]; then
echo "Comments are mandatory!"
echo ""
exit 1
fi

if [ ! -s $1 ]; then
exit 0
fi

echo "Comments are mandatory!"
echo ""
exit 1
## END
  • Add this one liner into $CVSROOT/CVSROOT/verifymsg
DEFAULT $CVSROOT/CVSROOT/logcheck

Wednesday, July 13, 2005

Better ways to donate to the needy

It's indeed disheartening to learn that some of the supposed "non-profit welfare" organizations in Singapore are misusing donated funds.

Refer to The Straits Times (July 13 2005) for such an example. The CEO of the organization in question actually treated himself to a monthly wage of S$25,000 plus a 12-month bonus!

All this money are drawn from the public-donated money that are meant to help the needy. Can you imagine this: the needy who are supposed to be aided by this fund are living in dire conditions while the CEO himself is generously helping himself to the fund and living in such luxuries! Please enlighten me if you can, as I simply does not see any logic in this whole thing.

My kind appeal to everyone is to stop donating to such organizations. The reasons are simple:

  • You do not know how much of your donation actually goes to the actual needy. For all you know, maybe only 1% of your donation goes to the needy while the rest of the 99% is used to "upkeep the organization".

  • The financial status of such organizations are non-transparent, and thus easily prone to misuse by the management.



Some suggestions on better ways to help the needy:

  • Donate monetary aid directly to the needy parties.

  • Donate daily neccessaties.

  • Provide companionship.

Monday, July 11, 2005

East Cost outing on 9th July 2005

9th July 2005 Saturday is an unforgettable day. Both you and I decided to let our hair down and indulge ourselves in a one-day local getaway. :)

We had rented a car for that day. We left home at around 10:50am that Saturday morning. We headed to Blk 241 Compassvale to retrieve our rented car, a Proton Wira. And henceforth began our journey for the day.

Our first stop was mother's place. We had laksa breakfast with her and Sing Ying. It's a pity that we arrived at mother's place a bit too late, coz she's rushing to work at 12 noon. So she ate quickly and left for work (at the Sheng Siong supermarket below her block).

Next, we went to SSDC to register for your basic theory test. The queue was very long; all in all, we spent 1 hour at SSDC. :P We left SSDC at 1:30pm.

After successfully registering for the basic theory test, we started our journey to East Cost loh! :) From SSDC, we took this driving route to East Coast: AMK Ave 3 -> Hougang Ave 2 -> Eunos -> Still Road -> Still Road South -> East Coast Park Service Road. Somehow there was quite a jam at Eunos... maybe it's due to the homegoing crowd on a Saturday afternoon.

When we reached East Coast, we looked around for the carpark nearest to MacDonald's but it was fully parked. Hence we settled for the next further one which still has spaces available. Another great thing we realised is the free parking. :)

Our first activity at East Coast was cycling! We left all our barang barang in the car and headed for the first bicycle rental shop. We booked 2 bicycles for 2 hours each. We cycled towards the seafood restaurants side. After some time our bums were aching due to the uncomfortable bicycle seats. :P We passed by the hawker centre as well as the jetty where people were fishing. We U-turned at the jetty.

We stopped for some refreshments at the hawker centre. We ate grilled tau-pok and you-tiao in peanut chilli sauce and drank whole coconuts. After recharging, we headed back towards MacDonald's (still with our aching bums. hehe).

Once back at our car, we retrieved our "camping" barang barang which consist of a straw mat, magazines, newspapers, tidbits and drinks. We settled down at a spot along the beach that is close to the sea. There, we had a good time reading papers and enjoying the wonderful sea view and sea breeze. There was also a cute little toddler girl scooping sand beside us. :) Those were such enjoyable moments. Ahh...

At around 5pm+, we packed up and headed for dinner. After much consideration, we decided to go to Old Airport Road's hawker centre. When our car reached there, we had difficulty finding the entrance to the carpark. In the end, we circled twice before finding the entrance. :) For dinner, we ordered mutton soup, shells, otar, satay and sugar cane juice. Hmmmm.... so yummy! To our pleasant surprise, the satay sauce comes mixed with pineapple sauce. It was indeed a very enjoyable and fulfilling dinner! :D

Now came the difficult part. We were scratching our head very hard for ideas on where to go next. Finally we decided on Expo, since it might have some exhibitions that we can view. So we made our way towards Expo. When we reached Expo, we encountered a funny scene of 3 guys and gals singing offkey at a stage. We headed indoors and tried to search for any exhibition. However we were denied as there was completely no exhibitions on that day. :P Before we turned to leave, I visited the toilet for a big business. Ok, at least our trip to Expo were not wasted. Haha...

Our last venue for the day was Punggol. We originally wanted to go to the beach, but we failed to find it. :P Hence we ended up at Puggol Plaza instead. A bit small, but at least we knew how the plaza is like, after hearing so much about it from your mum. :)

After we left Punggol, it is time to return the car. We headed for the Esso station near to Rivervale Plaza to top up the fuel tank. Then we drove back to Block 241 to park the car. We gathered all our belongings and walked back to our block. Before going up, we bought 3 durians for $10. :)

Hence, that wraps up our enjoyable one-day local getaway. I really enjoyed myself and thanks for the happy memeories. I pray that we have more chances to do so in future.

Love you,
dar dar

Friday, July 08, 2005

How to generate SSL cert for Apache

(excerpts taken from http://www.linuxquestions.org/questions/answers/270)

openssl genrsa -des3 -out pass.key 1024
openssl rsa -in pass.key -out server.key
openssl req -new -key server.key -x509 -out server.crt -days 999

cp server.key /etc/httpd/conf/ssl.key/
cp server.crt /etc/httpd/conf/ssl.crt/

apachectl stop
apachectl startssl

Wednesday, May 18, 2005

Psalms 20

[诗20:14] 耶和华 - 我的磐石,我的救赎主啊,愿我口中的言语,心里的意念在你面前蒙悦纳。

Thursday, May 12, 2005

How to speak simple SMTP

telnet 25
HELO
MAIL FROM: singchyun@yadah.com
RCPT TO: myfriend@somewhereelse.com
DATA
Hello friend,

Would u want dinner tonight?

.
QUIT

Wednesday, May 04, 2005

How to start sendmail daemon

/usr/sbin/sendmail -bd -q20m

Source: http://www.feep.net/sendmail/tutorial/run/starting.html

Friday, April 22, 2005

How to start JMX together with JVM

java -Dcom.sun.management.jmxremote.port=<port> -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

Friday, March 25, 2005

Heartbreaking news

The Straits Times, on 24th March 2005, reported a heartbroken guard killing himself. In delivering his findings, the State Coroner said "A love lost can be recovered, but a life lost remains lost."

How true, a life lost can never be recovered. Let's all cherish the life that we have today.

Tuesday, March 15, 2005

JDBC Connection Pooling

When specifying the driver during database connection pooling, try to use a driver that is inherited from javax.sql.ConnectionPoolDataSource.

For example, in the case of MySQL,
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource is a more preferred choice than com.mysql.jdbc.Driver.

According to Resin's documentation, such drivers are easier and more efficient to pool.

Wednesday, March 09, 2005

How to install cvs server

  1. Download and unzip CVS source.
  2. Set the environment variable CVSROOT to point to the planned repository directory.
  3. ./configure --prefix=/foo/bar
  4. make
  5. make install
  6. Installation of CVS binary is completed.
  7. Initialise the repository by: /foo/bar/bin/cvs init (ensure that CVSROOT has already been set properly)
  8. Edit /etc/services to add in this line: cvspserver 2401/tcp
  9. Create /etc/xinetd.d/cvspserver:

    service cvspserver

    {

    socket_type = stream

    protocol = tcp

    wait = no

    user = root

    passenv = PATH

    server = /foo/bar/bin/cvs

    server_args = -f --allow-root=/home/cvsowner/cvsroot pserver

    }



  10. Restart xinetd by sending it the SIGHUP signal: kill -s SIGHUP xinetd_pid
  11. Create $CVSROOT/passwd. Each line of the file must be in the format cvs_username:hashed_password:unix_user

Tuesday, March 01, 2005

How to submit multiple form elements having the same name in PHP

In PHP, it is possible to have multiple form elements having the same name. However, the element's name must be appended with "[]".

<input type="text" name="hoho[]" value="first element" /><br />
<input type="text" name="hoho[]" value="second element" /><br />
<input type="text" name="hoho[]" value="third element" /><br />

At the processing PHP, the values of the submitted element can be retrieved as an array via:

$myarray = $_POST['hoho']; // Note that the name does not end with "[]" when retrieving
echo $myarray[0];
echo $myarray[1];
echo $myarray[2];

How to input multiple languages in J2EE webapp

  1. Ensure that the system property file.encoding=UTF-8 is set. In Tomcat's case, this would mean modifying catalina.sh/bat.
  2. Add <%@page contentType="text/html; charset=UTF-8"%> on top of every JSP, or response.setContentType("text/html; charset=UTF-8") in every Servlet.
  3. Add request.setCharacterEncoding("UTF-8") in the form processing JSP/Servlets.
  4. Add <meta equiv="Content-Type" content="text/html;charset=utf-8" /> in the HTML header in every JSP/HTML.
  5. Ensure that the database+table+column has been properly configured to store Unicode.

Monday, February 28, 2005

Welcome

Cool. More to come. Watch this space.