Blog

  • Welcome back

    As promised, I will attempt to revive my blogging.

    As I type, I’m actually watching “The Social Network”. Damn geeky, I know. Not the best movie of all time for a Saturday night.

    Anyway just to start off the new year – lots of shit happened in Q1 2011. My “Ultimate” Driving Machine™ had a cracked radiator which meant it needs to be replaced. Not too expensive but still ouch.

    A friend got into an accident with a bus that tried to flee the accident scene. Thank god he’s not injured at all – the bus hit the passenger side and he was alone in the vehicle. He was lucky he had a witness.

    My high BMI neighbours upstairs are still as annoying as ever, even right now at 1.25AM and I have another 3.5 years to put up with them and you bet I will.

    By the way, if you’re wondering – Singapore has no decent law against domestic noise. There’s nothing the government can really do if you have an imbecile neighbour like mine. All you can hope is to curse them to rot in their filthy home and get eaten by fleas so they’ll mixmash well with the herbs and spices they pound daily in their bedroom. I’m not sure if even an impending election would change anything since Bukit Panjang is still split into two.

    Just six hours ago I heard I got voted to be in the EXCO of KH. I’m puzzled how I got voted even when it was a no-show; I was at CGH and it wasn’t a lie. I don’t think I can commit and I will not bullshit my way into a role I cannot put quality effort into. This is precisely what I am going to tell them during the next meeting: Career, Family, Hobby. Choose two. You don’t need to be a rocket scientist to answer that.

    I’m also trying to adopt a minimalistic approach to life. I’m trying to get rid of shit I don’t need and just keep the necessary stuff at home. I’ve always believed in buying things of quality versus price since high quality stuffs tend to last longer. Also you’re likely to only need ONE good, say, shoe than ten cheap shoes.

    That’s it for today. I need to watch my movie. Stay tuned for more updates.

  • Offline HTML Mobile Apps

    Picking up iOS is quite a bit of work plus you need to buy a Mac to get Xcode running.

    Yes I know you Hackintosh folks are going to start making some noise but let’s keep this legal.

    So I’ve decided to build quick apps using jQTouch.

    To get an App icon on your home screen, simply… add the page to your home screen! Duh. It’s like adding a bookmark. Try it – it works!

    But here’s the next problem – how do we get the apps to work without network connectivity?

    HTML5 introduced something called the offline cache manifest. Here’s how to use it…

    Step 1 – Create a file called yourfilename.manifest with the following content

    CACHE MAINFEST
    demos/main/ajax.html
    demos/main/ajax_post.php
    demos/main/index.html
    demos/main/jqt_startup.png
    demos/main/jqtouch.png
    jqtouch/jqtouch.min.css
    jqtouch/jqtouch.min.js
    jqtouch/jquery.1.3.2.min.js
    themes/jqt/img/back_button.png
    themes/jqt/img/back_button_clicked.png
    themes/jqt/img/button.png
    themes/jqt/img/button_clicked.png
    themes/jqt/img/chevron.png
    themes/jqt/img/chevron_circle.png
    themes/jqt/img/grayButton.png
    themes/jqt/img/loading.gif
    themes/jqt/img/on_off.png
    themes/jqt/img/rowhead.png
    themes/jqt/img/toggle.png
    themes/jqt/img/toggleOn.png
    themes/jqt/img/toolbar.png
    themes/jqt/img/whiteButton.png
    themes/jqt/theme.min.css
    some/other/file.name

    Step 2 – Make sure your web server reports the MIME type correctly by adding the following config to Apache. You might need to contact your hosting provider to get this done.

    AddType text/cache-manifest .manifest

    Step 3 – Add the following tag to your HTML page so the browser knows where to find the manifest.

    <html manifest="yourfilename.manifest">

    That’s it!

    Original reference material here.

  • IPv6 over GRE in RHEL/CentOS

    Note: This article is not about 6-to-4 tunneling. This is about carrying IPv4 and IPv6 at the same time (aka Dual Stack) over a GRE tunnel in RHEL/CentOS

    I was configuring an existing GRE tunnel on my Linux router when I found that the initscripts in CentOS 5.5 didn’t support IPv6 for the tunnel devices.

    The quick hack was to edit /etc/sysconfig/network-scripts/ifup-tunnel and look for this line:


    /sbin/ip link set dev "$DEVICE" up

    Add these lines just after the line above:


    # Added to accomodate IPv6 in tunnel
    /sbin/ip addr add "$IPV6ADDR" dev "$DEVICE"

    Then modify /etc/sysconfig/network-scripts/ifcfg-tun0 (or whatever your device name is) and add the following lines to run dual stack over GRE:


    IPV6ADDR=2001:abcd:1a2b:3c4d::2/64

    If you need to use the tunnel as an IPv6 default gateway, create /etc/sysconfig/network-scripts/route-tun0 and add an entry


    ::/0 via 2001:abcd:1a2b:3c4d::1/64

    Then just restart the interface and bingo IPv6 and IPv4 dual stack on a GRE tunnel.

  • I said hey! What’s goin’ on?

    Rite. That’s the title of an old song ‘What’s Up’. I’ve decided to resume blogging. I think it’s good for me… (I hope?)

    So, I’ve switched jobs. It feels kinda déjà vu since I worked on the same stuff about 2 years ago; although it’s at a larger scale now. There’s some challenges along the way but what’s life without one?

    I also took part in the 2010 National Chinese Music Competition and played the cello for my friend’s Chinese Ensemble. YES, we won, but they said we were bullying kids… well…

    About this time last year, I met up with some old friends. I’m supposed to review if we’ve accomplished what we spoke about. I will review and post an update soon.

    Sorry for being so random. This is the result of not having blogged for over half a year.

    Meanwhile, enjoy this MTV!

  • Blogging Revival

    Haven’t been blogging for some time, maybe I should revive it.

    Also trying to figure out how to have this RSS feed on Facebook.

  • Review of iOS 4 on iPhone 3G

    I’ve just updated my iPhone with the new iOS 4 firmware yesterday and here’s a short review.

    There has been lots of commotion about multi-tasking but I’m not the least concerned — not because I am not getting it on my iPhone 3G, but because I don’t see a need for it with the type of apps I use. Mail and Google Maps in the background doesn’t make sense. I might change my mind if there’s a good IM client someday.

    For now, the only useful features are shown below.