Google

2005-07-28

Bash Tips

Below are some useful Bash tips (For more check out Tip Of The week from Fedora News & Power Shell Usage Page):

There are a couple of tricks you can use to save time in a BASH terminal, by making use of BASH's history, silently stored in the file ~/.bash_history. These work in all BASH terminals, including Konsole, XTerm and gnome-terminal.

Here are a couple of Tips:

  • If you press the up, or down arrow, then BASH will cycle through the list of recently used commands
  • If you type part of a command, and then press , BASH will finish the command name for you. If there is more then one command, all of them are displayed on pressing again (see Command 2 in screenshot)
  • If you type part of a filename, and then press , then BASH will finish the filename for you. Again, if there is more than one option, all are diplayed on pressing again (see Command 3 in screenshot)
  • Press ctrl-R. A search box comes up for you to find previous commands
  • ! commands - This will search the History and execute a command. The command will be displayed before execution (See Commands 4-6). There are 5 ways you can use the ! in BASH
  1. !! - Execute The Last Command
  2. !x - Execute The Last Command Starting with x
  3. !-n - Execute The nth from last Command
  4. !?abc - Execute The last Command that contained abc
  5. !n - Execute The nth Command in history (not very useful)
  • ctrl+u and ctrl+k 'cut' from the cursor to the beginning and the end of the line respectively. This can later be pasted using ctrl+y
  • ctrl+w deletes a 'word' to the left of the cursor
  • If you press alt+. then the last parameter you passed to any command will appear at the cursor. Example below: First time I press alt+., it displayed -lr, 2nd time I did it it displayed Desktop etc.
  • [adil@ahlinux ~]$ ls -l
    [adil@ahlinux ~]$ cd Desktop
    [adil@ahlinux Desktop]$ ls -lr
    [adil@ahlinux Desktop]$ -lr Desktop -l

  • Define functions providing default options in .bashrc
  • function ls
    {
    command ls -F "$@"
    }
  • command runs the real command
  • "$@" inserts the user arguments

  • Commands with arguments can have different names:
    function duff
    {
    diff -ur "$@"
    }
  • Safe to export, for use in shells embedded in editors:
    export -f duff
  • Leaves the original name alone for programs relying on it

Carlton Draught big Ad

check out this big ad:Carlton Draught Big Ad

2005-07-25

A Huge List of RSS Readers

I came across this huge list of RSS Readers. I personally use the one from RssReader.org & SharpReader. I've written a comparison entry about them in April 2005. I am not very happy with either of them and still searching for a perfect reader...

MSN Virtual Earth

According to Steve Rubel's Micro Persuasion Blog, MSN has launched Virtual Earth. The team's Virtual Earth Blog has some tips and tricks. Although promising, it does not look a match for Google Earth Plus to me. Still check-out Chandu's blog for a more detailed review.

Smallest MP3 Player - MobiBLU DAH-1500


This tiny (1" x 1" x 1" and weighs only 18 grams) mp3 player is available at Walmart in 6 colors and 1Gig version costs around $130. There is good review about it at Anything But iPod Blog, well -worth reading.

Also check out MobileWhack site for specs. I like radio & firmware upgradibility features ;-)

I am reading conflicting news about battery life which ranges between 10-20 hrs. The official web site of MobiBLU claims 17 hrs though.

2005-07-24

Cirque Du Soleil - VAREKAI

Wooooow! That's what I have to say about Varekai Show by Cirque Du Soleil in Meadowlands, East Rutherford that we have seen on Saturday (July 23,2005).

What a great show! Colorful costumes, beautiful music, original choreography and mind-boggling acrobatics were all fabulous.

They will be around just until the end of the July. This is something not to be missed!

VAREKAI

Deep within a forest, at the summit of a volcano, exists an extraordinary world where something else is possible. A world called Varekai.

From the sky falls a solitary young man, and the story of Varekai begins. Parachuted into the shadows of a magical forest, a kaleidoscopic world populated by fantastical creatures, this young man sets off on an adventure both absurd and extraordinary. On this day at the edge of time, in this place of all possibilities, begins an inspired incantation to life rediscovered.

The word varekai means "wherever" in the Romany language of the gypsies the universal wanderers. This production pays tribute to the nomadic soul, to the spirit and art of the circus tradition, and to the infinite passion of those whose quest takes them along the path that leads to Varekai.

2005-07-23

IBM OpenPowerProject

Jan Weck told me about this IBM site: http://openpowerproject.org/us/index.php I signed up already (sc0ri0n). Below is from the site:

Welcome to the Beta launch of the OpenPower Project – created just for Linux users. It's a great opportunity to pioneer an online Linux initiative, dedicated to testing the latest Power Architecture™ technology that's intended to advance Linux on Power.

This is where you can test and tinker with the latest OpenPower servers tuned for running Linux. You get remote, non-root, shared access via SSH to the latest POWER5™ processor-based OpenPower™ servers. Compile and run your applications, test them, compare them, whatever – it's up to you and your imagination. Power Architecture technology is an ideal platform for Linux® – simple, fast, and robust. Simply put, OpenPower servers take Linux to the next level. Join us. Others already have.

There are two remote locations you can choose from, in two different configurations. Choose your machine, get your most challenging code, and have some fun!

Jan's Blog

Jan Weck is a guy I met years ago in one of NT Server Admin discussion lists. We kept in touch mostly on ICQ for years and shared tips and tricks. We lost contact shortly after I moved to US & started working for Wall Street Companies*.

Anyway, recently I installed my Fedora and started using GAIM and to make the long story short we are able to keep in touch again. I've added Jan's blog to my links at the rights side...

(*) Security Exchange Commission - SEC - requires Wall Street companies to retain logs of all communications especially on Trading Floors.

2005-07-22

Whose line is it anyway?

Karl Rove said in an interview: "I did not know her name, I did not leak her name". That's playing with the words at its finest. So, if he says "His wife is a CIA agent", and then utters the words above, is he being honest?

Watch this movie from Jon Stewart's The Daily Show and have some fun. Be warned, it is big [~46 Megs)

2005-07-20

Saving Gnome Terminal Window Size

I did not see any options in FC4 to save Gnome Terminal Windows Size and I was getting annoyed with Terminal size resetting everytime I close the window. So, I did a little research but did not find much about it. Then I asked about it in fedora-list and got 2 answers:
1) Create a shortcut to gnome-terminal --geometry=80x10

2) Adil, I had the same problem... switched to 'konsole' and am very pleased.
There are also a few bugs in konsole, but it is more flexible, and
offers more control than the gnomne terminal. It may not be on your
desktop. Type 'konsole' in the "Run Applications".

I tried both and both works fine!

Fun links of the day

Here is a fun link: Subservient chicken. Get chicken just the way you like it. Type the commands (sit, run, fly, etc...) and have fun...

[UPDATE]: I've forwarded this link to a few friends of mine and guess what? I am told that I am too far behind of 'the circulated entertainment materials' and was asked to challange Lord Vader. You'll be impressed! Thanks, Sam Li!

2005-07-19

vim - the perfect cheat sheet

I copied this useful cheat sheet from "Command Line Warriors" blog. Check out their blog for more.

Command Mode ESC
Insert Mode i

Movement commands

h, j, k, l left, down, up, right
w, W, b, B forward, backward by word
H highest line of the screen
M middle line of the screen
L lowest line of the screen
Ctrl-F forward one screen
Ctrl-B backward one screen
Ctrl-D halfway down (i.e. forward) the screen
Ctrl-U halfway up (i.e. back) the screen
0 (zero), $ start, end of current line

Inserting text

a append after cursor
i insert before cursor
A append to end of line
I insert at start of line
o open a line below current line
O open a line above current line
r replace char

Delete text

x current character
dh previous character
dw current word
db previous word
dd entire line
d$ to end of line
d0 (zero) to start of line
ndd next n lines

Undelete

p insert after cursor
P insert before cursor

Goto line

:linenumber
nG Goto line n
:7 Goto line 7

Save and exit

ZZ write if changes and quit
:wq write and quit
:w filename save to new file
:q! quit vi
:x save & quit (Thanks for the tip Jan!)

Search

/pattern forward for a pattern
?pattern backward for a pattern
n repeat previous search
N repeat previous search in reverse direction

Search and replace

Example:

* Search from current line and replace first occurance
:s/search_string/replace_string/
* Search from current line and replace all matches
:s/search_string/replace_string/g
* Search from every line, replace confirmation (with [y]es)
:%s/search_string/replace_string/gc
:1,$s/search_string/replace_string/gc
* Search lines from 10 to 20
:10,20s/search_string/replace_string/g

Undo

u the latest change
U all changes on a line

Concatenate
J concatenate two lines

2005-07-18

Rocketboom : drinking game

Rocketboom: "drinking game played to karl rove ongoing investigation from white house press briefing by scott mcclellan". Boy, THIS IS FUNNY!

2005-07-12

GUI tools for YUM: yumex & kyum

As per Fedora News yumex (YUM extender) has now been added to Fedora Extras. yumex is a gui for YUM (Yellow Dog Updater Modified - used by Fedora to update/install applications). It's pretty easy to install:
$ yum install yumex

The other tool I tried is KDE's kyum. Although, I am now using GNOME, I installed it to see the interface. I found both yumex and kyum are pretty easy to use but yumex has a filter option which becomes very handy...

[UPDATE - 08/11/2005]
After using both for a few months, it looks like kyum serves me better. When I had an issue with one of the repositories, yumex kept looping and crashed while kyum just displayed the the error. Kyum interface does allow you to disable/enable repos easily too.

You can install both by typing
yum install yumex kyum

2005-07-10

Problem with Google Toolbar for Firefox

I have no idea how this has happened! After Iinstall the new Google toolbar for Firefox (1.0.20050707) on my Fedora Core 4 linux box, firefox menus and google toolbar menus changed to German! As soon as I uninstall it, menus revert back to English. I tested this a few times and it does happen all the time. Screenshot above...

[UPDATE]: I sent an e-mail to Fedora List about the issue. Apparently, I am not the only one who has encountered the issue. I'll report this in Google Groups > 'Google-firefox-extentions'. I am guessing that someone from Google maybe watching the list...

[UPDATE]: Today, Jeremy Tan from Fedora list sent me an e-mail saying that he too had the problem but menus reverted back when he closed all the Firefox instances and restarted it. I tried it, it worked for me too - with a catch: when I, for example hover on this text (or a link), it displays some message in German. See the screenshot below:
-----------------------------------------------------------------------

ratDVD: DVD movie format for online download

ratDVD claims to be a DVD movie format for online download. Author says " RatDVD is the result of my downloading experiences. Downloading movies, even DVD rips never really worked out to what I expected.



When I download movies, I want the full DVD feature set and I want to be able to watch it on any DVD player - without loosing any features of the original DVD. That is what ratDVD can do for you".



It sound like a promising new tool. AfterDown has a nice article on how to use it. A must read!

2005-07-09

Yahoo Shortcuts

It looks like Yahoo has followed the steps of Google Special Searches and done a very good job with 'Yahoo Shortcuts'

You can use the search box as a calculator. In the screenshot above you see the result it gave me when I typed a interest calculation formula 1000*(1+0.11)^2 = 1232.10

Take a look at other useful shortcuts!

2005-07-08

Goodbye to Martin Eriksen

Martin is a friend of mine from work. Today is his last day at work. He is going back to Denmark. Last night, we had our "Farewell to the "Great Dane" party at Pravda - 281 Lafayette St, NY.

Goodbye baby! (baby is Martin's favorite english word). We will miss you.

2005-07-06

Google Earth Plus

I got the news from InsideGoogle Blog and immediately downloaded Google Earth Plus. I loved it! I was holding my breath when I saw it zooming from space down to NYC! Wow, such a cool effect! Checkout the original post here.

Free Music Downloads from BBC & Others

I ran into a few sites which offer mp3 downloads. Before we get serious though, let's listen to this song - Another Irish Drinking Song 96kbps (dedicated to Gil, my Irish manager :)

Ok. I found the other sites thru BBC, so I will just list the important links on their site...
For a limited time BBC is allowing people to
Download an mp3 of Symphony no.9 (61.7 MB)

Check out the following link for more info
http://www.bbc.co.uk/radio3/beethoven/downloads.shtml

Here is the link to other sites where you can download (mostly classical) music:
http://www.bbc.co.uk/radio3/beethoven/digitalclassicaldownloads.shtml

2005-07-04

Morningstar Investing Classroom

Morningstar Investing Classroom is a pretty cool place to learn about investing. They are best known for their ratings of Mutual funds but recentrly they offer individual stock researches over 1500 companies. It's FREE. Go for it!

Oh, while you are there, check out their new indexing system. I like it!

Flash Games: Get Outta Room...

I've collected some flash games where the purpose is to get out of the room:

Crimson Room
http://www.fasco-csc.com/works/crimson/crimson_e.php

Viridian's Room
http://www.fasco-csc.com/works/viridian/index_e.php

The Pink Room
http://www.i-am-bored.com/bored_link.cfm?link_id=10806

Yepyip Room
http://yepyip.free.fr/room/

Maama's Room
http://www.maama.com/download/socute/view.php?id=000091

Swan's Room
http://mofuya.com/flash/swan.htm

Continuation:
http://www.atfriday.com/GameZone/200549203002/20055149302449945.swf

Blue Chamber
http://www.fasco-csc.com/works/bluechamber/index_e.php

The Doors
http://alt.tnt.tv/games/thedoors/

Dr. Metro
http://www.xylo.co.jp/animetion/game/orignalgames/drmetoro/drmetoro.html

2005-07-01

Sandra Day O'Connor's retirement...

All day today, TVs are repeated talking about Supreme Court Justice Sandra Day O'Connor's retirement after 24 years at the age 75. She is called 'the swing vote' as she sometimes contradicted to her own position she took in the past.

There are several references to her position to upheld Roe vs. Wade which seems to be the single most controversial decision in the recent American History. As usual, Wikipedia has a very good article on this case thanks to which Women can choose to have abortion.