Live Chat!

vim taglist plugin for developers

* * * * * 1 votos

June 1st, 2008 mysurface

Taglist plugin provides vim to support source code browsing capabilities at sidebar. When you enable taglist, sidebar windows will be listing functions, classes, structures, enumerations, macro definitions and other parts of a source code file as shortcut. Shortcut will jump you to the particular portion of codes within a single page.

The taglist may [...]

Posted in vi, vim | Hits: 11307 | No Comments »

Discover user guides and manuals within your linux system

          0 votos

May 9th, 2008 mysurface

Do you realized that we can obtain a lots of user manuals and guideline documents from our system? There is a folder /usr/share/doc, you may find some useful docs already preinstalled by your distro. Those docs are in pdf or html format. I manage to find user manuals for valgrind, ipython, systemtap, boost etc.
I believes [...]

Posted in Common, echo, find | Hits: 18421 | 2 Comments »

vim with ctags for multi-level directory hierarchy

          0 votos

April 24th, 2008 mysurface

I have wrote a post regarding vim with ctags, introduces how ctags allows you to travel across source codes, searching for function, objects, variables definition. To jump from function call to function definition, I usually do ctrl+] in vim. It should works fine as it should have already configured by default from most of the [...]

Posted in Developer, Text Manipulation, ctags, vi, vim | Hits: 15090 | 4 Comments »

rpm and yum rescue tips on Fedora

          0 votos

April 22nd, 2008 mysurface

You have to be careful when you run yum update and yum install, DON’T force kill it, kill -9 or pkill -9. Those action are consider very dangerous, may lead you to losing certain files. Seriously, I hate yum, when I really wanna cancel the process in the middle, by hitting ctrl+c doesn’t really work! [...]

Posted in Admin, awk, rpm, which, yum | Hits: 14713 | No Comments »

Obtain some system statistics from vmstat

* * * * * 1 votos

December 8th, 2007 mysurface

vmstat know as virtual memory statistics reporter, but it gives more information the just only virtual memory.
Besides memory, it covers overall CPU usage, IO, Swap, Proc, System interupts and context switching. vmstat is pretty easy to use, ignores all other options, the normal usage will be looks like this:
vmstat [delay] [counts]
Let say, you want to [...]

Posted in Admin, date, tail, vmstat | Hits: 27571 | 4 Comments »

How to redirect output to a file as well as display it out

* * * * * 1 votos

December 6th, 2007 mysurface

To redirect standard output to a file is easy, you just need to use the redirection symbol, for example:
echo “hello world” > test.txt
But what if I want to display it out as well as store into a file?
Answer: tee
echo “hello world” | tee test.txt
Okay it seems very easy, how about append?
Related PostsRedirect stderr to stdoutVery [...]

Posted in Text Manipulation, pipeline, python, tee | Hits: 25901 | 1 Comment »

write a online manga downloader using bash

          0 votos

November 29th, 2007 mysurface

There are plenty of site that allows you to read manga online, but you have to tolerate for the slow access and ton’s of heavy loaded ads. You can’t download the manga directly using batch download provided by wget or any download manager. but if you know how to do bash script, you could somehow [...]

Posted in Bash, Text Manipulation, seq, wget | Hits: 20771 | 4 Comments »

pcregrep, grep based on perl compatible regular expressions

          0 votos

November 20th, 2007 mysurface

grep supposedly support perl regex by specified -P option, but somehow my grep do not support that, it complains this when I trigger with -P
grep: The -P option is not supported
But when you check the manpage of grep, you will see this
-P, –perl-regexp
[...]

Posted in Regular Expression, Text Manipulation, pcregrep, printf | Hits: 21503 | No Comments »

what is your 10 common linux commands?

* * * * * 2 votos

October 27th, 2007 mysurface

Dear command line ninjas, Mr CLI and keyboard pianist:
What is your regular command you use? I am sure you must thinking of ls and cd. Yeah, they are common for every users, but how about the rest of them? I have construct a combos of commands to help you identify your top ten linux command. [...]

Posted in Common, awk, column, grep, head, history, nl, sort | Hits: 19586 | 20 Comments »

rm complains argument list too long

* * * * * 2 votos

October 20th, 2007 mysurface

There is a limitation of rm command, where you can’t delete a large groups of files with *. For examples,
rm -rf something*
If there are large amount of files initiate with something, rm will fails and complains
/bin/rm: Argument list too long.
The solution is to make use of find, xargs and rm.
find . -name ’something*’ -print0 | [...]

Posted in Common, find, rm, xargs | Hits: 13079 | 5 Comments »