vim taglist plugin for developers

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 have already installed by default at some linux distro, try to type the line below in your vim to verify.


If the tagllist appears as sidebar, meaning taglist was installed. If not, you may download taglist plugins from

You may want to add a key bindings to toggle the Taglist, append this into ~/.vimrc

nnoremap <F12> :TlistToggle

In console, to switch between main window and taglist sidebar window, you can press CTRL+WW. Wheres in gvim, you do not need to switch between taglist window and main window, you may just double click the shortcut.

Taglist support for many programming and scripting languages, such as Assembly, ASP, Awk, Beta, C, C++, C#, Cobol, Eiffel, Erlang, Fortran, HTML, Java, Javascript, Lisp, Lua, Make, Pascal, Perl, PHP, Python, Rexx, Ruby, Scheme, Shell, Slang, SML, Sql, TCL, Verilog, Vim and Yacc.

Taglist also do not limit to the language above, because taglist allow you to easily extend the support of new languages. Learn more about taglist at

Posted in vi, vim | Hits: 84761 | 4 Comments »

The social web browser – Flock

May 28th, 2008 mysurface

The social web browser - Flock

Nowadays, we don’t get ourself online just to search for information. Through internet we always get connected with our friends and family no matter what time and where they are traveling to. There are so many social networking web services such as Facebook, Friendster, Twitter, Myspace etc connecting us together. We can share our story, our ideas, our feelings and our findings through blogs. We uploads and share photo’s and video’s too.

Flock is a Mozilla based web browser that recently wins the webby awards under category Social Networking. Flock improves user experience on

1. Blogging right in Flock with support drag and drops from amazing clipboard.
2. Social with friends through Facebook, Youtube, Twitter
3. Check Google and Yahoo mails.
4. Uploads photos in batch by just drag and drops to Flick, Picasa and Facebook.
5. More!

Check it out the demo video HERE!

Besides those features Flock provides you, you would able to install Firefox plugins into your Flock. That is the best part I like about Flock, because I rely on some plugins of Firefox, if I wanna change web browser, I want those plugins to migrate as well.

You should try Flock, because it is FREE!

Posted in flock, X11 | Hits: 113930 | 10 Comments »

WordPress exploit: we been hit by hidden spam link injection

May 26th, 2008 mysurface

We been hit by hidden spam link injection (a modified version of goro spam injection), this crack injects spam links through wordpress wp_footer() or wp_head() hook. The spam links only reveal itself if crawled by search engine bot such as googlebot, and they are hidden from our eyes. We believe the cracker’s purpose is to steal your search index and improves their page rank.

This exploits are very difficult to detect, because you can’t find the hidden spam links from your web source if you surf your page with web browser. Until one day, your traffics goes down exponentially, and discovered the spam links appear in google cache. But that is too late!

How’s the spam links look:

<div id="_wp_footer">
<script type="text/javascript"><!--
google_ad_client = "pub-7652328300112263";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al_s";
google_ad_channel = "";
function google_ads(str){var idx = str.indexOf('?'); if (idx == -1) return str; var len = str.length; var new_str = ""; var i = 1; for (++idx; idx < len; id

How to detects them?
We can’t wait until the exploit been discover by googlebot and ruin our google index, so there must be a way for us to verify at any time. For us, we use curl. Changing the user agent to googlebot with curl and crawl your own page like this:

curl --no-sessionid --user-agent "Googlebot/2.1 (+"

Thanks to Toydi, we have done some findings on how the exploit affects us. Here, let us tells you what we have learn from the exploit, suggestion to solve the problems, and reveal of this exploit.

Read the rest of this entry »

Posted in curl, curlftpfs, file, find, Misc | Hits: 383499 | 162 Comments »

Discover user guides and manuals within your linux system

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 you can download those docs from the internet too, but since it already preinstalled in your system, why bother to download it again? To reduce inconveniences of accessing those docs, we can extract all the docs links into a html where we can access those docs by just click on the links.

This is what I do with find command line:

echo "<html><head><title>My Linux Docs</title></head><body><H1>My Linux PDF docs at /usr/share/doc</H1>" > doc.htm
find /usr/share/doc/ -name "*.pdf" -printf "<a href='file://%p'>%p</a></br>" >> doc.htm
echo "</br><H1>My Linux html docs at /usr/share/doc</H1>" >> doc.htm
find /usr/share/doc/ -name "index.htm*" -printf "<a href='file://%p'>%p</a></br>" >> doc.htm
echo "</body></html>" >> doc.htm

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

Installing true type fonts for linux

May 4th, 2008 mysurface

While searching the ways of installing true type fonts to linux, I get all sort of solutions. Some will ask you to copy and paste to fonts:/// folders in nautilus, or fonts:/ in konqueror. Some may even ask you to copy your ttf fonts to /usr/share/fonts and run fc-cache. All sort of ways doesn’t works so well during last two years.

Nowadays, I think all sort of ways may works under particular linux distro, the steps to install font might vary between different linux distros, but its they a common way that it will works for any distro? For me, installing custom fonts should be as straight forward as ‘copy and paste’ ttf files to a specific folders without needing to run any command or configuration script.

Recently, I find the ‘copy and paste’ way. I just need to copy my downloaded ttf font files to ~/.fonts. If your home directory does not contain .fonts folder, create a new one

Read the rest of this entry »

Posted in Misc | Hits: 52309 | 10 Comments »

Simple use of find to search for files in command line

May 2nd, 2008 mysurface

Find is a very strong command to search for files and folders. You can search for files based on certain criteria besides filename, such as file types, atime, belongs to which groups, file modes, etc. Because find command support a lots of options, therefore sometimes find command line looks very complicated, but actually it is not. Don’t let the lengthy find command lines scares you away, find can be very easy to use.

You just need to ask yourself 3 question?
1. What is the path you want to begin your search from? current directory.
2. What is the filename you want to search? any files with keyword ‘love’
3. What is the file types? normal file

Okay, lets construct the simple find command line.

find . -name "*love*" -type f

1. Current directory can be write as a single dot (.)
2. Specified the filename by option -name and you can use wildcard to construct your keyword.
3. Use -type to force your file type for accuracy search result, but you can ignore specifying the -type.
( check out -type in man page for more info)

Do you want to know more?
Read the rest of this entry »

Posted in file, find, Misc | Hits: 65969 | No Comments »

How to transfer files and folders through ssh by drag and drop

April 30th, 2008 mysurface

If you are using windows and accessing linux servers through ssh, you may use ssh secure shell client, where it bundle with ssh secure shell file transfer client. The file transfer client allows you can do a file transfer drag and drop. Well in linux you can do the samething like that if you have konqueror installed.

Read the rest of this entry »

Posted in Misc | Hits: 61663 | 16 Comments »

Tribute to the Kubuntu Hardy Heron 8.04

April 26th, 2008 mysurface

While the world celebrating the new release of Ubuntu Hardy Heron 8.04, Kubuntu Hardy Heron 8.04 has announced its double vision release too. Kubuntu Hardy Heron provides you two choice of KDE, either you want a very stable KDE 3.5.9 or bleeding edge KDE 4.

Read the rest of this entry »

Posted in kubuntu, ubuntu | Hits: 35697 | 13 Comments »

How to safely upgrade your ubuntu to Hardy Heron 8.04?

April 25th, 2008 mysurface

After a long wait, Ubuntu Hardy Heron 8.04 have released! If you plan to upgrade your current Ubuntu, I suggest you don’t go for internet upgrade! Instead, you can upgrade it without internet connection, mypapit will teach you how to do it!

Yeah! You need to download Ubuntu Hardy Heron alternate CD’s iso! Get the iso from, remember to check the check box if you want to download the alternate CD.

Don’t forget to verify your ISO with md5sum before you burn it to CD. In case if the md5sum results doesn’t tally with the one provided by ubuntu, download the ISO again, because damage iso may harm your upgrade! So just be careful.

How to perform md5 checksum? Follow the tutorial here. or here.

Where can I obtain the Ubuntu Hardy Heron 8.04 md5sum?

7d0ac92c56361949d099dd9337c975e7 *ubuntu-8.04-alternate-amd64.iso
166991d61e7c79a452b604f0d25d07f9 *ubuntu-8.04-alternate-i386.iso
fc43f665ba51c4be0d95c011aefef45d *ubuntu-8.04-desktop-amd64.iso
8895167a794c5d8dedcc312fc62f1f1f *ubuntu-8.04-desktop-i386.iso
8a73cf85b04f37d5d91fb436525ea395 *ubuntu-8.04-server-amd64.iso
c3162b21757746c64a0a22cdd060b164 *ubuntu-8.04-server-i386.iso
cdd32124f23b455b0aa22cc3ff35ff35 *wubi.exe

Fasten your seatbelt, and GO!

Posted in ubuntu | Hits: 35002 | 4 Comments »

vim with ctags for multi-level directory hierarchy

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 linux distros.

Usually c/c++ projects may have multiple directories, for example, lets look at this project hierarchy:

  |       `...
          |       `-----hdrs
          |       `-----lib
          |       `-----src
          |       `-----test
          |       `-----hdrs
          |       `-----lib
          |       `-----src
          |       `-----test

I Copied it from Exuberant Ctags FAQ

Let say source code call in sysint/client/src may make a function call where the function definition is in sysint/common/hdrs. The simplest way to make use of ctags, you have to station yourself in sysint folder, and do this:

ctags -R *

The command line above will generate a file name tags in sysint folder. To edit let say in client/src, you will need to issue vim at sysint directory, like this:

vim client/src/

So that if the function call definition is at common/hdrs, you may able to travel from there, because vim will always try to find the tags file in the base folder you issue vim. Therefore, if you change directory to client/src like this

cd client/src

And you try to do ctrl+], it will complain it can’t find the tags file and refused to work! Because inside sysctl/client/src folder doesn’t contain tags file. ctags -R * at sysctl folder does not generates tags in any of its subfolders.

Exuberant Ctags FAQ guiding through you on how to generates tags file on every single sub folders, so you can travel freely at any point. The steps some how – tedious! I don’t feel that I can remember the steps very well everytime I create a new c/c++ project. So I created a bash script to does all those tedious steps.

Read the rest of this entry »

Posted in ctags, Developer, Text Manipulation, vi, vim | Hits: 103207 | 10 Comments »