James Blog


  • Home

  • Archives

  • Tags

  • Search

Vim Tips

Posted on 11-06-2017 | In Tech

Comment/Uncomment block of code

Comment:

  1. Press esc
  2. Press control + V to enter VISUAL BLOCK mode
  3. Move the cursor to the end of block that you want to comment
  4. Press shift + I to enter INSERT mode
  5. Type any comment (i.e. #), in the first line of block
  6. Press esc to finish.

Uncomment:

  1. Press esc
  2. Press control + V to enter VISUAL BLOCK mode
  3. Move the cursor to select the code you want to delete
  4. Press X
  5. Press esc to finish.
Read more »

Command Line Tips

Posted on 11-06-2017 | In Tech

Using diff to compare command output to a file

We know diff can compare two files, but how can it compare the output of a command to a file? The answer is we use <( ), which is called process substitution. We put the command inside process substitution, and it will convert the command’s output as a file so diff can read it. For example,

1
$ diff <(python list.py) list.txt
Read more »

Notes on Git Basic Usages

Posted on 08-29-2016 | In Tech

After taking the CS101 and CS2103, I find out that git is very useful. It can easily helps me record my edition of the file and help me revert it. But I am always forget the command of different usages, so hope this post can be like a note for me to remember. :)

Read more »

A Month in Singapore

Posted on 08-27-2016 | In Study Abroad

Something about School:

At NUS, module (class) size is very small. There are many classes like my mobile app class, there are only 20+ students. In my other classes, there are only about 150 people. One thing surprised me is there’s only one (2 hours) lecture each week. During lecture, there are many empty seats and it is pretty cold inside due to the air conditoner. Professor usually use PowerPoint with many pictures. There’s not much difference between here and the US. Besides lecture, each class contains tutorial, which is like session discussion, and some classes have lab. During tutorial,  the TA would divide students into small groups (around four people in a group). Each group would present the pre-tutorial exercieses and discuss about it. For lab, the attendance is not required, but require students to show the lab exerciese to the TA to check out. This semester, I enrolled five modules, and I think I need a lot of self practice and learning in order to get good a mark (grade).

Read more »

First Two Weeks in Singapore

Posted on 08-09-2016 | In Study Abroad

Busy, I haven’t touched my laptop since arriving here. Everyday, I went for different activities, like orientation, student pass, school tour. Besides these, I traveled around Singapore, like shopping mall, Chinatown, library, marina bay. At night, I went to clementi st (后街) for supper, play card games. And today, I met people on wechat and we played ping pong. After a week, I finally can settle down here, like knowing where to wash clothes (it’s nice to that it’s free to wash clothes), filling hot water, and know where to eat lunch.

Read more »

Manage Multiple Github Repositories on Mac

Posted on 06-24-2016 | In Tech

Preface:

I recently switch from bluehost to hostgator because my bluehost account is expired after using it for three years. Its renewal price is $250, but creating a hostgator account is only for about $170. Another thing is I am not going to recover the old posts since I haven’t updated them for a long time, but from now on, I will keep updating this blog.

Read more »
1 … 22 23
James Huang

James Huang

226 posts
4 categories
48 tags
GitHub LinkedIn Twitter Portfolio
© 2025 James Huang
Powered by Jekyll
Theme - NexT.Muse