In this article I will briefly describe the hardware upgrade process on my MacBook Pro 15″ (early 2011). Hopefully, it will help some of you considering to buy similar hardware. After searching for a SATA 3 6Gb/s SSD I came across the recently released hard drive from Corsair. It was relatively cheap and promised a great deal of performance. Here are the specifications of my new SSD and RAM.
Corsair ForceGT 120GB SATA 3 6Gb/s Solid-State Hard Drive
Unformatted capacity: 120GB
Read performance (max): 555MB/s
Write performance (max): 515MB/s
Interface type: SATA 3 6Gb/s
Before the upgrade the first thing I did was creating a clone of my existing HDD in to the new SSD. Since the SSD wasn’t formatted I have created a Mac OS Extended (Journaled) partition with the GUID option. When it was ready I used the Carbon Copy Cloner to copy the content from my HDD.
You can find the instructions on the following video.
iFixit also has a nice guide on its website. Link1 and Link2.
Once everything was put in place, it was time to start the MBP. In my case it took a bit too long for the login window to appear. In fact it was longer than my old HDD. It was perhaps due to hard drive cache. So I reseted the cache following the instructions on Apple help pages. After the PRAM reset the booting up was extremely fast. The large applications such as Photoshop, Xcode and iPhoto loaded instantly.
However when the speed tests were conducted I couldn’t achieve the read/write speeds mentioned on the specs. In fact it was way too low compared to the maximum. Never the less the performance boost I got was enormous and couldn’t imagine why it took too long for the transition.
When Spotlight gets corrupted you can use the mdutil tool to clea up or reset the metadata stores as follows. Keep in mind that you have to execute it as an admin user if you want to reset the entire disk.
To erase all the local stores
sudo mdutil -E/
To set the indexing status ON
sudo mdutil -i on /
Other useful parameters
-p Spotlight caches indexes of some network devices locally. This option requests that a local caches be flushed to the appropriate network device.
-E This flag will cause each local store for the volumes indicated to be erased. The stores will be rebuilt if appropriate.
-i on | off
Sets the indexing status for the provided volumes to on or off. Note that indexing may be delayed due to low disk space or other conditions.
-s Display the indexing status of the listed volumes.
When you want to access a remote terminal using ssh, general procedure is to run something similar to,
and then enter the password. However if you have to do it regularly, entering the ssh command and the password can become annoying. The following guide will give you some tips to easily manage the above process without all the hassle.
SSH to a remote host from a local machine without entering the password.
Open the Terminal.app (/Applications/Utilities/Terminal.app).
Navigate to the .ssh folder.
If the .ssh directory doesn’t exist you can create it using,
Create security key pairs if they don’t exist.
Copy the generated public key to the remote host.
scp id_rsa.pub username@server:~/.ssh/
SSH into the remote host in a regular fashion for the one last time.
Copy the id_rsa.pub key to the authorized_keys list.
cat id_rsa.pub >> .ssh/authorized_keys
Remove the id_rsa.pub file.
Exit from the remote server.
Add an alias entry in your local .bashrc to make the process even simpler.
Restart the Terminal.app
That’s all. Now you should be able to ssh to the remote terminal from your local machine simply by running
I am a big fan of the Vim editor for many years. However installing, updating and removing Vim plugins require a great deal of time and effort. In this article I would like to introduce a couple of tools, which makes the whole process a breeze. The basic idea is instead of copying plugin files to different directories, just leave them where they are and load them when Vim starts. To remove a plugin, simply delete the corresponding subdirectory.
Vim Editor Version 7.0 or higher(Some plugins won’t work with older vim versions)
The last two applications are part of the xCode bundle.
Before we start, it is probably a good idea to create a backup of the old plugins.
Backup the .vimrc file
cp .vimrc .vimrc_backup
Backup the .vim folder
mv .vim .vim_backup
Create “bundle” subfolder within .vim folder.
(This is where all the plugin directories will be copied)
(This will copy the autoload directory to .vim folder)
To load pathogen when vim starts, add the following lines in .vimrc
filetype plugin indent on
Remove the vim-pathogen folder.
(remove the empty folder)
The next step is to download all your favourite plugins into the bundle directory and keep them sync with the latest updates. The Ruby script written by Tammer Saleh comes in handy for this purpose. Once you customize the script by including all the plugins you want to use, all you have to do is to run the script in regular intervals.
Download the latest Ruby script to .vim directory.
The modified ruby script can be downloaded here.
Open the script and activate your favourite plugins. You can also add new plugins from git, mercurial repositories or even zipped bundles from Vim.org. Once you are ready with the activated collection save the script and run to install.
You can find my own vim setup on GitHub. Download the complete package and customize it as necessary. Please read the README for installation instructions.
Worst thing happened yesterday while I was updating my router(WGR614v9
54 Mbps Wireless Router) firmware. Usually updating the firmware is an easy process. All you have to do is log in to the router via any web browser and upload the latest firmware file. In my case I did manage to upload the file but when the router restarted the power button started blinking. The blinking power button indicates that the firmware is corrupt.
In such a situation only way to save the router is to transfer the firmware file through router’s built-in TFTP server. If you are comfortable with the Terminal.app the process is really easy. Here are the steps.
Fire-up the Terminal.app (/Applications/Utilities/Terminal.app).
cd to the location where the firmware file (with .chk extension) is located.
Issue the following commands and hit return
tftp -e<ip address of your router>
(Command to connect to the tftp server)
put <firmware filename>
(Copy the firmware file from the local machine to the server)
(Quit the tftp connection)
This method worked well with my router. However there may be different ways to transfer the file with other brands.