Tuesday, September 13, 2011

Show non-printable characters in VI

You just KNOW there's a stray tab or other character in this file, right? So how can you display these characters in vi?

[ESC] to get into command mode
:set list

Look through the file. Tabs will be ^I, DOS-style end-of-lines will be ^M, etc.

To go back:
[ESC] to get into command mode
:set nolist

Sunday, September 4, 2011

How to do print screen in Mac OS X

Yesterday, I wanted to do a print screen in Mac OS X but there is not print screen button in Mac keyboard o_O
There are few ways to do screen capture in Mac OS X.
Follow the steps below and you will be able to do a screen capture in Mac OS X.
  • Hold down Apple key ⌘ + Shift + 3 and release all keys
  • Hold down Apple key ⌘ + Shift + 4 and release all keys

My favorite is the second option, the result will be on your desktop a new Image File :D