[Ilugc] Scene from Azhagan movie

  • From: girishvenkatachalam@xxxxxxxxx (Girish Venkatachalam)
  • Date: Thu May 29 21:55:51 2008

Since Dr. Bharathi Subramanian is suffering from concussion I thought I
could give you some temporary relief with some useless babble.

But before that a scene from Azhagan movie by K Balachander. 

Mamooty is presiding over a dance programme by Bhanupriya. Geetha is in
the audience and she laments the lack of a better personality.

Basically Mamooty was being used as a substitute since Padma Subramaniam
could not make it to the occasion.

But Mamooty with his humor and humility won over the entire audience
including Geetha by saying that he was being used as 'rava uppuma' and
that sometimes even Rava upma could be tasty. 

Anyway I am serving you rava upma since 'One day One linux command' is
taking a well needed rest.

I could give you some tips since I have a very long UNIX love affair.

UNIX for me is like cricket or movies for most of you.

(And I like neither. Tamil movies are fine however)

Anyway here we go.
+----------------------------------------------------------------+
1) How to find the frequency of your monitor (refresh rate in X)?

Start X and type

$ xrandr

$ xvinfo

and 

$ xdpyinfo

are also useful.

Try it out. This tip was published in linuxjournal.


+----------------------------------------------------------------+
2) How to interpret diff files? How to create a patch?

I used to have trouble with this ages ago and I bugged my boss to teach
me this when I was working in Bangalore.

I admit that it takes a bit of practice to interpret diff output
correctly. And no open source project will accept patches from you if
you don't send them a unified diff.

So the default context diff output will not work.

Just passing the  '-u' flag to diff or cvs diff will do most of the
time.

I sometimes give  '-Naur'. man diff will help you further.


Another thing. I am a vim fanatic and it is much easier, smoother and
cooler to read diffs with vim.

And there is also a vimdiff that can be used for merging source files.

vim does a fantastic job as usual enhancing productivity in a big way.

The diff algorithm basically works like this:

  What needs to be done to file2.txt to make it file1.txt ?

   $ diff file1.txt file2.txt

And lines added and deleted are prepended with 'a' and 'd' with 'c'
standing for changed lines.

Already this has gotten too long but you get the idea right?

+----------------------------------------------------------------+
3) Detecting corrupted file transfers

This tip was published in linuxjournal as tips.

No big deal though. Most of you guys will already know this one.

When you read a CD/DVD or USB stick or even from the network or disk,
sometimes data gets corrupted and we wish to ensure that the file was
retrieved correctly.

You could do a diff of course but for binary data there are better
things to do.

$ sha1sum 

or 

$ md5sum 

followed by the file name at both ends will tell you if you were messy
in handling your CDs.

And of course there is no need to compare the whole output. Typically
the first 4 and last 4 HEX digits will do.

+----------------------------------------------------------------+
4) Now for some mplayer magic.

But of course yes. ;)

How can life be interesting without music? And video? ;)

We guys are so deeply interested in entertainment that we need a dash of
it in our daily lives to keep us going.

It helps us escape from reality for a while and with UNIX you can do a
fantastic job.

My mplayer article gives you some things you can try.

http://linuxjournal.com/9787

But we are talking about tips here. Let us try some audio stuff.

$ mplayer pattuppove.mp3

will play the superb song from Chembaruthi by Isai Raja Illayaraja.

But if you want it with salt and pepper, try this.

$ mplayer -af extrastereo pattuppove.mp3

or 

$ mplayer -af extrastereo=3 pattuppove.mp3

You could also try this.

$ mplayer -softvol-max 10000 -softvol pattuppove.mp3

and press the '*' key to increase the volume. Your ears will go deaf.

And you can try some cool stuff with play , the companion of sox.

You can try echo effects, reverberation and other things.

Once again my article will help you a bit.

http://linuxjournal.com/node/1005773

I have also written about it in my linuxforums home page.

http://www.linuxforums.org

And now for something interesting.

You can loop songs like this.

$ mplayer { pattuppove.mp3 masimasam.mp3 } -loop 3

$ mplayer { pattuppove.mp3 masimasam.mp3 } -loop 0

will loop infinitely. ;)

Have fun!


+----------------------------------------------------------------+
5) Networking fun

There is no fun in using a computer with connection to the Internet and
I don't even touch a PC with a 10 foot bargepole if there is no Internet
access and of course UNIX running on it.

netcat is well covered in my linuxforums page.

$ nc -l -p 1234

will start a TCP server for you to test your BE socket projects. ;)

$ nc localhost 1234

will speak to it and you can chat.

$ socat - UNIX-CONNECT:/tmp/foo

will open a LOCAL (UNIX domain ) socket for you.

$ curl 

and 

$ dict

are other cool programs to try.

Of course wget.

$ wget -O 

will help you save files with your own chosen name.

And other nice options in wget include

 -b and -c. Of course for recursive crawling you can use regexes.

I am still not too happy with certain lack of features in wget though.

I think that is it.

More later.

Have a nice time playing with computers.

-Girish

Other related posts: