Note to Self: Quickly serve static HTML files with node.js

Screen Shot 2015-11-24 at 12.58.26 PM

There are times when I need to serve static HTML pages from my development machine so that I can test it on other devices on the network (e.g. mobile phones, tablets, etc). But what if I don’t feel like setting up any sophisticated web server locally?

On the good note, I have node.js installed locally, since I use some node packages for my development stack. So a quick command in terminal:

$ sudo npm install -g http-server

…and I have a quick-to-use http server to serve my static files!

Screen Shot 2015-11-24 at 12.54.55 PM

To serve any static files, I just need to cd into whichever directory I want to be the root, and issue http-server command, like so:

Screen Shot 2015-11-24 at 12.56.28 PM

And now I can quickly browse the page via the addresses shown in the terminal.

Screen Shot 2015-11-24 at 12.57.42 PM

Have fun!

Shibuya Crossing

After always seeing this scene in drama, documentary and anime, I finally saw it for myself!

I can cross ‘Shibuya crossing’ off my bucket list now.

p/s: Excuse the temperamental exposure during the recording. My phone is as excited as I am, I guess.

Bonus: Slow-motion capture of sushi making.

Bootstrap 3: Handling Modal within Modal

If you’re working on a web application built using bootstrap as it’s core framework, you might come across instances where there will be a need to have a modal window that is opened within another modal window. Even though this is not really a good UX practise, there are instances where it is unavoidable.

Opening a modal within a modal is technically supported with just the bare Bootstrap code, but take note of this caveat:

Overlapping modals not supported
Be sure not to open a modal while another is still visible. Showing more than one modal at a time requires custom code.

Continue reading

Renewing Lapsed Motorcycle Road Tax Experience

Following on my post about how to renew lapsed motorcycle road tax, I finally managed to get it done. However, my experience is not exactly smooth, due to one overlook and some unexpected turn of events.

What is this ‘lapsed motorcycle road tax’?

Basically, once your road tax expires, you have a grace period of one year from the road tax’s expiry date to renew your road tax. Once you go over this period, you will have to have your vehicle inspected before you can renew your road tax again.

Continue reading


I once walked into a shop that sells dinnerware. The sales person promptly walked to me, smile and said “Hello sir, are you looking for your wife?”.

I was actually checking out some of the Corell sets.