Search This Blog

Sunday, May 31, 2009

Good link to search APIs

just click on the title above.

Wednesday, May 20, 2009

Bhai n Meg

Meg and Bhai .... at Niagara Falls...
Made for each other ...

Saturday, May 16, 2009

My new bike - Activa

A picture of my new bike, new Honda Activa(15-May-09). And YES. It is completely White. :) love the unique color! Only few lucky ppl wud get the pleasure of riding on it wid me. ;)

More pictures coming soon...


Old Nova & New Activa ...





Friday, May 15, 2009

Some fun moments at Omni.

Traditional Day...






Bday - Amol, Gaurav and me.


Andrew, Sachin, Sunil



TT Time



YUMMYYY!!!

Sachin Spotted a Grey Hornbill

Now that is a "Grey Hornbill". This amazing photography is by Sachin from his IPhone. Picture was taken from one of our Office meeting rooms.
Our Office vicinity seems to be a Birds Paradise ... ;)



You can find some info on this peculiar lil bird here, http://en.wikipedia.org/wiki/Indian_Grey_Hornbill

Monday, May 11, 2009

Magi's farewell for B'glore

Farewell for Magi before going to B'glore. A fancy job in Warner Brothers in B'glore is costing us large distance.

Dinner at this place called Span executive in Shivajinagar. Food is good but they had extremely slow service on sunday. We were the last ppl to get outta der. They have this very pretty ambience though. A backdrop of an artificial waterfall, of which by the way we had about 50 jokes.... :)



Magi, Mintu, Bhavs, Ameya, Snehal



Anup & Shweta



Ameya & Snehal



Mr and Mrs. Bhalerao



Bips and Chai



The best of friends... Forever & ever ... Shifu Sona Magi....

Wednesday, May 6, 2009

Mom

When I came home in the rain,

Brother asked why didn’t you take an umbrella.

Sister advised, Why didn't
you wait till rain stopped.

Father angrily warned, only after getting cold, you will realize.

But Mother, while drying my hair, said, stupid rain! Couldn't
it wait, till my child came home?

That Is MOM !


Tuesday, May 5, 2009

An inspiring thought

If God had a refrigerator, your picture would be on it.

If He had a wallet, your photo would be in it.

He sends you flowers every spring.

He sends you a sunrise every morning. Face it, friend - He is crazy about you!

If God brings you to it, He will bring you through it.-
A young and successful executive was traveling down a neighborhood street, going a bit too fast in his new Jaguar. He was watching for kids darting out from between parked cars and slowed down when he thought he saw something.

As his car passed, no children appeared.

Instead, a brick smashed into the Jag's side door! He slammed on the brakes and backed the Jag back to the spot where the brick had been thrown

The angry driver then jumped out of the car, grabbed the nearest kid and pushed him up against a parked car shouting, 'What was that all about and who are you? Just what the heck are you doing? That's a new car and that brick you threw is going to cost a lot of money. Why did you do it?'

The young boy was apologetic. 'Please, mister...please, I'm sorry but I didn't know what else to do,' He pleaded.
'I threw the brick because no one else would stop....' With tears dripping down his face and off his chin, the youth pointed to a spot just around a parked car.
...
'It's my brother, 'he said 'He rolled off the curb and fell out of his wheelchair and I can't lift him up.' Now sobbing, the boy asked the stunned executive, 'Would you please help me get him back into his wheelchair? He's hurt and he's too heavy for me.'
Moved beyond words, the driver tried to swallow the rapidly swelling lump in his throat. He hurriedly lifted the handicapped boy back into the wheelchair, then took out a linen handkerchief and dabbed at the fresh scrapes and cuts.

A quick look told him everything was going to be okay. 'Thank you and may God bless you,' the grateful child told the stranger. Too shook up for words, the man simply watched the boy! push his wheelchair-bound brother down the sidewalk toward their home.


It was a long, slow walk back to the Jaguar. The damage was very noticeable, but the driver never bothered to repair the dented side door.
He kept the dent there to remind him of this message:

'Don't go through life so fast that someone has to throw a brick at you to get your attention!'

God whispers in our souls and speaks to our hearts. Sometimes when we don't have time to listen, He has to throw a brick at us. It's our choice to listen or not.

touch command in Linux

In the post for Compressing files in Linux, I had faced a situation where i could not run a file because I had changed the system date to a future date and accessed this file too many times. Here I found this very convenient feature.

touch command in Linux...

Ex. sudo touch /var/log/cups/access_log

By doing this you are resetting the access and modification times of each file to current time stamp.

Hope this helps you...
Cheers.

Scheduled Compression of files in Linux

Scenario(specific to Postgres log in this example, but can be any files):
We have lots of log files generated for Postgres. But we could face huge amount of space issues if the logging level is very detailed. So it would be great if we could schedule backing up these files in some place after a defined amount of time.

Solution: rotatelog app in Linux

This app is in-built in Linux. By app, I mean that you can find a configuration file where in you can have these actions set(to compress file(s)), which would be called by the cron job already configured in Linux.

Navigate to the etc folder and find the logrotate.conf file. Before making any changes ensure that you have created a backup. Now open this file.
For more details on all the options in this file you can refer to http://linux.die.net/man/8/logrotate
Let me brief you on how to set it up. Uncomment the entry of "compression".
Then add the following entry,

/opt/PostgreSQL/8.3/data/pg_log/*.log {
weekly
create 0664 root root
compress
rotate 1
missingok
}

Now what you are setting here is,

/opt/PostgreSQL/8.3/data/pg_log/*.log is the path from where the cron job will find the files to be compressed(.gzip),
weekly is the period after which the scheduler would backup the files
create 0664 root root is basically the create command which is executed after the files have been compressed and backed up, to create new active versions of the log files. 0664 are the permission in octal and root root is user group. Please note that for Postgres, "root root" must be replaced by the owner and group of PostgreSQL. This is mandatory because, when all the old files are backed up and new ones are created, PostgreSQL requires that the startup.log(amongst other logs being backed up) MUST be owned by PostgreSQL owner and group. If it is not, PostgreSQL will not startup successfully.
compress is to specify to compress these files
rotate 1 is for specifying that the log files must be rotated only once. Originally the file a.log would be backed up as a.1.log. So, 1 here is the parameter that decides how many times the file would be backed up.
missingok says that if the log file is missing, go on to the next one without issuing an error message

After putting this entry, save the file.

Now to test this, ideally you would have to change your system dates. But a quicker way is to go is to change the date to a week later and and type in the promt:

sudo /etc/cron.daily/logrotate

In case you encounter the error of timestamps like I did, (because i had first tried the painful task of changing dates), just change the date once to a week later and run the touch command for

/var/log/cups/access_log

Now go to the folder from where the log files were picked up. Since i did not mention any specific folder to copy the compressed file to, it is copied at the same place.

I am assuming this logrotate can be used for several other scenarios.
Let me know if you find it helpful.

Cheers...

Monday, May 4, 2009

Ek sardar goes to a jungle..

...

..

.

wahan...

...

..

.

ek snake latka hua hota hai... tree pe....

...

..

.

toh sardaar says...

...

..

.

sirf latakne se kuch nahi hoga mumy ko bolo complan pilayen....

Yashomati Maiyya Se Bole Nandlala ......





Yashomati Maiyya Se Bole Nandlala.....




Maa, Tata Sky Laga Daala To Life Jhingalala

Saap Ne Piya Bakri Ka Khoon .....

Waah! Waah! ..


Saap Ne Piya Bakri Ka Khoon .....


Waah! Waah





Good Afternoon! Good Afternoon! Good Afternoon
Cigarette-Boat Series:: 2 men are sitting in a boat and have only 2 cigarettes, but no match-sticks or lighter, but want to smoke. How do they do it ?

Solution 1:
They throw one cigarette in the water, so the boat becomes "LIGHTER".

Solution 2:
One Kisses another cigarette - Toh Doosra Jal Jaata Hai

Solution 3:
Throws one cigarette in the air and catches it. Catches win MATCHES.

Solution 4:
One cigarette sprinkles some water on another cigarette - (Tip Tip Barsa Paani, Paani ne AAG lagayi)

Solution 5:
One cigarette Draws a line with another cigarette on his body which leaves a mark- (w.r.t DAAG - The Fire)
Mangal Pandey Series What would have been the name of the movie 'Mangal Pandey'…
If Aamir Khan was a bachelor? SINGLE Pandey.
..
If Aamir Khan wore 'Chudiyas'? BANGLE Pandey.
..
If it was released during 1993 riots? DANGAL Pandey.
..
If Aamir Khan was shown as a WWE Wrestler? RUMBLE Pandey.
..
If Aamir Khan was shown at the Gym? DUMBELL Pandey.
..
If Dialogues would not be audible? MUMBLE Pandey.
..
If it was released during Christmas? JINGLE Pandey.
..
If Aamir Khan was wearing a blanket instead of a coat? KAMBAL Pandey.
..
If Aamir Khan gets an infection during shooting? FUNGAL Pandey.
..
If something evil happens while watching the movie? AMANGAL Pandey.
..
Now that the movie is a flop, what should be its name? BANDAL Pandey.
(Please do not blame me for this. I have copied it from some place!)

A man is walking on the road with a milk bottle and a car comes speeding from behind and honks.The man starts drinking the milk.Why? Because the horn says 'Pee Pee'(Drink Drink)

An elephant has 5 bananas and it is hungry, but yet it does not eat the bananas...
Why ?
...
..
.
Because the bananas are made of plastic.
The 5 bananas are real , but yet the elephant does not eat it.
Why?
...
..
.
Because the elephant is made of plastic. Both the elephant and the bananas are real, but yet it cannot eat it.
Why ?
...
..
.
Because the bananas are in the TV. Both the elephant and the bananas are real and in the TV, but yet it cannot eat it.
Why?
...
..
.
Because they are on different channels. Both the elephant and the bananas are real and in the TV and on the same channel, but yet it cannot eat it.
Why?
...
..
.
Because the TV is off. Now Finally the Elephant gets a chance to eat the bananas.
Why?
...
..
.
Itna kyun soch rahe ho yaar...Kya bigada hain usne aapka...Khane do naa bichare ko!!

:D

Saturday, May 2, 2009

Installing Postgres on Windows

I tried installing Postgres 8.3.4 on my Windows XP and found little things that stalled me for a while. Am not a big time techie, so here's simple steps that I followed to get this done successfully.

Ensure you have a drive on your PC that has NTFS. (The primary folder for Postgresql that contains the configuration files also... Data ... is required to be stored on NTFS drive that Postgres has chosen for security reasons.)

1. After running the installer, Select a language. Next.

2. Next.

3. Next for Installation Notes

4. Now for Installation Options, ensure that you select the postgres to be installed ono the local disk and browse to the NTFS drive to store the Postgres installation directory. Next

5. Now i spent some reasonable amount of time for this step. For Service configuration, leave the Account name as postgres, let the Account domain as the default value specified. Normally the Computer name. Enter your domain password and click next. You would get a prompt for creating a new account as it does not exist. Click ok. And choose not to reset the password. (They have pretty complicated passwords :) I was setting up locally for personal use so was fine with a weak password.).


Note here that in case you have tried this installation earlier and uninstalled it for some reason: The account name u specified here (postgres) remains to stay in the system which will create problems for you to install next time with same name. Now this user account does not show on the Windows GUI where you expect to just remove it. But you can delete it using

NET USER < username > /DELETE

username = postgres in above case.
Next.

6. Initialize Database Cluster:
Before you can do anything, you must initialize a database storage area on disk. This is called Database Cluster.
To initialize this, leave the default options, select on listening to other addressed than localhost(the addresses can be specifically mentioned in the pg_hba.conf file),
Enter the super user and the password that you want to set. Next.

7. Select procedural language. Next.

8. Enable Contrib Modules. Next

9. Select Next. till installation begins.

10. The last option after installation of Stack Buuilder is for additional components/drivers for the version of PostgreSQL.

And your Postgres is ready to be used.
:)

Two links attached to help you out for any other issues.
http://pginstaller.projects.postgresql.org/
http://wiki.postgresql.org/wiki/Running_&_Installing_PostgreSQL_On_Native_Windows

Have fun.