Live Chat!

perform grep and make in vim

          0 votos

June 15th, 2007 mysurface

We can do grep and make in vim, the advantage of doing that in vim compare to terminal is you can use the result to track the error and warning for make or goto the line and files of the grep results.
How to make in vim?
:make
In order to make, the current directory must contain a [...]

Posted in Text Manipulation, grep, make, vi, vim | Hits: 23972 | 1 Comment »

A better svndiff, allow comparision between different revision

          0 votos

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: 19444 | 4 Comments »

obtain core dump by aborting the running apps

* * * * * 1 votos

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 and been terminate [...]

Posted in kill, pkill, ulimit | Hits: 23828 | 4 Comments »

CLI magic: programable bash completion

* * * * * 3 votos

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 of [...]

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

svn command line tutorial for beginners 2

* * *     6 votos

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 svn repo?
This [...]

Posted in Developer, diff, mv, svn, vimdiff | Hits: 46557 | 9 Comments »

svn command line tutorial for beginners 1

* * * * ½ 5 votos

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 a [...]

Posted in Developer, svn, svnadmin, svnlook | Hits: 46528 | 11 Comments »

debug a currently running program with GDB

* * * *   2 votos

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: 11681 | 1 Comment »

how to make love in linux

* * * * * 1 votos

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 probably know [...]

Posted in Developer, make | Hits: 7390 | 3 Comments »

Convert newline between UNIX & DOS

          0 votos

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
A UNIX newline (LF) is [...]

Posted in Text Manipulation, fromdos, hexdump, todos | Hits: 12530 | No Comments »

compile D programming using gdc

          0 votos

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 c and c++ [...]

Posted in Developer, gdc | Hits: 9538 | No Comments »