I took the driving test and guess what? I got my unrestricted license with a super high score: 101 points!
And that’s 1 more above the 100 total points!
Well done to myself, well done! Oh yeah

text reads:
windows 7 memorial burger
american sized burger (diameter: 13cm) with 7 beef patties each weighs around 113 gram. super humongous whopper!
from 10/22 to 10/28, the first 30 customers everyday will be served with this burger for a mere 777 yen (about AUD10?).

Quick note of shell script
1. basics
1.1 script engine
specify it like:#!/bin/sh or #!/bin/bash ...
just pick a system u like.
1.2 permission
the file needs to have a+x permission
e.gchmod a+x myscript
1.3 want to run it anywhere?
edit your .profile or .bash_profile to have the path to the script included. e.g.PATH=$PATH:$HOME/bin:my-script-path
log out and log in again, you can just type the script name to run it
2. get variables and set variables
2.1 set in the scriptMYVAR="something"NOTE: no $ when set
MYPATH=./mydir
2.2 get in the scriptecho "${MYVAR} is my var"so, always use $ to get it
ls -al "${MYPATH}"
2.3 if you want to set it again
same way:MYVAR="now it's changed!"
without the $, notice.
2.4 get from user input
simply,
read [var-name]
e.g.read inputpath;
echo "You have entered input path: ${inputpath}"
3. tests
simply use [] for tests, NOTE: spacing is very important, make sure there’s only one space between each operator.
The command test exits with zero status if and only if a given condition is true. Conditions are boolean (true/false) expressions involving:
string comparison (=, !=)
numeric comparison (-eq, -ne, -lt, -le, -gt, -ge)
tests on files (given a file name, can test
whether it is a regular file (-f),
whether it is a directory (-d),
whether it is writeable (-w), etc)
For example, test “$x” = “$y” returns success when the variables x and y hold the same string, and test -d “$dir” returns success if the variable dir holds the name of a directory.
NOTE The test command expects each operator and operand to be a separate argument. Therefore one must put spaces around them on the command line.
e.g
#!/bin/bash
echo "Enter your name"
read inputname
if [ ! "$inputname" ]; then
echo "Name is empty!"
exit 1
else
echo "You name is $inputname"
fi
more to follow…

Technorati Tags: linux, shell scripts
2009年10月18号晚11点, imac开始给我捣蛋,最后死掉。
强制关机后用启动盘检查, 结果发现有N多错误!最后修理硬盘, 然后今天早上才自动恢复完毕。 SPOTLIGHT 数据库也被重新设置了, 目前看来一切良好。
不过自从雪豹以来就问题多多,看来还是不要作第一个吃螃蟹的人啊。。。
今晚再给老婆大人IPHONE升级,希望不要再出错了。。。
笨笨走了。。。 我的一部分也没有了
愿笨笨在天堂快乐!
我最亲爱的乖乖狗狗笨笨, 一路走好!
愿笨笨安息。 原谅我不能最后抱你一次。
亲亲我的笨笨乖乖。
下辈子再见!我爱你笨笨。
李笨笨
种族: 西施狗
生于1998年9月9日(农历虎年)
卒于2009年9月15日5点20分
享年12岁

just lovely...

summer is here...

In PHP, to get form inputs, $_POST can be used if the post has a key, such as name=something can be captured by $_POST['name'].
But what if it’s a raw post with only the post body and no key? Such as an xml api post?
Simple: use “php://input” as a text stream and read it with functions such as file_get_contents.
More on this: http://au2.php.net/wrappers.php
I will become a father!
This is really exciting. I just heard my baby’s heartbeat, loud and clear, I almost burst into tears. I’m becoming a father, in a few months.
The lovely midwife Heidi used a little device to deliver the strong heartbeat, heavenly sound to our ears. It’s so real and sure, telling the world a new life is to be born.
It’s as strong as a train. Come, my little ox.
Just created a fresh project on google codes, a calendar class that is ultra flexible, super easy to use, and very fast
bbqq-calendar
A light weight calendar that can be used as a base for customized calendars, provides both HTML rich calendar and a plain text calendar that macheads can use for geektool.
It also supports customizable templates for various elements, such as wrapping tags, links, etc.
Date format can also be modified as well.
Project home page here: http://code.google.com/p/bbqq-calendar/
About this blog
I had a website about 10 year ago? Couldn’t really remember now, but it was surely a long, long time ago, and I stopped updating it cos I was occupied by all the work and hobbies - ironically, these were all web-related.
Finally, I decided to revive my webiste, and this time, in the form of a blog - hope this time I can keep it updated. Well, I’ve downloaded the iphone wordpress app, hoping it will help.