A better svndiff, allow comparision between different revision

May 18th, 2007 mysurface

Refers back to svn command line tutorial for beginners 2, I introduces a bash script that uses svn cat and vimdiff to compare files. This simple script written by Erik C. Thauvin only allows you to compare latest revision source with working source. What if I would like to compare my current working source with [...]

Posted in Developer, Misc, svn, vimdiff | Hits: 51403 | 4 Comments »

obtain core dump by aborting the running apps

May 13th, 2007 mysurface

To obtain core dump, the line bellow is mandatory. ulimit -c unlimited Check out generate coredumps to help developer for debugging for more details of ulimit. Core dump will be generated automatically if a program crashed due to segmentation fault or some other reason. But core dump will not be generated if an application halt [...]

Posted in kill, pkill, ulimit | Hits: 70617 | 6 Comments »

CLI magic: programable bash completion

May 4th, 2007 mysurface

Ubuntu, a Linux distribution that is getting popular because it has successfully improves it’s user friendliness with simple User interface. You can install any applications with few clicks, configuration under GUI dialogs etc. People usually have the thinking of maybe one day, Ubuntu will become another new operating system like Microsoft Windows. Never! The concept [...]

Posted in apt-cache, apt-get, Bash, complete, pipeline, sort, svn | Hits: 92081 | 10 Comments »

svn command line tutorial for beginners 2

April 17th, 2007 mysurface

This is the continues tutorial for svn command line tutorial for beginners 1. The previous post covers Introduction of subversion, installation links, how to get help, create svn repository, import files into a new repository and list the files inside a repo. svn command line tutorial for beginners continues …. How to checkout files from [...]

Posted in Developer, diff, mv, svn, vimdiff | Hits: 200997 | 16 Comments »

svn command line tutorial for beginners 1

April 17th, 2007 mysurface

svn can be known as subversion, it is a version control system after cvs. It claims to be out perform cvs, one of the features of svn is it do support versioning for documents and binaries beside source code. As you search for subversion, it may lead you to the page of http://tortoisesvn.tigris.org/. Tortoise is [...]

Posted in Developer, svn, svnadmin, svnlook | Hits: 315981 | 48 Comments »

debug a currently running program with GDB

April 9th, 2007 mysurface

Here is a quick tips of GDB. There is a time when I was working on a module that was written in c/c++ hangs in the middle of execution. I have no clue how it happens, and it happens quite rare. I keep guessing and try to feed in more debug print lines to search [...]

Posted in Developer, gcc, gdb | Hits: 31227 | 2 Comments »

how to make love in linux

March 13th, 2007 mysurface

Okay, the title seems odd, and it is misleading. This is not my intention, I just want to have some fun after coding for hours. This post is showing you how to make your linux terminal respond when you type make love How could it possible? If you are c/c++ coder in unix environment, you [...]

Posted in Developer, make | Hits: 20183 | 6 Comments »

Convert newline between UNIX & DOS

February 10th, 2007 toydi

There are several ways to convert newlines between UNIX-style (LF) and DOS-style (CR+LF). I like todos, fromdos commands (or unix2dos, dos2unix) for their simplicity. Sometimes they are not installed by default, try to search your repository for a tofrodos package . Let’s try. Simply create a text file, foo.txt that contains a newline: aaa bbb [...]

Posted in fromdos, hexdump, Text Manipulation, todos | Hits: 38566 | 1 Comment »

compile D programming using gdc

January 27th, 2007 mysurface

How you heard about D programming? It is a new programming after c and c++. A stable version, 1.0, was released on January 2, 2007. To compile D source code, you can uses GDC, it works just like gcc and g++. gdc -o sample{,.d} Check out the D programming homepage for more details. Related Postscompile [...]

Posted in Developer, gdc | Hits: 22326 | 1 Comment »

compile c and c++ source code

January 27th, 2007 mysurface

There are plenty of c and c++ compiler under unix based operating system, but the most famous one should be GNU gcc compiler. A well known open source kernel Linux is compiled by gcc as well. This post is to introduces you how you can use gcc to compile c and c++ source code, if [...]

Posted in Developer, g++, gcc | Hits: 113793 | 31 Comments »