Maddy's Rant

Vacuous, vivid, vivacious, aphrodisiac, simulating, rapid, ravenous

Name:
Location: Bellevue, WA, United States

Come and sit with me my friend, I promise to show you the world beyond your wildest imagination.

Wednesday, June 15, 2005

Google

checking out the new google toolbar extension for firefox.

Adding stuff to the learning process....

vim tips and tricks....

set hlsearch - sets the highlighting for search
set nohlsearch - does not set the highlighting for search
h, j, k, l - left, down, up and right movements in vim
d - delete
w - word
b - back word
$ - end of line
^ - begining of line
o - insert new line



regular expressions crash course in vim.
--------------------------------------------------

$ - end of the line.
^ - begining of the line
. - character in regex


:marks - gives the location of ,\ , [ . ]

Opening and Closing multiple files
--------------------------------------------
:wnext - write and go next
:wNext - go to previous
:spilt - spilts the window
:new - creates a new window
:view - creates a new read only window


Programmers
------------------
:setbackground=light or dark
:syntax on

Tricky murky xterm
----------------------------
if($term = xterm) set term = xterm-color

Start with a C file but with non standard extension
---------------------------------------------------------------
:set filetype=c

Tuesday, June 07, 2005

List of songs - Incomplete list

I Like
-------

1) She's always a woman - Billy Joel
2) Baby I love your way - Peter Frampton
3) I can't get no satisfaction - Rolling stones
4) Comfortably numb - Pink Floyd
5) Should i stay or should i go - The clash
6) Walk on the wild side - Lou Reed
7) Piano Man - Billy Joel
8) Manic Monday - Bangles
9) Hey Mr.DJ - Maddonna
10) I come from the land of down under - Men at Work
11) Major Tom - David Bowie

Monday, June 06, 2005

Tricks and Tips for the day

vim
-----

-> To use cut/copy/paste use the following command either in your .vimrc or in your vi editor(for that current session)
->set mousemodel=popup
->%s/findstring/replacestring - Find and replace in vi
-> copy and paste can be tricky in vi. The formatting gets stomped with the normal copy and paste. The best thing
for it to set the nopaste option. This would do the trick.

Random number generators
----------------------------------------

head -c 6 /dev/random mmencode

'Find'ing in UNIX Variants

One thing which really piss me off is my ability to remember proper commands and lack of
patience to read the man pages. Here is the list of reference I collected for FINDing files in
UNIX. (Tuned to what I wan't).

find / -name Chapter1 -type f -print

This command searches through the root filesystem ("/") for the file named "Chapter1". If it finds the file, it prints the location to the screen.

find /usr -name Chapter1 -type f -print

This command searches through the "/usr" directory for the file named "Chapter1".

find /usr -name "Chapter*" -type f -print

This command searches through the "/usr" directory for all files that begin with the letters "Chapter". The filename can end with any other combination of characters.

This will match filenames such as "Chapter", "Chapter1", "Chapter1.bad", "Chapter_in_life".

find /usr/local -name "*.html" -type f -print

This command searches through the "/usr/local" directory for files that end with the extension ".html". These file locations are then printed to the screen.

find /usr/local -name "*.html" -type f
-exec chmod 644 {} \;

This command searches through the "/usr/local" directory for files that end with the extension ".html". When these files are found, their permission is changed to mode 644 (rw-r--r--).

find htdocs cgi-bin -name "*.cgi" -type f
-exec chmod 755 {} \;

This command searches through the "htdocs" and "cgi-bin" directories for files that end with the extension ".cgi". When these files are found, their permission is changed to mode 755 (rwxr-xr-x). This example shows that the find command can easily search through multiple sub-directories (htdocs, cgi-bin) at one time.


References
------------
This document is adopted from http://www.devdaily.com/unix/edu/examples/find.shtml