Friday, July 4, 2008

Rambling

The meaning of poetry has no direction.
It is like a sling; it is not under control.
-- Rumi


Har ek zajbat ko dua nahi milti
Har ek arzu ko zuban nahi milti
Muskan sajae rakho to duniya hai sath
kyuki Aansu ko to ankho main bhi Panah nahi milti

-- anonymous

Thursday, July 3, 2008

Collection of thoughts/poems

Few favourite quotes / poems / thoughts , which I have collected recently.


What happens to a dream deferred?
Does it dry up
Like a raisin in the sun?...
Or does it explode?

-- Langston Hughes, Harlem


Hope, like the gleaming taper's light,
Adorns and cheers our way;
And still, as darker grows the night,
Emits a lighter ray.
-- Oliver Goldsmith

A man used to ask his mother, 'How can I find the right woman for me?' and she would answer, 'Don't worry about finding the right woman- concentrate on becoming the right man.
-- anonymous


There is tremendous happiness in making others happy, despite our own situations.
Shared grief is half the sorrow, but happiness when shared, is doubled..
If you want to feel rich, just count all the things you have that money can't buy.
'Today is a gift, that is why it is called - The Present.'
-- anonymoys

A good friend who points out mistakes and imperfections and rebukes evil is to be respected as if he reveals a secret of hidden treasure.

-- anonymous


...You shall not dwell in tombs made by the dead for the living.

And though of magnificence and splendour, your house shall not hold your secret nor shelter your longing.
For that which is boundless in you abides in the mansion of the sky, whose door is the morning mist, and whose windows are the songs and the silences of night.

-- Kahlil Gibran ( on Houses )


You talk when you cease to be at peace with your thoughts;

And when you can no longer dwell in the solitude of your heart you live in your lips, and sound is a diversion and a pastime.

And in much of your talking, thinking is half murdered.

For thought is a bird of space, that in a cage of words may indeed unfold its wings but cannot fly.

-- Kahlil Gibran


It is the highest form of self-respect to admit our errors and mistakes and make amends for them. To make a mistake is only an error in judgment, but to adhere to it when it is discovered shows infirmity of character.
-- anonymous


King, saint, thief, madman -
Love has grabbed everyone by the neck
And drags us to God by secret ways ...
How could I ever have guessed
That God, too, desired us?

-- Rumi ( Odes )


Be drunk on love, because love is all that exists;
Without love, no one has the right to enter His house.
They ask, "What is love?" Reply: "Giving up your self-will."
He who hasn't given up his will isn't chosen.
The lover's an emperor, the two worlds are at his feet:
Does an emperor notice what is thrown in his path?
It is Love and the Lover that live eternally -
Don't lend your heart to anything else; all else is borrowed.
How long will you go on and on embracing a corpse?
Embrace the soul that is embraced by nothing else.

-- Rumi ( Mathnavi )



When God created the pure body of Adam he drew it out of the earth and breathed into it His sacred breath and said to Gabriel, "Take from the sea of My Omnipotence three pearls, place them on a plate of light, and present them to Adam so he can choose one." The three pearls were reason, faith and humility.

Gabriel presented the plate to Adam and told him what God wanted. Adam, illumined by the divine light, chose the pearl of reason, Gabriel wanted to take back the plate with the two pearls it still held to the sea of Omnipotence; but, because of their heaviness, he did not have the strength to lift them. The pearls of faith and humility then said to him, "We cannot separate ourselves from the holy company of our friend Reason; without him, we cannot establish ourselves firmly or even exist. During ancient times we were all three the jewels of the mine of Divine Glory; the pearls of the Sea of Omnipotence are inseparable."

Then the voice of God rang out, "Gabriel, leave the two pearls where they are and return!" So Reason installed itself at the peak of human intellect; faith lodged itself in Adam's pure and sensitive heart; humility reigned on his holy face.

These three pure pearls are the heritage of the children of Adam. Every child descended from Adam who is not adorned by these pearls and does not shine with their brilliance is shut off from the light and deprived of authentic gnosis.

-- Rumi ( AFLAKI )


Time is the wisest counselor.
-- anonymous


Mujhe us se ab bhi mohabbat hai,
magar na jaane kyon,
ab is mohabbat mein, pehle si shiddat nahin rahi.

Mujhe woh ab bhi yaad aati hai,
magar na jaane kyon,
ab uski yaad mein, sitaron se haal-e-dil kehne ki aadat nahin rahi.

Mujhe us ka ab bhi intezaar rehta hai,
magar na jaane kyon,
ab us se milne ki tadap nahin rahi.

Sochta hoon, kitna badal gaya hoon "main"...
lagta hai...
"uski" tarah hi bann gaya hoon "main"!
-- anonymous


Oh Beloved, take me.
Liberate my soul.
Fill me with your love and
release me from the two worlds.
If I set my heart on anything but you
let fire burn me from inside.

Oh Beloved,
take away what I want.
Take away what I do.
Take away what I need.
Take away everything
that takes me from you.

--Rumi


Let go of your worries
and be completely clear-hearted,
like the face of a mirror
that contains no images.
If you want a clear mirror,
behold yourself
and see the shameless truth,
which the mirror reflects.
If metal can be polished
to a mirror-like finish,
what polishing might the mirror
of the heart require?
Between the mirror and the heart
is this single difference:
the heart conceals secrets,
while the mirror does not.

-- Rumi





Lab pe aati hai dua ban ke tamanna meri,
Zindgi shama ki surat ho Khudaya meri.

Door duniya ka mere dam se andhera hojaye,
Har jagah mere chamakne se ujala hojaye.

Ho mere dum se yunhi mere watan ki zeenat,
Jistara phool se hoti hai chaman ki zeenat.

Zindigi ho meri parwaane ki soorat ya rab,
Ilm ki shama se ho mujko mohabat ya rab.

Ho mera kaam ghareebon ki himayat karna,
Dardmandon se, Zaeefon se muhabbat karna.
Mere Allah! Buraee se bachana mujhko,
Naik jo raah ho us rah pe chalana mujhko.

Monday, December 3, 2007

centericq: Text messaging for the Gmail+Terminal freaks!

centericq: Text messaging for the Gmail+Terminal freaks!

How nice it is to just stay on the terminal with hands on the keyboard, staying away from that wierd mouse. I just configured centericq for that particular purpose. Its pretty simple.

Step 1. Install the centericq package :

$ sudo apt-get install centericq

Step 2. Configure it for the Google Talk:

$ centericq

Server : talk.google.com:5223
Secured : yes
Login : ********@gmail.com
Password : ********
Priority : 4
Update user details
Set away message
Drop

Step 3. What are you waiting for now? Just chat!


reference:

http://osdir.com/ml/network.centericq/2006-05/msg00002.html

Monday, November 5, 2007

Prism - Mozilla's new offering!

Prism - Mozilla's new offering!

If you have access to a computer and fortunately also have an Internet connection, then it is pretty sure that your first task will be to launch a Web Browser. You want every thing to be on the web browser to access it, be it email, chatting, watching video, playing games ( maybe 3D games in near future ) etcetra etcetra. Yes its true most of the times. Compaines like Google have done a pretty good job to bring Chating, Word processing, Videos, Spreadsheets etc., to bring just at your Web Browser.

So you know what, many of remaining applications you use NOT on the Web Browser, will soon be in `your` browser. Mozilla has just started to do that -- through Prism. What is Prism?

Prism is the best of both worlds -- stand alone applications and browser based applications. Wow! How is this possible?

"Prism is a simple XULRunner based browser that hosts web applications without the normal web browser interface. Prism is based on a concept called Site Specific Browsers (SSB). An SSB is an application with an embedded browser designed to work exclusively with a single web application. It doesn't have the menus, toolbars and accoutrements of a normal web browser", says http://wiki.mozilla.org/WebRunner

So what you gain from Prism is, a possibility to integrate your Web Appilcations better with the Desktop.

For more follow:

http://starkravingfinkle.org/blog/2007/10/webrunner-becomes-prism-a-mozilla-labs-project/
http://blog.mozilla.com/faaborg/2007/10/24/prism/
http://wiki.mozilla.org/WebRunner

Sunday, September 30, 2007

Compiz - Debian ; Up and running!

This is just a plain simple way to have Compiz installed on your system ( i use Debian Etch ).

install compiz:

$ sudo apt-get install compiz

now edit the xorg.conf file: /etc/X11/xorg.conf, add the following lines at the bottom
Section "Extensions"
Option "Composite" "Enable"
EndSection

create a .xinitrc in your home directoy i.e. ~/.xinitrc with following lines:
#!/bin/sh
gnome-terminal &
exec compiz

Now, kill your current X server session by pressing Ctrl-Alt-BackSpace .

login onto a ( virtual ) terminal using your username and password, then just fire the following command:

$ startx

And here you go! All the nice effects of wobble etc. at your desk and a terminal window on your screen.

this is really a light way, without putting too much of memory on useless applications running along with GNOME/KDE.

Whatever you really need to use, just start from the terminal.


References:
http://ubuntuforums.org/showthread.php?t=131267
http://xwinman.org/basics.php

Tuesday, September 4, 2007

Ruby - The Programming Language

Here a few links that are good as a first look while learning Ruby.

General:

http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml
http://www.ruby-lang.org/
http://www.37signals.com/
http://www.ruby-doc.org
http://api.rubyonrails.com/
http://www.ruby-forum.com/
http://www.rubyforums.com/forumdisplay.php?f=1
http://www.sitepoint.com/forums/forumdisplay.php?f=227
http://railsforum.com/
http://www.rubyinside.com/
http://redhanded.hobix.com/
http://www.rubyist.net/~matz/
http://www.planetrubyonrails.com/

:symbols in Ruby

http://glu.ttono.us/articles/2005/08/19/understanding-ruby-symbols
http://onestepback.org/index.cgi/Tech/Ruby/SymbolsAreNotImmutableStrings.red

writing daemons

http://daemons.rubyforge.org/classes/Daemonize.html


more to come...

Finding duplicate files on your system?!

I ( and many others ) have a lot media files ( mp3, jpg, avi, etc. ) lying around in the system. I wondered that how shall I get the list of all the duplicate files lying in my computer. Writing a script in Ruby which identifies the duplicate files using the MD5 hash values of the files contents, was no difficult a task. Here is the script.


#!/usr/bin/ruby

## This file finds all the duplicate files form a directory given
## at the command line.
## Released under the GPLv2
## Copyright (C) tuxdna(at)gmail(dot)com

require 'digest/md5'

## novice use of exceptions
begin
throw nil if ARGV.length == 0
rescue
print "Usage: ", $0, " \n"
exit 1
end

directory = ARGV[0]
print "Name of directory given is :", directory, "\n"

## do not proceed if it is not a directory
exit 1 if File.file?(directory)

puts "Getting the list recursively, for all the files and sub-directories."
filelist = Dir[directory+"/**/*"]

puts "Now scanning the files: "
puts "Determining file size and Filtering the directories:"

sizehash = Hash.new { |h,k| h[k] = [] }
filelist.each do |filename|
if File.file?(filename)
sizehash[File.size(filename)].push(filename)
end
end

## prune those entries which do not have same size
sizehash.delete_if { |k,v| v.length<=1 }
duplicates_md5 = Hash.new { |h,k| h[k] = [] }
sizehash.each do | size, files |
files.each do |filename|
md5sum = Digest::MD5.new( File.new(filename).read )
## Necessary to do this because md5sum is an object of class Digest::MD5
## and we need a string for a key!!
md5sum = md5sum.to_s
duplicates_md5[md5sum].push(filename)
end
end

## prune those entries which do not have same md5 hash value
duplicates_md5.delete_if { |k, v| v.length <= 1 }
## print the files if we find duplicates now!
duplicates_md5.each do |h, files|
puts "Following files match: "
files.each { |f| puts f }
puts
end
exit 0