It’s been a while….

That I haven’t got up here to update things I’ve learn on the way.  I know it’s not right and not good for the continuity of my coding study (which hasn’t stop btw), so here I am trying to keep the good habit up.

So here’s a quick shot of what I’m doing, I bet many ppl are doing or did it already…



The updates of WWDC 2014 is the best one as I see since 2007.  The new programming language and all new features added to iOS/OSX development are just amazing.  The 2 hours WWDC is so much better than the Godzilla movie I saw last Sat!

BTW, some ppl who’s also learning iOS development as I do might wonder whether they should continue learning Objective-C, given the newer, better and faster Swift is coming in the fall.  If you do have such doubt, I suggest you Google around.  You will notice that you are not alone.  Better yet, check out this blog by JON FRISKICS in Code School, about his (Early) thoughts on Swift, Apple’s new programming language.  JON is the lecturer of iOS in Code School, and I believe you’ll be clear on what you should do now on your journey of iOS/OSX program learning.

Happy Learning and Coding.  Bye now!


HotKey Roundup for Everything

As I’m now using MAC (use Windows before) for learning the coding and later on development, I find hotkeys for MAC and other new things I’m learning a must-used now.  Just Google some useful hotkey and I will put them here for regular referencing and update.


# basic
HOME:  command-left arrow
END:  command-right arrow

# browser
New_tab:  command-T
Close_tab:  command-W
New_window:  command-N
Close_window:  shift-command-N

# screen capture
capture the entire desktop: command-Shift-3.
copy the entire desktop: command-Control-Shift-3
capture a portion of the desktop: command-Shift-4
capture a specific application window: command-Shift-4, then Spacebar

It’s not finished yet and I’ll keep adding new hotkeys that I should repeatedly using on my code learning way, not necessary only for MAC.

Install Tracmor on LAMP (ubuntu 12.04 LTS)

1. Install ubuntu 12.04

2. Install LAMP, ref:

$ sudo apt-get install tasksel
$ sudo tasksel install lamp-server

3. Configure LAMP, ref:

$ sudo usermod -a -G www-data 
$ sudo chgrp -R www-data /var/www
$ sudo chmod -R g+w /var/www

log out and log in to reflect changes, also install the extra


$ sudo apt-get install php5-curl

Mod rewrite:

$ sudo a2enmod rewrite

GD2 Graphics Lib:

$ sudo apt-get install php5-gd


$ sudo apt-get install php5-xsl

4. download Tracmor from Github, extract the file to /var/www

5. open MySQL, create database ‘tracmor’ source ‘create.sql’ and ‘data.sql’ in folder /data_model

6. setup in folder /includes, ref: INSTALL in tracmor folder.

Remember to put ‘/var/www’ in __DOC_ROOT__ , and put ‘/<tracmor folder name>  in __SUBDIRECTORY__.

change // Location of tmp directory as DEFINE(‘__TRACMOR_TMP__’, __SUBDIRECTORY__ . ‘/tmp’);

Useful Command:

Restart Apache

$ sudo service apache2 restart

Trouble Shooting

1. If there’s something wrong about PHP, reinstall PHP 5

$ sudo apt-get install libapache2-mod-php5

Enable this module by doing

$ sudo a2enmod php5

2. If you have this error

apache2: Could not determine the server’s fully qualified domain name, using for ServerName

then use a text editor such as “sudo nano” at the command line to create a new file,

$ sudo nano /etc/apache2/conf.d/fqdn

then add

ServerName localhost

to the file and save. This can all be done in a single command with the following:

$ echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn

3. If you happen to encounter this error after signing out

dir(/tmp,/tmp) [function.dir]: The system cannot find the file specified. (code: 2)

add this line to the file “” in folder /includes/:

QFileFormStateHandler::$StatePath = "your path to/Tracmor";