Using Casperjs to test your website

Posted by – July 24, 2014

Today, I discovered a great tool called “casperjs”, which allows you to test your website with Headless WebKit. Having just tried a few minutes, I instantly fall in love with this tool. You can use it to simulate almost any browser behavior.

Installing it on ubunutu is quite straightforward.


#clone the repository from the master branch
git clone git://

#Symlink the relevant file into your bin or /usr/local/bin
ln -sf ~/repositories/casperjs/bin/casperjs /bin/casperj
ln -sf ~/repositories/casperjs/bin/casperjs /usr/bin/casperj

How to Delete up to Non-Whitespace Characters in Emacs

Posted by – October 10, 2011

I often want to delete a lot whitespaces between one word and another and had to hit the “Delete” buttons many times. Now I just discovered this command M-^ (delete-indentation &optional arg) works perfectly for my need.

  • Category: Emacs
  • Comments Closed

My new Pet Pachira

Posted by – May 2, 2011

I got him from Tokyo hands shop in Shinjuku.

All the plants I had end up succumbed. This time I am going to try my best to taken care of him. I am going to do exactly that the stuff in the shop told to do. spray water once a week. put him under sunshine every morning. I hope he can be with me for a long time.


  • Category: Life
  • Comments Closed

Tokyo’s radiation level

Posted by – April 8, 2011

This is the best chart I have found so far from the NHK website

I was outside when on 15th when the peak happens :(
by looking at the chart.. it’s definitely getting better. This radiation accident seems like a bit overblown. It was quite scary on 15th when the spark happened. I could not image how much radioactive stuff was leaked near the plant.

Although the current radiative level in Tokyo is not too worried, Tokyo Electric has poorly handled this accident, that cause hundreds of thousands gaijin flee away the country. It’s time for the Japanese government to review this company.

I surivived in the 5th biggest earthquake in history

Posted by – March 11, 2011

I am still alive. Thank god. I thought I would be buried in the office today.

All the train are stopped and I am walking home now. Everyone is walking. all cars on the road stuck in the traffic jam. Don’t know what is the impact on the north Japan, where is much more close to the epicenter ..

Since came to japan. except the bankruptcy of Lehman Brothers, this is another big shock I am *lucky* enough to experience.


Finally I can really do snowboarding

Posted by – March 5, 2011

it’s my third year now doing snowboarding in Japan. It’s become more and more fun after you can control yourself not falling over.
occasionally even if you fall over, it does not hurt so much anymore.

The fresh air and the feeling of shuttle back and force to this boundless snow world do makes me forget the busy life in Tokyo.
Japan is one of the best countries to do the snowboarding i think, there are a lot of snowboarding resorts and the temperature usually is not too low so you can enjoy the sport not worrying too much about the weather.


My apple Products

Posted by – January 21, 2011

Buying apple products is just like buying drugs. it draws you to buy another one, the another one even you think it’s not necessary or not quite sure what you really need for that iPhone 3GS while you already have iPhone 3G. Even you think Ipad is just a *bigger* iPod? What’s wrong with my brain and what magic apple use to make me blind to just upgrade their product even faster than a playboy upgrade his girlfriend. :)

My Apple Products

Do Chinese People Hate Japan

Posted by – January 7, 2011

Recently I was asked by a Japanese friend “does Chinese people hate Japan in General?”
To answer your question, maybe yes. I think especially the recent accident between Japan and China.
But If you ask me if I hate Japan?


Moving out Of Ebisu

Posted by – November 21, 2010

Having been living in Ebisu for almost 3 years.. it’s a really nice area with lots of restaurants, bars, cafes, I really loved it. but it’s just a bit too expensive if you want to move to a bigger house in ebisu. So I decide to move to yoyogi-uehara, a bit cheaper with a bigger apartment.

Okinawa in winter

Posted by – February 19, 2010

First trip to okinawa is in winter. a bit chill