Gaurang's Blogs

inspiration #1

miseries may last longer than you incepted, but they do disappear sooner or later by sheer hard work. do that, do that for yourself.
inspired by #pursuitofhappyness

My feedback to Apple for "Discrete Graphics Card issue with 2011 Apple MacBook Pro"

Here it goes


I am an avid Apple user and has been using my MacBook Pro since 2011.
After almost 3 years, this machine is absolutely unusable. All thanks to this Graphics card issue which happens to be common among all the 2011 MBP users.

When any Automobile company identifies such problem, they call back all of their product for correction, and the same way Apple should do.

Buying an Apple is a dream for people, and sometimes they invest all the money they have to purchase it.

Please show courtesy in this matter and provide discounted replacements if not absolutely free.



Let's see if I will ever receive any response.

If you are also a 2011 MacBook Pro Owner and facing the very same problem, then you can fill the petition at :

Also, there is this interesting website which covers it all :

Setting up LAMP ( Apache, Mysql, PHP ) server in Debian 6 / Debian family ( Ubuntu too )

If you are a PHP web developer then AMP ( Apache, Mysql, PHP ) server is something you have to set up in any case.

Let's learn how to set up the LAMP server in Debian 6. When you just have got a debian which is in pristine condition, even the memory footprint will be around 70 MBs.

That's how Debian is super optimised. So if you are getting yourself a VPS with 512 MB RAM, go for Debian 6 which is pretty decent.

Assuming the fact that you are logged in using super user / root , first command to shoot is:

apt-get install apache2 - this will fetch the apache2 from the repository.

in case you don't want the version being downloaded and installed, you have to update the repository database so that it includes the latest versions of the packages.

for it, you have to use following commands : apt-get update -  That command will update the database of repository apt-get install update

That command installs the updated software packages by fetching them and installing.

Now, if you want to install php5 and mysql then use following commands : apt-get install php5-mysql apt-get install mysql-server there will be need to install other php libraries as well, for that use following commands : once everything is done, use apt-get install phpmyadmin for easily managing the mysql server in GUI form which makes database administration work easier.

Configuring Apache Configuration file :

Locating the configuration file of Apache is tricky as every version / operating system has got it on different location, so good reference point is : So, now if you are having a VPS and you want to host multiple domains on it, then read following post for learning how to do it. ( It's called Name-based Virtual Host )

Learn how to host virtual hosts on debian 7 by reading :

References :




4. 5


How to redirect one domain to another without affecting your other DNS records ?

Suppose you are having a domain name ( ) and now you redirect all the traffic coming to the old website to the new website. If you will simply forward the domain then the DNS records will get messed up and MX records won't be preserved. While the alternative way is to make it happen programmatically. We can use following ways to achieve the desired result : 1. PHP script :

There are other ways as well which will be updated shortly.

Mythical program(mer)

There are times when non-technical people ( mostly ) or some over confident programmers for that matter, assume programming to be easy and that the program can be easily written. But the hidden complexity of the software is actually way beyond the estimated.
Ideating for application is very easy but giving it actual existence takes lots of pain. And that pain is discovered when actual work is started on the development side.

So when a complex program is assumed to be easy, its a event of Simple Matter of Programming.

To know more about it :

when i love something, I love to talk about it.

So someone was cribbing about not including Galaxy S2 & including Apple's iPhone as one of the best phone in the "Best phones list" in post : .
Then I had to speak out. This is what I said :

I own a HTC One X , it crashed thrice and I lost my data ( which I didn't back up ). HTC support sucks.

About Samsung Galaxy, after an year, it started malfunctioning, screen has got dead pixels and tap isn't working on a few areas.

About Apple, It's an amazing ecosystem. I own a Mac, i had issues, I took it to Apple Care, they replaced the parts without hassles on priority. I have iPad 2 too, been amazing so far.
Apple sells not because of "The brand" but because of built quality ( check tech specs ) , amazing support, amazing integration among different devices.

  • enough said

People are agreeing to it :))

PS : HTC Customer Care services are really bad in India & they should certainly work on that.

Basic Logic Unexceptional Result

Diaries, I love writing them.

Over the course of 4 years , I wrote about 7000 pieces of notes which included my diaries, random thoughts, my billion dollar ideas.

Quarter of them I got from my old E63, flat html files ( about 1500 of them ), rest of them were downloaded as archive from Awesome Simplenotes & Catch Notes making app which stopped their operations permanently.
I had to get them on track so I migrated everything to evernote.

First 4 files of each of these text file was appended with data relevent to not me.

So i had to get rid of it.

I ran following script in the folder where these txt files were present.


for i in {1..8000}
sed '1,3d' note\ $i.txt > note12\ $i.txt
rm note\ $i.txt

Assuming I had to do this entire tedious task by myself, for each file i would have taken atleast 20s minimum. For 7038 files = 20*7038=140760 seconds / 60 = 2346 minutes / 60 = 39.1 hours
By doing research about SED command , bit of scripting basics and final execution, took me less than an hour.

In total I saved 38 hours and I was left with all of my precious notes which will be imported in my new notes app ( evernote, it is )

not living in a present moment

Do you remember the time when you were not living in the present moment. I do , I certainly do. I am sure I have to drop this nasty habit now !


Making life clutter free

Staying out of E-mail trouble

It might look very tempting to subscribe to all the free / paid services available online but after a few months when your inbox will be flooded by lots of mails , it will become overwhelming situation to actually go through all of them .
It hampers your work , your productivity , your sanity . it increases stress in your body and mind . its bad .
Subscribe from all the services which you don't require .