Why I’m writing this? Obviously, because I’m a PHP programmer 🙂 and I felt how hard it is to decide which bundle (LAMP stack) should be used. I’ve worked on Linux back in 4-5 years ago, then Windows for a long time, and currently working on Mac platform. I’ve used all these three bundles over a different time period. I’m in the development industry for over 10 years and I think now I’m in a position to do a side-by-side comparison of these tools so that the newcomers seek some help from this article.

What is LAMP stack

Don’t assume something with those software’s original names, i.e. XAMPP, WAMP, or MAMP. These are merely bundled packages with Apache, MySQL, and PHP. Actually, if you know how to configure Apache, MySQL, and PHP (i.e. many of you may have configured unmanaged dedicated servers in Linode/Rackspace etc.), then you do not need to use these bundles. It’s an ease of use as it includes the automatic configurations, many utilities, phpMyAdmin, servers start/stop/restart interface (i.e. you do not need to do it via shell commands).

There are misconceptions as well like these are for different platforms. Actually, it’s not. XAMPP supports Windows, Linux, and Mac OS X. WAMP only supports Windows platform. MAMP supports both Windows and Mac OS X. But here is the trick, that which one is better for a specific platform?

Kashmiri Aloo Dum Recipe

Kashmiri aloo dum is one of the most famous north Indian curries and a very traditional Kashmiri dish. It’s made with baby potatoes in a spicy sweet and sower gravy.


Baby Potato – 500 grams (medium size)
Whole black pepper – 1 teaspoon
Green cardamom – 3-4
Black cardamom – 2
Black cumin seeds – 1 teaspoon
Cloves – 4 – 5 pieces
Cinnamon – 2 pieces
Ghee/Butter – 1 tablespoon
Red chilli powder – 1 tablespoon
Dried ginger – 1/2 tablespoon
Mustard oil – 2 tablespoon
Bay leaf – 2 pieces
Panch-phoron powder (Indian blended spice) – 1 1/2 tablespoon
Salt – As per taste

Preparation and cooking method of Kashmiri aloo dum:

Clean the potatoes and boil them properly. Peel off the skins after the potatoes are cooked. Then make some holes into the potatoes with toothpicks.

Put a frying pan on the oven in medium flame and add mustard oil. Once the oil is heated, fried the potatoes until golden brown. Now take another pan and heat 2 tablespoon mustard oil. After heating the oil add whole black pepper, black cardamom, green cardamom, black cumin, cinnamon, bay leaf, cloves and stir them lightly. When our black cumin is changing color then add red chilli powder and ½ cup of water and stir them lightly. After few minutes add dried ginger and panch-phoron and keep them stir for 2-3 minutes. Now add some ghee and 750ml water and keep it for boiling. When the water start boiling, then add the potatoes to the pan and cover it for 20 minutes on a high flame.

When the gravy is thick and dried to a quarter position, then put it on low flame and cook it for 5 minutes more. Then add some coriander leaves for garnishing.

Serve the hot Kashmiri aloo dum in a bowl with some paratha or roti and enjoy the taste of traditional Kashmiri gravy.

[Image Curtsey WHITNEY – Whitbits Indian Kitchen]

How to optimize your Macbook Pro performance

Well, I thought it’s worth to put the topic here. I’ve recently migrated from Windows 8.1 platform to Mac OS X Yosemite platform. I’ve used Windows (Windows XP, Windows 7, Windows 8/8.1) over six years, and before that I’ve also used Linux (Red Hat) platform for two years.

I’ve got a Macbook Pro with 13″ Retina Display, 8 GB of RAM, and 120 GB SSD. It’s a pretty good configuration! But still the pc was lacking performance. It was becoming unresponsive, a bit slow, laggy typing etc. symptoms were appearing. So I started to find out the reasons in the web and gathered the knowledge of how to optimize the performance of your OS X.

Let me tell you that I’m in a field of web development, so I need to use many tools simultaneously, e.g. NetBeans IDE, Sublime Text editor, Open Office suite, mac terminal multiple SSH windows, at least two parallel browsers i.e. Google Chrome and Firefox/Safari, Skype chat, XAMPP local apache and mysql services, Jing screen capturing tool, etc. Now you have started thinking that the culprit for the slowness is me rather than the mac, right! But I still believed that it can be fixed and below is how I did it.

Chicken popcorn recipe

Boneless chicken – 500 grams
Ginger paste – 1 table spoon
Garlic paste – 1 table spoon
Onion paste – 1 table spoon
Chilli paste – 1 table spoon
Black pepper powder – 1 tea spoon
Lime juice – 1 table spoon
Sugar – 1 table spoon (make dust in mixer grinder)
Flour – 2 table spoon
Cornflour – 2 table spoon
Egg white – 4 eggs
Milk – 2 table spoon
Olive oil – 2 table spoon
Sun flower oil – 1 cup to deep fry the chicken
Salt to taste
Brown bread crumb or corn flakes

Preparation and cooking method:
Clean the chicken pieces in water, rinse it to make the chicken almost dry, and keep it in a bowl. Add ginger, garlic, onion, chilli paste, and mix well. Now add the lime juice and black pepper powder; mix again and put in the fridge for 2 to 3 hours to marinate.

While the chicken is set to marinate, it’s time to prepare the batter. Put flour, cornflour, sugar dust, milk, and egg white into a bowl and mix well until the batter is fluffy. Make sure the batter is not much liquid so that it sticks on the chicken properly.

After the chicken is marinated, take it out of the fridge and allow to become it in normal temperature. Put a frying pan on the oven in medium flame and add the olive oil. Once the oil is heated, saute the chicken and keep aside. Now dip the chicken pieces in the batter and quote it with the breadcrumb. Deep fry the chicken in sunflower oil until golden brown.

Serve hot in a plate with tomato ketchup. Yammy 🙂

How to set up a Rsync between two or more Linux servers

Why would we need to set up a Rsync? Sometimes, we need to set up file sync between two or multiple servers. Especially, if you are creating a distributed platform using a load balancing over multiple servers, you can not upload the new or the modified files to each server separately. Linux/Unix provides a very useful tool called Rsync using which, you can copy/replace incremental files to the destination.

Rsync is a fast and handy command-line utility that synchronizes files and directories between two locations through a remote shell, or from or to a remote Rsync daemon. It provides fast incremental file transfer by transferring only the differences between the source and the destination. Rsync can either be used within a server to take a backup of the files in a different directory. It can also be used over multiple servers to copy the new or the modified files from one server to the other.


To set up Rsync, first, you need to check if it’s installed. If not, you need to install it. Here are the commands below to check and install.

$ rsync --version
rsync version 3.1.2 protocol version 31

That means it’s already installed. Otherwise, run the following command.

$ sudo apt install rsync -y (For Debian based systems)

$ sudo yum install rsync (For Red Hat based systems)

Once the Rsync utility is installed or if it already exists, you need to do the “root” SSH login to the destination server. If you want to do a sync from Server A to Server B, you need to login to Server B first.

For the sake of examples, I’m taking two arbitrary IPs for the servers.

Server A:
Server B:

Log in to Server B using the “root” and switch to the user that owns the destination directory. Run the following commands:

$ su username
$ cd ~/
$ ssh-keygen

$ Generating public/private rsa key pair.
$ Enter file in which to save the key (/home/username/.ssh/id_rsa): [press enter]

$ Enter passphrase (empty for no passphrase): [provide no password]
$ Enter same passphrase again:

Make sure not to put any passwords while generating the keys. Now the private/public key pair has been generated for the user. Copy the public key and keep it available for later use. This key needs to be copied over to the source server. Run the following command to see the content of the key.

$ cat ~/.ssh/id_rsa.pub

set up a rsync

Now login to the source server, Server A, with root login and switch to the username (i.e. su username) that owns the source directory.

$ vi ~/.ssh/authorized_keys

Put the key copied previously at the end of the file in a new line and save it. Now, go back to the destination server, Server B, and run the following command to check if the key-based authentication has been established properly.

$ ssh [email protected] (i.e. IP of the source server), it should show you something like
$ Last login: Tue Apr 14 11:46:47 2015 from IP

Set up r Rsync:

Now exit from the source server and log back into the destination server. Run the following ssh command to check if the Rsync is working properly.

$ rsync -avzhe ssh [email protected]:/absolute/path/to/the/directory/at/source/ /absolute/path/to/the/directory/at/destination/

If you are wondering what the options after the rsync do, here is a list below of some of the useful options:

  1. -a / –archive: Archive mode, which allows copying the files and directories recursively. It preserves the symbolic links, file & folder permissions, user & group ownerships, and timestamps as well
  2. -v: verbose
  3. -z / –compress: Compress the data while transferring
  4. -h: Show the output numbers in a human-readable format
  5. -e: Mention the remote shell to use in the Rsync
  6. -r: Copies data recursively, however, it doesn’t preserve the timestamps and the permissions while transferring the data
  7. -l: Copy symlinks during the sync
  8. -u: Don’t copy the files from the source to the destination if the destination files are newer than the source
  9. –delete: This option will delete the files that exist in the destination, however, not in the source.
  10. –exclude: Exclude specific files or directories while doing the sync, e.g. –exclude=node_modules –exclude=vendor

Note: If SSH on the source server is listening on a port other than the default port 22, then you can specify the port using the -e option.

$ rsync -avzhe "ssh -p 2222" [email protected]:/absolute/path/source/directory/ /absolute/path/destination/directory/

Now set up a Rsync command using CRON job in 5 minutes interval on Server B.

Additional tips:

Many hosting providers provide servers with one public IP and one private IP. Especially if you have opted for the dedicated server model. Public IP works over the internet. Private IP works over the intranet, however, only if the server nodes are in the same network zone. Make sure to use the Private IP if possible, otherwise, it will consume the public bandwidth for copying the files.

Follow the same steps for all the destination servers, like Server-C, Server-D, etc., if you have more than two nodes. You can even chain the copy rather than copying from only one node. Because that might create additional load on the source node. For example, you can set up Rsync from Server-A to Server-B, Server-B to Server-C, and so on. However, the file updates will be reflected in the later nodes after some delay as it’s a chained copy.

GIT repository with version control system

If you are associated with development and worked on big projects in a team, you might be already familiar with GIT. It is a distributed system for file repository with revision control system. During development phase of any project, team members often need to work on same file and keep track of the changes. GIT is the perfect system to maintain this process. It auto merges files based on lines, and also keep tracks of all the changes so that at any point of time we can go back to any revision. You might have heard or used SVN based sub-version system as well. But Git is a bit different than SVN and from my point of view, it’s much superior than SVN.

Simple egg uttapam recipe – really 10 minutes!

I don’t know if someone already tried this recipe or not, but I really didn’t read it anywhere. It just came out of my mind and I tried it. You can try it too, it’s really awesome 🙂

The required ingredients are one cucumber, one medium sized onion, one medium sized tomato, two eggs, one green chili, one table spoon of sunflower oil, salt to taste, black pepper powder to taste, and tomato chili sauce.

Finely chop cucumber, onion, tomato, and green chili and keep aside. Take a bowl, crack the eggs into the bowl, add pinch of salt to taste, add some black pepper powder to taste, and stir well.

Start the oven and put a flat pan on it. Pour the oil into the pan, don’t over heat it. Add the stirred egg into the pan and make the layer round. Keep the pan into low flame for 2 – 3 minutes until the egg gets a bit hard like omelet. Once done put the round egg layer on a dish.

Now spread the chopped cucumber, onion, tomato, green chili mix over the egg layer, add some salt and black pepper powder. Add the sauce over it.

Your egg uttapam is ready to serve. Isn’t it really 10 minutes!