Check what color works on your Vim

Jan
12

To test what color works on your Vim, you can type this on an open Vim session:

:e $VIMRUNTIME/syntax/colortest.vim
:so %

To actually change certain syntax color, you need to Google your way out :)

One example is to change the color for a comment:

hi Comment ctermfg=blue

Useful Web Dev Articles This Week

Dec
1

Top 20+ MySQL Best Practices

9 Most Common IE Bugs and How to Fix Them

Zen Coding: A Speedy Way To Write HTML/CSS Code

Backing-up Your SVN Repository

Oct
21

To back up your SVN repository:

svnadmin dump path_to_svn_repo > backup_filename
tar cfz backup_filename.tgz backup_filename

Then to restore the SVN dump somewhere else:

tar xfvz backup_filename.tgz
svnadmin create new_svn_repo
svnadmin load new_svn_repo < backup_filename

Replacing Tab with Space in Vim

Sep
28

I found it annoying working with tabs as different system has different spacing for tabs. So I usually like to replace tabs with spaces. In Vim, you can do this by adding this line to your ~/.vimrc :

 set tabstop=2 shiftwidth=2 expandtab 

’set expandtab’ here means that you want to use soft tabs instead.

If you find a file that uses all tabs instead of space, Vim also provides a convenient way to convert those tabs. First ensure that ’set expandtab’ is set, then you can type the command:

 :%retab 

Ken Robinson Talk on Education System that Nurtures Creativity

Sep
16

Sir Ken Robinson is author of Out of Our Minds: Learning to Be Creative, and a leading expert on creativity, innovation and human resources. In this talk, he makes an entertaining (and profoundly moving) case for creating an education system that nurtures creativity, rather than undermining it.

By the way, he’s coming to UBC Vancouver campus where I’m studying on September 30. I’m hoping to attend his talk.

Installing JDK in Ubuntu

Sep
9
  1. Look up the JDK version you want to install first
    apt-cache search jdk
    
  2. Then choose to install JDK.
  3. sudo apt-get install sun-java6-jdk
  4. Setup an environment variable for JAVA_HOME to point to the location of the JDK installation path (normally located at /usr/lib/jvm/java-6-sun/) by entering below line on your .bashrc file (located on your home directory, e.g. /home/username/.bashrc)
  5. export JAVA_HOME="/usr/lib/jvm/java-6-sun/;"

First Post!

Sep
6

I’m excited to introduce my own blog that I have wished to setup for a long time now. In this blog I will mainly talk about interesting things relating to programming (e.g. tips, how to’s), technology, my hobbies including photography, and spiced up with bits of latest interesting news/articles.