Thursday, July 10, 2008

wireless in ubuntu

I changed to Ubuntu for no reason. Just want to try something different. It turns out to be a happy (and easy) change. The only thing hit on me was the wireless network. It couldn't "easily" (I mean, with a lot of my help, it could) find hidden wireless access point. But University only give me hidden wireless. A little bit search lead me to the following solution:
install wicd. google wicd will show you everything.

It is simple again. I like it.

Oh, one more thing, ubuntu is an OS and only an OS. It has not many software come with it. If you are a researcher, like me, you need to install (it is easy though) all softwares that you need. A short list for me:

gnuplot
vim (the default one is too basic)
xifg
compiz-fusion (for amusing your windows friends, maybe not anymore with vista)
pdftk
. . .

Sunday, June 29, 2008

Difference of "change line mark" between windows and unix

In unix, line ends with a new line charactor, i.e. 0x0a.

In DOS/Windows line ends with a carriage return and new line pair, i.e.
0x0d0a.

In your case, every line ended with a carriage return, i.e. 0x0d, which is
displayed as '^M' in vi.

You need to replace every '^M' to new line in vi with the following command:

:%s/^M/\r/g

Note: ^M is entered as pressing 'v' and 'm' while holding 'Ctrl'.

OR :%s:\r:\r:g

Tuesday, June 17, 2008

save time on startup in Fedora

Turning off network service can save some time in startup process in Fedora especially laptops.

How-to:
1. go to System -> Administration -> Services
2. turn off 'Network' service on all run levels.
3. DONE.

Next time when you boot up, you will notice the system stop checking network devices like eth0, wlan01 . . . This is good for laptops which frequently check network access points.

Monday, May 19, 2008

ATI driver for Fedora

http://forums.fedoraforum.org/showthread.php?t=155503&page=1&pp=10

So far, ati cards are not supported.

Friday, May 9, 2008

Vim Tip: Mutliple windows and vimdiff

Vim Tip: Mutliple windows and vimdiff

Using multiple windows in VIM is a great way to do side-by-side editing, comparison and cut-and-paste (yank-and-put). Unlike other editors, you can do all this with your hands on home row. Learning to use multiple windows will also help you make better use of the built in :help, and also makes it easy to learn a powerful file comparison tool: vimdiff.

To open a file in a new window, use either ":split filename" or ":vsplit filename". vsplit is nice when you can devote an extra-wide window to VIM. If you leave of the filename argument, the split will be performed on the file you are already editing.

Navigating between windows is simple. Every window command starts with a "ctrl-w". Then you can move between windows with h,j,k,l or the arrow keys as you would normally move between lines. Some other useful window commands are:
ctrl-w c - Close this window
ctrl-w o - close all Other windows (mnemonic - Only)
ctrl-w 5+ - increase this window size by 5 lines
ctrl-w 5- - decrease this window size by 5 lines

With these window commands, we're ready to use "vimdiff". Start vimdiff from the command line:
% vimdiff a.txt b.txt
Vim will open the two files in "vsplit" mode, and will highlight differences between the two. I have attached an example of this. There are just a few more commands that are needed to be proficient with vimdiff:
do - (diff-obtain) obtain differences from other window into this one
dp - (diff-put) push differences in current window to the other window
zo - open a block of folded text