Sunday 9 March 2014

Please all pray for the safe returns of passengers of MH370

According to the latest google news, The MAS plane was carrying 227 passengers -- including 153 Chinese nationals -- and 12 crew. (28 Malaysian and 12 Malaysian crew)
Vietnam's military said two oil slicks had been spotted, but no debris. "Two of our aircraft sighted two oil slicks around 15 to 20 kilometres (10-12 miles) long, running parallel, around 500 metres apart from each other," the Vietnam army's deputy chief-of-staff, Vo Van Tuan, told state-run VTV." Source: Link
It sounds to me that this might be a technique that pilots used for emergency landing.
From my understanding, pilots releases much of their oil before attempt for an emergency landing. This is to reduce the risk of explosion while landing.

Let's pray for their safe return.


Friday 7 March 2014

Want to get marry or get a name for your baby? 金吊桶 八字命理店 / Place for Bazi is the place to go.

金吊桶  (House name)

What (Function)
This is a place we can go for checking future Husband and Wife's Bazi (八字) Birthday and check compatibility and then calculate the Auspicious day and time for the Wedding Reception.
To calculate and check your newborn son or daughter's naming. Check if his/her Bazi (八字) matches with Name and have all the necessary Earth Element (Fire, Metal, Wood, Water, Gold)

When (Operating Hour)
Normal Day till ~6pm. Call before going.
Normally Sunday Morning is closed.
He seems to stay there, so if you reach and gate is close, look for a hand phone number and call. Or you call the land line number below.

Contact Number
04-2271655

Where (Location)
Just after Aquarium Shop (ChiewThean Yeang) @ 92 Burmah Road, Penang, Malaysia
(车水路二十九号)

Congrats and Have a Great one!!!

Wednesday 5 March 2014

Enabling UEFI Secure Boot on your Platform

If you have not seen how to setup your own EFITOOL, please click this link (Howto?) and setup before coming to this post. It would make more sense once you have the EFITOOL compiled on your Linux OS.

1. Boot system to EFI Shell:
Go to BIOS setup menu
Select CSM -> Video to UEFI only. //If your screen blank out, try use direct Graphic cable without converter
Click Disable CSM mode
Save and reboot
Look for Secure Boot mode
Check what mode it is: 
If it is in User mode, go to Disable Auto Provisioning and Clear all existing keys.
Save and reboot.
Now it should report as Setup mode.
Boot to UEFI shell.
fs3:   //or what your USB drive initialized to

2. Run Lockdown.efi.

or
3. Now on your platform update the variables, remembering to do PK last because
an update to PK usually puts the platform into secure mode

UpdateVars db db.auth
UpdateVars KEK KEK.auth
UpdateVars PK PK.auth

And you should now be running in secure mode with your own keys.

How to compile EFITOOLS to 32bits instead of 64bits?

What is EFITOOLS?
This is an UEFI tool that able to help you to load your PK, KEK, DB keys into the Firmware and enabled Secure Boot on your Computer.
It is also able to help you create the Private and Public Keys of PK, KEK and DB.

Why Compile 32bits Version instead of 64bits?
When you want to boot 32bit OS, you'll need 32bit UEFI BIOS. Since you are running 32bit UEFI BIOS, you can only execute EFI or binaries that are compile for 32bit.

Steps to compile 32bit version of EFITools:

1) Requirement:
32bit OS(32bit version) 64bit OS (64bit version) Fedora /Ubuntu / Linux based OS
In our example we will use Fedora 32bit. You can use 64bit OS to compile for 32bit version, however, my guide does not include that.

2) Download required dependancy and libraries needed:

a) Get the GNU-EFI library:: CMD ::
           Method 1: sudo yum install gnu-efi
           Method 2: git clone https://github.com/vathpela/gnu-efi
                            cd into the directory
                            make
                            sudo make install
                         
b) Get the sbsigntool ::CMD ::
          Method 1: git clone https://github.com/wmarone/sbsigntool
                           cd into the directory
                           ./autogen.sh
                           ./configure          //Notice, they might be some dependency missing, need installation
                           make
                           sudo make install

c) Get some libraries needed
           sudo yum install pkgconfig
           sudo yum install perl-CPAN
           sudo yum install perl-File-Slurp
           sudo yum install help2man

3) Above are similar across 32bits version and 64bits version, however, below will be 32bit focus only.
     There will be an error in the lib/security_policy.c as there are asm code in the security policy and so far I can't find a workaround for it.
        vim lib/Makefile
        Delete the security_policy.o from the FILES = line
        Add the bolded two lines
        clean:
        rm -f lib.a
        rm -f $(LIBFILES)
        rm -f lib-efi.a
        rm -f $(EFILIBFILES)

         vim Makefile
         Delete the PreLoader.efi from the EFIFILES = line, as this file required the security_policy.c library

4) Compile all the necessary files by doing make
         make clean && make 
         //It should complete with no error and undefine symbols

5) Now create a USB drive image:
        ./mkusb * * usb_drive_image.img

6) Open the System in Fedora application and plug in a USB pendrive
    Click Restore Image on the drive and select the usb_drive_image.img

Congratulation, you have successfully created your own signed application with PK, KEK, DB keys.

Sunday 2 March 2014

Cheapest Property in MAPEX 2014 => Sierra East Condo @ Bukit Jambul? Or is it?

Some technical specification of Sierra East

Block A - For Registration
*256 units
*24 storey
*Choice of 3 layouts
*Built-Up:
Typical Unit: 1200sf - 1400sf
*Freehold


Developer: Chong Company Sdn Bhd

Completion to be mid of year 2017.

If you looking for loan for this property, look for Panel banks.
Panel bank for Sierra East includes: Ambank, HLA, RHB, OCBC, UOB, PBB
Approval from HSBC bank is pending.

One of the design 1304 sq ft, comes with 2 car parks will cost you roughly around RM556,000.

Maintenance fee for the each unit, the developer is looking at 20 to 25 cent per sq ft.

During the MAPEX 2014, it was giving out 5% rebate on down-payment.

Con:
Later on with Block B - total units should equal or more than 512 units. It is a very dense apartment.
Not to mention the environment around it, it is surrounded by Low Medium Cost Apartment. Lots of factory workers stay in the area.
Total around RM426 - 500 per square ft. Pretty high rate per sq ft for Relau.
Location is nearer to Relau than to Bukit Jambul.

Pro:
Large swimming pool ( Shared between Block A and B)
2 Car parks

For more than half a million, you get a of the four wall cube up in the sky. The four wall might be good, but outside it is crowded with Low and Medium Cost apartments. I might need to think twice.

Happy Hunting.

Wednesday 26 February 2014

UUID problems

Installed UUID but package can't detect it?
Tested working on Fedora 20 and Fedora 17.

Solution:

  • sudo yum install libuuid-devel pkgconfig

Missing gnu-efi

Error when include -lgnu-efi library?

To do any EFI compilation, you'll need the gnu-efi library installed.

1. git clone https://github.com/vathpela/gnu-efi
2. cd into the directory
3. make
4. sudo make install

or better if you using Fedora
1. sudo yum install gnu-efi


After all that, check in the directory /usr/local/lib, ensure the libefi.a and libgnuefi.a is there.
If not, when you compile using the string -lgnu-efi and -lefi, it'll complain library not found.


Signing with own keys on EFI files using sbsigntool


  1. git clone https://github.com/wmarone/sbsigntool
  2. ./autogen.sh      (this will work provided you are not behind firewall that filter out git:// access
      1. After unzip at linux host (tar -xvf sbsigntools-0.6-debian.tar.gz)
      2. Run ./autogen.sh
        • Error regarding git can be ignore as you already have those files (ccan)
  3. ./configure
    • At this stage, there will be lots of dependencies. Be patience as you add and install those.
        • There are lots of dependencies on the CPAN Perl script
          • Do this first: ( to get most of the dependencies fixed)                        
            • sudo yum install perl-CPAN
          • (1/5): perl-ExtUtils-
            (2/5): perl-Test-Harness-
            (3/5): perl-CPAN-1.9205-
            (4/5): perl-ExtUtils-MakeMaker-
            (5/5): perl-devel-
            
          • The above fixes error such as 
            • Can't locate /xxxx.pm in @INC (@INC contains
          • Some of the issues encountered:

          •  File-Slurp (It is needed for use File::Slurp qw( ))
            • Download: Link
            • untar and cd into directory
            • perl Makefile.PL
            • make
            • make test
            • sudo make install
          • uuid package missing
            • sudo yum install libuuid-devel pkgconfig
          • libcrypto package missing
            • use command to verify if it is installed and detected by the package
              • pkg-config --libs libcrypto
              • If correctly configure: return result is -lcrypto
            • Fixes: 
            • sudo yum install openssl-devel
            • sudo yum install openssl
  4. Once it passes all the checkings 
    1. Do command:
      • make 
      • sudo make install
Congratulation, your sbsigntool should be installed and operation now.


How to install and git openssl?


Need to generate Public and Private key?
Do some encryption?


First you need to install Openssl!!


  1. git clone https://github.com/openssl/openssl
  2. cd to the new directory created
    • view (vi) INSTALL (For instruction how to install)
  3. Basically command needed is:
    • ./config
    • make
    • make test
    • make install

If you encounter issue when installing sbsigntool in the next step that:
Probably you need to do the following as well:
  • sudo yum install openssl-devel-1.0.0i-1.fc17.i686
If got error on libcrypto not found:
Check using: pkg-config --libs libcrypto

  • Good Result: -lcrypto
  • Bad Result -
    Package libcrypto was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libcrypto.pc' to the PKG_CONFIG_PATH environment variable
    No package 'libcrypto' found
Solution:
  • Try CMD: locate libcrypto
  • Need to have: 
    • /usr/local/ssl/lib/libcrypto.a
    • /usr/local/ssl/lib/pkgconfig/libcrypto.pc
    • /usr/lib64/pkgconfig/libcrypto.pc
    • /usr/lib64/libcrypto.so
    • /usr/lib/libcrypto.so
     

How to compile your own Grub


How to get and build/compile your own GRUB?

First, get the GRUB from the GNU site:
ftp://ftp.gnu.org/gnu/grub/grub-2.00.tar.gz

Then copy to your linux machine and unzip it:

  1. zcat grub-2.00.tar.gz | tar -xvf -cd grub-2.00/
  2. cd grub-2.00/
  3. ./configure
    • Here will require to install those missing package
    • FEDORA: sudo yum install <pkg> 
      • i.e. bison, flex and more
  4. After configure passes all criteria
  5. make install

How to get a GRUB.efi for UEFI Shell launch

  1. sudo yum install grub-efi
  2. Copy grub file from: /boot/efi/EFI/redhat/grub.efi


Monday 24 February 2014

ART vs Dalvik: One feature that worth to upgrade to Android KitKat

What is ART?
Since the beginning of Android OS, it has been that Android is using Dalvik machine. It is used to compile apps stored in the Android device. It compile at the moment you want to launch the app. It uses JIT (Just In Time) compiler to compile the Android app as you click the app.

Benefit of course is storage size is less for the device. It is storing in a more compact format.
Major draw back for this is, it'll takes a bit to compile and also, it consumes more battery power.

Since now, storage has become much cheaper, Google is working a new runtime program that will compile the code once you install. (One time only ART compare to previous Dalvik Virtual machine (VM) where every time you launch the app.

After two long years, it has been implemented on Android Kit Kat 4.4 OS. However, this is classify as experimental. It is still work in progress. Now it is giving for early developer and partner feedback.

How to do it?

Requirement: Kit Kat device (Android 4.4 or higher)

1. Enable Developer Options

  1. Pull down notification shade by sliding down from the top of the device
  2. Tap the Quick Setting icon at Top Right
  3. Tap the Gear icon to go to Setting
  4. Tap "About Phone"
  5. Continuously tap Build number over and over until it says you are a Developer
  6. Hit Back
  7. Tap on Developer option that just appeared above "About Phone" and turn them on
2. Enable ART Runtime
  1. Tap on Select Runtime in Developer Options
  2. Select "Use ART"
  3. Tap "OK"
  4. Wait for the device to reboot (this may take a while the first time)
  5. Enjoy faster and much more battery life's device.
Google claim battery saving using ART as well as faster execution. 
Note: Storage takes up 10 to 20 percent more space on your on-board storage, but allow them to open faster


Take a break with Kit Kat Device :)

Friday 14 February 2014

How to use dos2unix, with example for the whole folder

If you always copy files from Window OS to Linux Based OS, and do compilation, you will always hit into this issue.
Where some weird error would occur, and it might complaint some weird symbol or text.

This is because when you copy from Window to Linux, the file format might not changed, depends on which tools you used to do the transfer.

Best way to ensure not to encounter any strange or weird issue due to Window file's format. Do the following command after you have FTP or copied the files over.

find . -type f -exec dos2unix {} \;
This will do recursive conversion of everything in the current folder and all its sub-folders.

If you just want to convert specific folders only. Replace the <folder> with your folder's name. Example below:
find <folder> -type f -exec dos2unix {} \;
i.e.  find myfolder -type f -exec dos2unix {} \;
That's it. Happy Coding.

Million dollar house at Sunway Cassia Penang landed property at Batu Maung, worth a shot?

Batu Maung is an area that is very close to the Penang Second Bridge.
But is it worth to spend RM1.18million + to purchase a new 3-stories Terrance link house?

Some technical info:
Address: Bayan Lepas, Penang
Property Type: 3-sty Terrace/Link House
Land Title: Residential
Tenure: Freehold
Land Area: 20'x65' / 20'x75'
Total Units/Lots: 96
Bumi Discounts: 5%
Bedrooms: 5
Bathrooms: 5
Completion Date: June 2015 (expected)


Currently they are launching the Boronia 3-storey Terrace Home:
Brochure is showing here:
sunway layout

















Here are some progress:
This is the show house. It is open now, can go and see the actual unit.
Sunway
Sunway

Sunway

Sunway

Sunway










From my observation when I drove around the neighborhood, I can see there are not many owner has moved in. 3-4 houses put up signs asking for Sales/Rent.

What I didn't really like is the drive in. I passed by lots of low cost flats on the way in.
Flat

Flat











Location on Google map:


Location seems to be pretty nearby to Penang Second bridge and one end of the Penang Free Trade Zone. Down side, it is RM1.18million plus in Batu Maung and every time you go out or coming home, you'll be passing by lots of low-cost flat.

Something to think about. Happy Investing.

Tuesday 11 February 2014

Baby Fullmoon, where to find KFC vouchers?

Where to find KFC vouchers to buy?

Well, if you are in Penang, the main office of KFC for Penang is at Sunshine, Bayan Lepas.

If you know Sunshine Market and KFC Sunshine, it is right behind them. Also, Magnum 4D is right next door. The office is on the 2nd floor. There is an intercom you can press. Just tell them you want to purchase KFC vouchers and they will let you in.
You can see the outside view of the office on the right photo.


In case you still can't find it and you have a GPS, just enter these coordinates:

N 05 19.585', E 100 17.176'

View Larger Map

If you need vouchers in a hurry and can't wait for online delivery, this is the place you need to go.
You can instantly get KFC vouchers.
They have lots of variety to choose from.
Here is the catalog I saw:





















Bon Appetite ...





Another type of gift to try for Baby Fullmoon is Giving out Cupcake!!! Check it out here.



Sunday 9 February 2014

How to encrypt and zip in Mac OS

Neat trick without installing any software on Mac OS

Whenever you send files over email you are recommended to zip and encrypt your files.
This is giving a basic layer of protection for your privacy and also, you don't want your product's info get stolen and used by your competitors right?

Here's how to zip and encrypt:
1. Cmd + Space = Type "Terminal" and press enter
2. cd <path>     //to the path your file is at.
3. zip -e [archive file name] [files to zip]

To encrypt multiple files in a whole directory or folder:
zip -er [archive file name] [files to zip]

Example:
zip -e zippedfile.zip filetozip.txt
zip -er zippedfile.zip ~/Desktop/MyWork/

Enter password of your choice twice and you are done.
Attach the file to your email or store it in your upmost secure drive.



To unzip:
Can be done in Window or Mac.
In Mac OS X or other version, type unzip filename.zip

Should I join and contribute as a member of JMB or MC?


Do you...

  • Care about your place of living and want to improve or maintains the current standard?
  • Think something you can do better or faster or more efficient?
  • Know who stay at your apartment or condominium?
  • Make friends from different background of life?


Sparing an hour a week or so can help to do all that.. So, why not?



Image courtesy of digitalart /FreeDigitalPhotos.net

Next question, how do I get myself involve in this meaningful, non profit, volunteer work?
1. You can approach the Management at your condominium and offer your help
2. Volunteer yourself at an Annual General Meeting (AGM) which is held every year.

Roles:
There are up to 12 committee members are allowed. Top three post like any other club or society are Chairman, Secretary and Treasurer. Other 9 members are general members.

Once you start, believe me that you will learn a lot of things, skill, knowledge for yourselves.

What is the different between JMB and MC?
JMB stands for Joint management Body. It is 12 members from residences and 1 seat from the developer. They jointly working hand in hand to regulate and manage the condominium.

MC stands for Management Committee. This Is form from JMB after getting the condominium's or apartment's strata title. MC are fully run by residence only. Developer are not involve anymore.

Others

From my experience of one year basic committee at MC and one year as a JMB Treasurer at another condominium, I can tell you that, being part of the team that make changes that can immediately seen, the feeling is great. Lots of things in life, we contribute a lot, but you might not see result from it. Like work, you might be building a product for years and it might be canceled and your work will never be realized. However, as a member, we make decision monthly, weekly, daily, for the good of the community. Barrier gate broke down, residents can't go in and out normally, and our security of our community is at risk. We as the committee can take the appropriate action, go through all the quotations and talk to the vendors and finally make decision on which vendor to use and how to fix it.


Finalized your baby's name? Time to register at JPN

These information I can't find online. I only managed to know all these at the counter at JPN. Jabatan Pendaftaran Negara, in Malaysia. The officer was kind enough to let me know however I had to run around and spent unnecessary money photo stating at the nearby shop which charges outrages fees for a piece of photostats.

REQUIRED DOCUMENTS (ORIGINALS AND COPIES)

Confirmation of birth form from the hospital or certification of home birth from the midwife/doctor (original); 
Birth registration form JPN.LM01 that is completed; (ORI) (hospital provide and Fill it up while waiting for delivery)
Blue book - page 8 and cover (ORI and photostate)
Hospital book - page 7 (ORI and photostate)
IC (identification card) - father and mother (ORI and photostate)
Marriage cert (ORI and photostate)
Appointment card - day 1 till birth -  ORI and photostate (front and back)

FORGET TO photostate, 1 copy is RM0.20 nearby photostate copier.
I suggest you photostats all the require documents from home and bring along in your delivery if possible.

Breakdown to child's and parents documents


CHILD’S DOCUMENTS (ORIGINALS AND COPIES)
 1.    Birth registration form JPN.LM01 that is completed;
 2.    Confirmation of birth form from the hospital or certification of home birth from the midwife/doctor (original);
 3.    Prenatal card (maternity examination book) (original and copy); and
 4.    Child’s health and immunisation card (original and copy)  

PARENTS’ DOCUMENTS (ORIGINALS AND COPIES)
  1. Identity cards or entry permits or passports of the parents and the person reporting the birth (originals and copies);
  2. Marriage or divorce document or death certificates of the parents (originals and copies)
INFORMANT’S DOCUMENT (ORIGINAL AND COPY)
  1. Identity card or entry permit or passport (original and copy)

In Penang, there are a few branches. This is the headquarter. (opposite KDU college)
Jabatan Pendaftaran Negara 
Aras 3, Bangunan Persekutuan
Jalan Anson
10400 Pulau Pinang
Tel: 04-2265161/2558
Fax: 04-2269320
Office hour/ Operating Hour
Monday-Friday 7.30am - 5.30pm
Saturday and Sunday 8am - 1pm

Yes, they open Saturday and Sunday too!!!






Baby due, but what should a Dad be prepare to do?

Baby due after 9 months plus...
Time seems to be very slow the first few months... After mid point, time start to pick up speed and before you know it, due date is just around the corner.

As a Dad or husband, you will be asking what should I be preparing? Most guide online tell you about what a mom or pregnant lady going through but they fail to tell you what a dad/husband should be prepare for. Well, from experience, here it is:



1. Transport director

Be prepare with your car, or transport to the hospital. Check your petrol/gas to ensure it is at least half full.
Check backup car or driver, just in case, for a small chance that your vehicle is not operating at that very crucial moments. This is where your neighbor are your best bet.
Do note also, route to hospital is crucial. Must have at least three routes to the hospital. If you are even paranoid, you can even have a backup hospital in case it is really really too late.
Recently, my wife EDD expected due date came and it was very close to the famous Thaipusam festival. If you are in Penang, you will know when this happen, the roads nearby the Botanical Garden will be closed down. And mine hospital is Penang Adventist. With the road close, we had to use alternative route. And my GPS is on standby as well. Lucky, my little one came out after the festival.

2. Banker

When your baby is due and you arrived at the hospital. Wife will go to examine in delivery room or emergency room or at your prenatal check's doctor to ensure it is real contraction and you however will be rush to the cashier / admission counter. You will be require to pay the full payment of 3 days 2 night stay package before you even see the delivery suite. If you visiting your OG GY/ prenatal doctor, make sure you tell nurse, you need to see doctor as you suspect real contraction is happening. You'll get priority first.
Things to prepare:

  • Your identification card  (IC or passport for foreigner)
  • Wife identification card  (IC or passport for foreigner)
  • 2 credit cards ( in case one is over the limit)
  • O&G prenatal checkup Appointment card 
Image courtesy of hin255/ FreeDigitalPhotos.net

3. Massager ( Masseur)

During labor, while your wife having contraction pain, for some reason, when baby is been squeeze by contraction, it is pushing against your wife's back. Her back will be in extreme pain. Your job? Your job is to massage her back the whole time she is having contraction.  This is extremely reliving for your wife. 
This is your almost only contribution as a loving husband.

4. Motivator 
Focus on her breathing 
This is really crucial during the 1st and 2nd phase of labor. Once she feel pain, she will naturally tense up her whole body. This does not help but causes more pain for her. What you can do is breath long deep breath with her. Ask her to focus on her breath. This relieve the pain better than the laughing gas.

Reassure her
Confirm her confidence. "you can do it" "you can handle it" and last stage is always the famous "I can see the baby's hair, continue pushing"
On this item, I must confess, the mid-wife did a wonderful job here. She keeps reassure her that she can do it, It's almost done. I believe a mid-wife attitude and support is very important for a delivery. Mid-wife was there from 10am till 7pm, but doctor only comes in for the last 30mins.
Doctor for skill in completing it, and mid-wife for motivator and the friend you need during the long hours of labor. I must compliment that Penang Adventist Hospital's mid-wife for being very supportive, very helpful throughout the labor. Thanks, you all have made our life much better. :)

Last but not least, relax and enjoy the process. Be cool and calm. Go to hospital around 10mins apart contraction if your hospital is within half an hour away. Even then, there are plenty of time. Even if your wife's water bursted, you still have 24 hours to deliver the baby. So no rush, take slow and steady drive. Safe for baby, your wife and everyone else on the road. Also, always consult your doctor as your doctor know your wife best.

Happy delivery! 
Leave comment if anything is unclear.
Hope this have been helpful for you.

Saturday 8 February 2014

2014 Happy Chinese New Year

A new year with new beginning.
I found it very useful to start a new year with Resolution and goals.
I know, you will think, we have done this in previous yearsss.. and still no different.

I can tell you with personal experience that, it works!!!
Once you set a Resolution, think and focus on it. Then just Do it!!
Past year, I set a goal to buy a Property in 2011. Although, at the beginning there was some challenges. First was the hunting, and searching. Once that lock down, around mid of 2011, I make an offer to buy. However, the owner back out the deal and didn't sign the agreement. Well, I didn't give up and continue to search.

Finally, at the end of the year, I did it. I bought my first property!!!

What's your Resolution for 2014? Think and write it down and then make it happen.
1. ..........
2. ..........