Strategy Pattern Exercise – Action Adventure Game

Strategy Pattern (image source from Wikipedia): 



Exercise Description:







[Lubuntu] Change Brightness

I’m using Lubuntu 14.04 and I found that you will have to make sure “Power Manager” is running for the brightness fn-keys to work.

To start Power Manager, go to Menu > Preferences > Power Manager

Once this is started, you should be able to adjust screen brightness with fn-keys.

Alternatively, you can read off my other post on autostart power manager so you can adjust your screen brightness without going through all the manual-clicking.


SSH Key on Unbuntu

First generate the key from the terminal:


Then, copy the key from the following command:

cat ~/.ssh/

Finally, paste the key you have into the git service that you are using (I’m using bit bucket in this case). It should looks something like below:


Ubuntu 14.04 – Change Apache DocumentRoot

This answer is taken from StackOverflow by the community wiki:

Please note, that this only applies for Ubuntu 14.04 LTS and newer releases.

In my Ubuntu 14.04 LTS, the document root was set to /var/www/html. It was configured in the following file:


So just do a

sudo nano /etc/apache2/sites-available/000-default.conf

and change the following line to what you want:

DocumentRoot /var/www/html

Also do a

sudo nano /etc/apache2/apache2.conf

and find this

<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted

and change /var/www/html to your preferred directory

and save it.

After you saved your changes, just restart the apache2 webserver and you’ll be done 🙂

sudo service apache2 restart

If you prefer a graphical text editor, you can just replace the sudo nano by a gksu gedit.

The 5 element of effective thinking

  1. Grounding your thinking: understand deeply
    • Understand simple things deeply
    • Clear the clutter — seek the essential
    • See what’s there
    • See what’s missing
  2. Igniting insights through mistakes: Fail to succeed
    • Welcome accidental missteps — let your errors be your guide
    • Finding the right question to the wrong answer
    • Failing by intent
  3. Creating questions out of thin air: be your own Socrates
    • How answers can lead to questions
    • Creating questions enlivens your curiosity
    • What’s the real question?
  4. Seeing the flow of ideas: look back, look forward
    • Understanding current idea through the flow of ideas
    • Creating new idea from old ones
  5. Engaging change: Transform yourself

The Five Lessons a Millionaire Taught Me

By – Richard Paul Evans


  1. Decide to be wealthy
  2. Take responsibility (Management)
    1. Money is a good servant, but a terrible master.
    2. Know where the money is from and know how it goes
  3. It’s not what you earn; it’s what you keep that makes you rich
  4. Win in the margins
    1. Is it the best you can offer?
    2. Would you like a refrigerator to go with that house? → Appliance is then added to the house mortgage. 😦
  5. Give back: be appreciate of what you have and what you can give in the given lifetime.


Note on Air Travel tip:

  • Fly on Sundays rather than Saturdays
  • Book flights early (at least 2 weeks in advance)
  • Buy tickets during workdays (weekend price is higher)