Friday, May 11, 2007

redhat - rpm

rpm -i softwarename(s)
rpm -e softwarename(s)
rpm -q softwarename
rpm documentation

KDE - Umbrello

I tried out Umbrello for KDE. Seems to work better than MagicDraw at reverse engineering C++ code. It's free. Crashed on a couple of the files I tried though.

Firefox - Reduce RAM when minimized

Move Firefox to your hard drive when you minimize it, taking up less memory. And there is no noticeable difference in speed when you restore Firefox.
  • Go to about:config
  • Right-click anywhere → New &rarr Boolean
  • config.trim_on_minimize
  • Set to TRUE
  • Restart Firefox for these settings to take effect
From: 15 Coolest Firefox Tricks Ever on

Wednesday, May 9, 2007

C - Static Keyword

inside a functionremains even after the function call is long gone
modify a global variableprivate to a certain file
modify a functionmaking those functions visible only to the file itself

KDE - Enable mouse gestures

Run kcontrol
Regional & Accessibility → Input Actions
Gestures tab
Unclick Disable mouse gestues global
Change Mouse button to secondary button (right mouse button)

Open up Konqueror
Hold on to right-mouse button, move left, release
It should have navigated back a page

VIM - Recursively set project path

Put this in your .vimrc
set path=$PWD/**

Visual Studio 2005 Express


Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK

Cygwin/X - Install 100 dpi fonts

If your fonts look too small, try installing the 100dpi fonts in Cygwin's setup. Under X11, select
xorg-x11-f100: Cygwin/X 100 dpi fonts
In your C:\cygwin\usr\X11R6\bin\startxwin.bat, near the bottom of the file, append "-dpi 100" to this line:
%RUN% XWin -multiwindow -clipboard -silent-dup-error

UNIX/Linux - xhost access

To make your X server available to everyone:
xhost +
You can add this to your .bashrc

Cygwin/X - Startup with Windows

Place a shortcut to
in your startup folder (e.g. Start->All Programs->Startup)

To not have xterm pop up everytime you start up, open startxwin.bat and prepend REM in to this line:
%RUN% xterm -e /usr/bin/bash -l

Wednesday, May 2, 2007

UNIX/Linux - Recursive, forceful remove

For you n00bs, to recursively delete a directory with prompts for each file:
rm -rf dir_name

VIM - Using cscope

Install cscope.

At your project directory, to recursively build the database
cscope -Rb

Place cscope_maps.vim into ~/.vim/plugin.

CTRL+] to search for the word under the cursor.

See the cscope vim tutorial for more details.

VIM - Recursively set the path of the project

Put this in your .vimrc to
" Recursively set the path of the project
set path=$PWD/**