Monday, April 30, 2007

The Geek World

Recovering from overwork. I sometimes have character shift, and feel myself an undefined geek, trying to prove undefined geek-ness. Whatever, I am over that. Mind plays on to make me believe, things which I am not. Its sometimes ok to probably think. But yes, it would have definitely been great, to be a true geek.

Sunday, April 29, 2007

Busy

For some time, I have not posted, because I have been extremely busy.
But my mind had been working..
and here are some of the thoughts which has remained through...
1) feeling of death
2) Drugs abuse
3) relationships
4) finance
5) Exams..

Wednesday, April 4, 2007

copied from here
Okay, this is what I do. I only know the basic. But before doing this, please backup your source code, patch wrongly will screwup your source code.

First, how to create patch file?
Patch file is a readable file that created by diff with -c (context output format). It doesn’t matter and if you wanna know more, man diff. To patch the entire folder of source codes(as usually people do)I do as bellow:

Assume Original source code at folder Tb01, and latest source code at folder Tb02. And there have multiple sub directories at Tb01 and Tb02 too.

diff -crB Tb01 Tb02 > Tb02.patch

-c context, -r recursive (multiple levels dir), -B is to ignore Blank Lines.
I put -B because blank lines is really useless for patching, sometimes I need to manually read the patch file to track the changes, without -B is really headache.

How to patch?
First of all, please do a dry-run before really patch it. Bare in mind, patch will be working very specifically. Let say the version 3 Tb03.patch is use to patch from Tb02, if you apply patch on Tb01, sometimes it will corrupt your source code. So, to make sure it works, do a dry run. Dry-run means a fake-test, do it at the directory of the source code targeted to patch.

Doing dry-run like this:

patch --dry-run -p1 -i Tb02.patch

The success output looks like this:

patching file TbApi.cpp
patching file TbApi.h
patching file TbCard.cpp
...

The failure ouptut looks like this:

patching file TbCard.cpp
Hunk #2 FAILED at 585.
1 out of 2 hunks FAILED -- saving rejects to file TbCard.cpp.rej
patching file TbCard.h
Hunk #1 FAILED at 57.
Hunk #2 FAILED at 77.
Hunk #3 succeeded at 83 with fuzz 1 (offset -21 lines).
....

At last, if the dry-run is giving good result, do this and enjoy the compilation.

patch -p1 -i Tb02.patch

Monday, April 2, 2007

Namesake

Nice movie. After a very long time a simple movie. No Masala. It tasted splendid. Irfan and Taboo's acting was marvelous.

List directories via 'ls -d' - surprised me

List directories via 'ls -d' - surprised me This was one of those feelings where I was left surprised with the humble linux comm...