Category Archives: Uncategorized

Deploy your Website Changes using Git

It is really a bad idea to deploy website using FTP and replacing old files with new one. Let me explain you the deployment using git which makes the life easy.

Before starting we need SSH client and Git to be installed on our local machine. I am assuming you already have installed these applications. So lets begin the interesting stuff.

We need to install Git on the remote server, so SSH to the server and issue following command:

Now we need to create a bare Git repository which should located outside the webroot. We can keep it in our home directory or create a separate folder in the home folder for bare Git repositories.

Lets create out Git repository

Now we are going to create a hook which will move latest changes in the webroot. Create a file hooks/post-receive and paste following code it it:

Update the GIT_WORK_TREE path with your webroot path. Make this file executable:

Server setup is done.

On your local machine you just need to add a remote branch to push your changes.

Your latest code is deployed to the server.



जब मुहम्मद (SA) पहली बार हज करने के लिए मक्का जा रहे थे उस वक़्त उन्हें मक्का वालों ने आने नहीं दिया और जंग के लिए भी तैयार थे। मक्का वालों को ये भी मालूम था कि वो रसूलुल्लाह की सेना का मुक़ाबला कभी नहीं कर पाएंगे फिर भी ज़िद पैर थे कि उन्हें मक्का में दाखिल नहीं होने देंगे। उमर (RA) ने अबू बक्र (RA) ने पुछा :
1. क्या हम हक़ पे नहीं हैं ?
2. क्या हम उन लोगों से ज़्यादा ताक़त में नहीं हैं ?

अबू बक्र (RA) ने कहा, हाँ उमर ये दोनों बातें सही हैं लेकिन रसूलुल्लाह अमन चाहते हैं, हम हज के लिए जा रहे हैं हमें खून नहीं बहाना। काफ़ी दिनों की बात चीत के बाद सुलह हुआ। सुलहनामा कुछ ऐसा था :
1. अगर कोई मक्का का निवासी मुसलमान बनना चाहता है और मदीना आता है तो उसे अपने parent से इजाज़त लेनी पड़ेगी अन्यथा उसे वापिस मक्का भेज दिया जाये।
2. अगर कोई मुसलमान वापिस अपने दीन पे जाना चाहे तो उसे किसी से इजाज़त नहीं लेना।
3. इस साल कोई हज नहीं होगा। अगले साल 3 दिन के लिए मक्का में आकर हज कर सकते हैं लेकिन शर्त ये है कि आप अपने साथ कोई हथियार नहीं ला सकते।

इस सुलहनामे पे मक्का की तरफ से सुहेल इब्न अम्र ने हस्ताक्षर किया था और मुसलमानों की तरफ से उन्ही के बेटे अब्दुल्लाह इब्न सुहैल ने।

इस वाकये से सबक़ मिलता है कि अपना हक़ लेना इन्साफ है लेकिन अमन क़ायम करने के लिए हक़ छोड़ देना ही बेहतर है।

Best Project Management Award

When I was in Reliance Infra I developed a web application Simplify for monitoring daily execution of work on site. It is a process automation tool for Road business. This is a web application built on XPages Technology. On 17th Oct,12 it has been awarded as Best Project Management Tool by Cyber Media India Ltd. It really made me proud as I was the developer of this project.

Follow this URL for details:

Why Indian students are disliked abroad?

It was the first day of a school in USA and a new Indian student named Chandrasekhar Subramanian entered the fourth grade.

The teacher said, “Let’s begin by reviewing some American History. Who said ‘Give me Liberty , or give me Death’?”

She saw a sea of blank faces, except for Chandrasekhar, who had his hand up:?’Patrick Henry, 1775’he said.

‘Very good! Who said ‘Government of the People, by the People, for the People, shall not perish from the Earth?”

Again, no response except from Chandrasekhar. ‘Abraham Lincoln, 1863’ said Chandrasekhar.

The teacher snapped at the class, ‘Class, you should be ashamed. Chandrasekhar, who is new to our country, knows more about our history than you do.’

She heard a loud whisper: ‘F*** the Indians,’

‘Who said that?’ she demanded. Chandrasekhar put his hand up. ‘General Custer, 1862.’

At that point, a student in the back said, ‘I’m gonna puke.’

The teacher glares around and asks ‘All right! Now, who said that?’ Again, Chandrasekhar says, ‘George Bush to the Japanese Prime Minister, 1991.’

Now furious, another student yells, ‘Oh yeah? Suck this!’

Chandrasekhar jumps out of his chair waving his hand and shouts to the teacher, ‘Bill Clinton, to Monica Lewinsky, 1997’

Now with almost mob hysteria someone said ‘You little shit. If you say anything else, I’ll kill you.’ Chandrasekhar frantically yells at the top of his voice, ‘ Michael Jackson to the child witnesses testifying against him, 2004.’

The teacher fainted. And as the class gathered around the teacher on the floor, someone said, ‘Oh shit, we’re screwed!’ And Chandrasekhar said quietly, ‘I think it was Lehmann Brothers, November 4th, 2008’.