Thursday, December 26, 2013

[Solution] Problem in installing Rails 4.0

If you have problem in installing Rails 4.0, you can try this before bundle/install:

gem update --system 2.0.3

Hope this will help you.

Sunday, December 22, 2013

Things to Watch Out When Planning Your Trip

It is very rare that you run into unexpected condition in your travel plan. Here are the problems that I run into:

1. Interruption of transport
People use Couchsurfing to get people together and travel. I use that website too and this is my second disappointments of using that website. I found a person on the website and had everything planned out for our trip, and will be using his car to travel. The night before my flight, he bailed out  and now I am stranded in my first destination without transport.
Advice: Always have backup plan, I had looked through several alternatives for stable medium to transport and they cost a lot, eg flight and train. For last minutes plan change, you could always try your luck in craiglist for shared rides. In the end you might want to change your travel plan, to bring down the cost.

2. Extra baggage fee
If you book your flight in cheap, you might want to call every single airlines that you use to make sure all the terms and condition. I fly with Frontier, but all my flight is done in American Airlines. For your information, you will be charge an extra fee for carry on luggage (up to $100) if you book from 3rd party.
Advice: Always call your airlines to confirm your flight, you will never know what will be the terms unless you call.

3. Accommodation unavailable
This only goes to those who stay at friends' place. You should not expect people to keep their promise all the time, because they will revoke their words and you will have absolutely no place to stay.
Advice:  Look up for backup place to stay and estimate the cost. Hostels are good place to look for, normally they are cheap and you can meet other people doing the same travel.

Although I have not start my journey, I had encountered all of these issues that I called "travel risk". So, if you want to travel, always think of a backup plan and you could avoid problems with extra budget.

Tuesday, November 5, 2013

[Fixed] Intel wireless N 6230 on Ubuntu

I had issue with the Intel wireless card, and it kept on dropping connection when I am working online, thus I look for solution online.

Then I found this: http://ubuntuforums.org/showthread.php?t=2012228

To put it in short:
  1. Open terminal in Ubuntu
  2. Type:
    gksudo gedit /etc/pm/power.d/wireless
  3. Then enter these inside gedit: 
    #!/bin/sh
    /sbin/iwconfig wlan0 power off
    exit0
  4. Save and close gedit.
  5. Run the following commands:
    echo "options iwlwifi 11n_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf
    sudo modprobe -rfv iwlwifi
    sudo modprobe -v iwlwifi
    sudo reboot
     
     If you still having issue with the wifi, 
    navigate to /etc/modprobe.d, 
    then sudo gedit iwlwifi.conf 
    Edit the line to:
    options iwlwifi 11n_disable=1 wd_disable=1 bt_coex_active=N  
     

Friday, November 1, 2013

Convert arguments into array in javascript

Let see this senario:

var func = function(){
      arguments.push('foo');
}

Then you run func('a', 'b', 'c'), you will get Object has no method 'push'.

To enable your arguments being treated as array,

var func = function(){
        var arry = Array.prototype.slice.call(arguments);
        arry.push('foo');
}

You would able to use the push method, because you have converted the arguments into array.

Monday, October 28, 2013

Things You Need for Technical Interview

If you are a student and getting scheduled for a phone interview, you might find this useful.

Generally, you will need your phone (obviously), and a laptop. Remember to find a space that is quiet enough and have good internet connection. To make sure that your phone have enough power throughout the interview, you will need to have the USB cable for your phone.

Find a spot 1/2 an hour before the interview starts. Boot up your laptop with power adapter plugged in. Charge your phone using the USB port on your laptop. Connect you phone with a headphone. You are ready for your phone interview. Stay chill and confident to yourself.

In short, things that you need are:
1. Phone
2. USB cable / charger
3. Headphone
4. Laptop with power adapter

**Why laptop? Because this is meant for software developer's phone interview =)

Sunday, October 27, 2013

Roast Pork Belly improv

Today, I tried to make myself a roasted pork belly, and it is quite successful after a few tweaks.

Steps:
  1. 1. Marinate pork belly with salt, black pepper and paprika for 1/2 hr.
  2. Preheat the oven to 400F.
  3. 2. Prepare a sheet of aluminum foil and place shredded ginger and garlic on it.
  4. 3. Place the pork belly on top of the ingredients.
  5. 4. Clean and dry the skin of the pork belly.
  6. 5. Spread oil on top of the skin.
  7. 6. Sprinkle salt on top of the skin.
  8. 7. Wrap the aluminum foil around the pork belly, until the level of the fat layer, not covering the skin.
  9. Place it into the oven.
  10. Roast the meat for 20 minutes, then turn the heat to 350F and roast for 45 minutes.
  11. Check the skin of the pork, if the skin is not harden yet, adjust the aluminum foil to expose more pork fat layer and turn up the heat to 400F.
  12. Check the meat every 10 minutes, until you get the texture that you desire.


Roasted Pork Belly