<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>finiteloops.com</title>
	<atom:link href="http://www.finiteloops.com/weblog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.finiteloops.com/weblog</link>
	<description>Apple and more...</description>
	<lastBuildDate>Fri, 09 Mar 2012 20:46:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Hardware upgrade for the MacBook Pro 15&#8243; (early 2011)</title>
		<link>http://www.finiteloops.com/weblog/?p=290</link>
		<comments>http://www.finiteloops.com/weblog/?p=290#comments</comments>
		<pubDate>Tue, 30 Aug 2011 10:22:53 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=290</guid>
		<description><![CDATA[In this article I will briefly describe the hardware upgrade process on my MacBook Pro 15&#8243; (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 [...]]]></description>
			<content:encoded><![CDATA[<p>In this article I will briefly describe the hardware upgrade process on my MacBook Pro 15&#8243; (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.</p>
<p><a href="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/corsair_ssd.png"><img class="alignleft size-medium wp-image-294" title="corsair_ssd" src="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/corsair_ssd-210x300.png" alt="" width="210" height="300" /></a><br />
<strong>SSD Specifications</strong><br />
Corsair ForceGT 120GB SATA 3 6Gb/s Solid-State Hard Drive<br />
Unformatted capacity: 120GB<br />
Read performance (max): 555MB/s<br />
Write performance (max): 515MB/s<br />
Interface type: SATA 3 6Gb/s</p>
<p><a href="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/adata_ram.jpg"><img class="alignleft size-full wp-image-295" title="adata_ram" src="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/adata_ram.jpg" alt="" width="300" height="243" /></a><br />
<strong>RAM Specifications</strong><br />
Capacity: 4GB x 2: 8GB<br />
Compatibility: SO-DIMM, 204 Pins<br />
Technology: DDR3 SDRAM<br />
Speed: 1600MHz</p>
<p>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&#8217;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.</p>
<p>You can find the instructions on the following video.<br />
<iframe width="640" height="390" src="http://www.youtube.com/embed/DzDxAXKCRHo?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>iFixit also has a nice guide on its website. <a title="Open back case" href="http://www.ifixit.com/Guide/Installing-MacBook-Pro-15-Inch-Unibody-Early-2011-Lower-Case/5900/1" target="_blank">Link1</a> and <a title="Swap HDD" href="http://www.ifixit.com/Guide/Installing-MacBook-Pro-15-Inch-Unibody-Early-2011-Hard-Drive-Replacement/5895/" target="_blank">Link2</a>.</p>
<p>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 <a href="http://support.apple.com/kb/HT1379?viewlocale=en_US" title="PRAM reset" target="_blank">Apple help pages</a>. After the PRAM reset the booting up was extremely fast. The large applications such as Photoshop, Xcode and iPhoto loaded instantly.</p>
<p>However when the speed tests were conducted I couldn&#8217;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&#8217;t imagine why it took too long for the transition.<br />
<a href="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/AJA_readwrite_graph.png"><img class="alignleft size-full wp-image-291" title="AJA_readwrite_graph" src="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/AJA_readwrite_graph.png" alt="" width="543" height="642" /></a></p>
<p><a href="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/AJA_readwrite_text.png"><img class="alignleft size-full wp-image-292" title="AJA_readwrite_text" src="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/AJA_readwrite_text.png" alt="" width="526" height="730" /></a></p>
<p><a href="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/AJA_readexisting_graph.png"><img class="alignleft size-full wp-image-293" title="AJA_readexisting_graph" src="http://www.finiteloops.com/weblog/wp-content/uploads/2011/08/AJA_readexisting_graph.png" alt="" width="548" height="655" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=290</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reset Spotlight?</title>
		<link>http://www.finiteloops.com/weblog/?p=285</link>
		<comments>http://www.finiteloops.com/weblog/?p=285#comments</comments>
		<pubDate>Mon, 29 Aug 2011 20:12:10 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=285</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>To erase all the local stores</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> mdutil <span style="color: #660033;">-E</span> <span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>To set the indexing status ON</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> mdutil <span style="color: #660033;">-i</span> on <span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>Other useful parameters<br />
	-p  Spotlight caches indexes of some network devices locally. This option requests that a local caches be flushed to the appropriate network device.</p>
<p>	-E  This flag will cause each local store for the volumes indicated to be erased. The stores will be rebuilt if appropriate.</p>
<p>     -i on | off<br />
         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.</p>
<p>     -s  Display the indexing status of the listed volumes.</p>
<p>     -a  Apply command to all volumes.</p>
<p>     -v  Print verbose information when available.</p>
<p>Source: <a href="http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/mdutil.1.html" title="Apple Developer Resources" target="_blank">Apple</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=285</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reset the Contextual Menu in Lion?</title>
		<link>http://www.finiteloops.com/weblog/?p=275</link>
		<comments>http://www.finiteloops.com/weblog/?p=275#comments</comments>
		<pubDate>Tue, 02 Aug 2011 19:43:15 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=275</guid>
		<description><![CDATA[Open the Terminal.app, copy and paste the following command and hit Return. /System/Library/Frameworks/CoreServices.framework//Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user]]></description>
			<content:encoded><![CDATA[<p>Open the Terminal.app, copy and paste the following command and hit Return.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>CoreServices.framework<span style="color: #000000; font-weight: bold;">//</span>Versions<span style="color: #000000; font-weight: bold;">/</span>A<span style="color: #000000; font-weight: bold;">/</span>Frameworks<span style="color: #000000; font-weight: bold;">/</span>LaunchServices.framework<span style="color: #000000; font-weight: bold;">/</span>Versions<span style="color: #000000; font-weight: bold;">/</span>A<span style="color: #000000; font-weight: bold;">/</span>Support<span style="color: #000000; font-weight: bold;">/</span>lsregister <span style="color: #660033;">-kill</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-domain</span> <span style="color: #7a0874; font-weight: bold;">local</span> <span style="color: #660033;">-domain</span> user</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=275</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to hide/unhide Library folder in Lion?</title>
		<link>http://www.finiteloops.com/weblog/?p=271</link>
		<comments>http://www.finiteloops.com/weblog/?p=271#comments</comments>
		<pubDate>Tue, 02 Aug 2011 19:31:17 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=271</guid>
		<description><![CDATA[After upgrading to Lion you may not see the ~/Library folder. If you want to unhide it, try the following command on the Terminal.app chflags nohidden ~/Library The changes to take effect the Finder should be restarted killall Finder To hide the ~/Library folder chflags hidden ~/Library]]></description>
			<content:encoded><![CDATA[<p>After upgrading to Lion you may not see the ~/Library folder. If you want to unhide it, try the following command on the Terminal.app</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">chflags nohidden ~<span style="color: #000000; font-weight: bold;">/</span>Library</div></div>
<p>The changes to take effect the Finder should be restarted</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">killall</span> Finder</div></div>
<p>To hide the ~/Library folder</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">chflags hidden ~<span style="color: #000000; font-weight: bold;">/</span>Library</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=271</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to SSH into Terminals without entering the password?</title>
		<link>http://www.finiteloops.com/weblog/?p=259</link>
		<comments>http://www.finiteloops.com/weblog/?p=259#comments</comments>
		<pubDate>Thu, 02 Jun 2011 16:19:48 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=259</guid>
		<description><![CDATA[When you want to access a remote terminal using ssh, general procedure is to run something similar to, ssh username@server 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 [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to access a remote terminal using ssh, general procedure is to run something similar to,</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ssh</span> username<span style="color: #000000; font-weight: bold;">@</span>server</div></div>
<p>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.</p>
<p>SSH to a remote host from a local machine without entering the password.</p>
<ol>
<li>Open the Terminal.app (/Applications/Utilities/Terminal.app).</li>
<li>Navigate to the .ssh folder.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>If the .ssh directory doesn&#8217;t exist you can create it using,</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh</div></div>
<li>Create security key pairs if they don&#8217;t exist.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> rsa</div></div>
<li>Copy the generated public key to the remote host.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">scp</span> id_rsa.pub username<span style="color: #000000; font-weight: bold;">@</span>server:~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span></div></div>
<li>SSH into the remote host in a regular fashion for the one last time.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">ssh</span> username<span style="color: #000000; font-weight: bold;">@</span>server</div></div>
<p>Copy the id_rsa.pub key to the authorized_keys list.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">cat</span> id_rsa.pub <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> .ssh<span style="color: #000000; font-weight: bold;">/</span>authorized_keys</div></div>
<li>Remove the id_rsa.pub file.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">rm</span> id_rsa.pub</div></div>
<li>Exit from the remote server.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">exit</span></div></div>
<li>Add an alias entry in your local .bashrc to make the process even simpler.</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">vim</span> .bashrc</div></div>
<p>and insert</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">anyname</span>=<span style="color: #ff0000;">'ssh username@server'</span></div></div>
<li>Restart the Terminal.app</li>
<p>That&#8217;s all. Now you should be able to ssh to the remote terminal from your local machine simply by running</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">anyname</div></div>
<p>on the Terminal.app.<br />
Have fun!</p>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=259</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Compare two folders on Terminal</title>
		<link>http://www.finiteloops.com/weblog/?p=249</link>
		<comments>http://www.finiteloops.com/weblog/?p=249#comments</comments>
		<pubDate>Sun, 29 May 2011 17:46:31 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=249</guid>
		<description><![CDATA[One of the simplest way to compare the folders&#8217; content is to use the diff utility. Open the Terminal.app (/Applications/Utilities/Terminal.app) Run diff -rq folder1 folder2 Eg. If you want to compare ~/Documents/Oldfolder with ~/Documents/Newfolder, Run diff -rq ~/Documents/Oldfolder ~/Documents/Newfolder Here the r parameter tells the diff to run recursively and q tells it to output [...]]]></description>
			<content:encoded><![CDATA[<p>One of the simplest way to compare the folders&#8217; content is to use the diff utility.</p>
<p>Open the Terminal.app (/Applications/Utilities/Terminal.app)<br />
Run</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">diff</span> <span style="color: #660033;">-rq</span> folder1 folder2</div></div>
<p>Eg.<br />
If you want to compare ~/Documents/Oldfolder with ~/Documents/Newfolder,<br />
Run</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">diff</span> <span style="color: #660033;">-rq</span> ~<span style="color: #000000; font-weight: bold;">/</span>Documents<span style="color: #000000; font-weight: bold;">/</span>Oldfolder ~<span style="color: #000000; font-weight: bold;">/</span>Documents<span style="color: #000000; font-weight: bold;">/</span>Newfolder</div></div>
<p>Here the r parameter tells the diff to run recursively and q tells it to output the short version of the results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=249</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to organize the Vim plugins?</title>
		<link>http://www.finiteloops.com/weblog/?p=226</link>
		<comments>http://www.finiteloops.com/weblog/?p=226#comments</comments>
		<pubDate>Sun, 15 May 2011 16:07:05 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=226</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>I am a big fan of the <a href="http://www.vim.org/index.php">Vim editor</a> 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.   </p>
<p><strong>Prerequisites</strong></p>
<ul>
<li>Vim Editor Version 7.0 or higher(Some plugins won&#8217;t work with older vim versions)</li>
<li>Ruby </li>
<li>Git</li>
</ul>
<p>The last two applications are part of the xCode bundle.</p>
<ol>
<li>Before we start, it is probably a good idea to create a backup of the old plugins.<br />
Backup the .vimrc file</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">cp</span> .vimrc .vimrc_backup</div></div>
</li>
<li>Backup the .vim folder
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mv</span> .vim .vim_backup</div></div>
</li>
<li>Create &#8220;bundle&#8221; subfolder within .vim folder.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> .vim<span style="color: #000000; font-weight: bold;">/</span>bundle</div></div>
<p>(This is where all the plugin directories will be copied)</li>
<li>Download the pathogen plugin from <a href="https://github.com/tpope/vim-pathogen/">https://github.com/tpope/vim-pathogen/</a>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">cd</span> .vim</div></div>
<p>(navigate to .vim directory)</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">git clone</span> git:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>tpope<span style="color: #000000; font-weight: bold;">/</span>vim-pathogen.git</div></div>
<p>(This will download the latest pathogen plugin)</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-r</span> ~<span style="color: #000000; font-weight: bold;">/</span>.vim<span style="color: #000000; font-weight: bold;">/</span>vim-pathogen<span style="color: #000000; font-weight: bold;">/</span>autoload ~<span style="color: #000000; font-weight: bold;">/</span>.vim<span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>(This will copy the autoload directory to .vim folder)</li>
<li>To load pathogen when vim starts, add the following lines in .vimrc
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">vim</span> ~<span style="color: #000000; font-weight: bold;">/</span>.vimrc</div></div>
<p>call pathogen#runtime_append_all_bundles()<br />
call pathogen#helptags()<br />
filetype plugin indent on</li>
<li>Remove the vim-pathogen folder.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> ~<span style="color: #000000; font-weight: bold;">/</span>.vim<span style="color: #000000; font-weight: bold;">/</span>vim-pathogen</div></div>
<p>(remove the empty folder)</li>
<li>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.</li>
<p></p>
<li>Download the latest Ruby script to .vim directory.<br />
The modified ruby script can be downloaded <a href="https://github.com/novicew/autovim/tree/master/.vim">here</a>.</li>
<p></p>
<li>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.
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ruby update_plugins</div></div>
</li>
</ol>
<p>You can find my own vim setup on <a href="https://github.com/novicew/autovim">GitHub</a>. Download the complete package and customize it as necessary. Please read the README for installation instructions.</p>
<p><strong>Links</strong></p>
<ol>
<li>Tim Pope&#8217;s pathogen: <a href="http://www.vim.org/scripts/script.php?script_id=2332">http://www.vim.org/scripts/script.php?script_id=2332</a></li>
<li>Ruby script(Tammer Saleh): <a href="https://gist.github.com/593551">https://gist.github.com/593551</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=226</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to edit hosts file on Mac OS X (Snow Leopard)?</title>
		<link>http://www.finiteloops.com/weblog/?p=221</link>
		<comments>http://www.finiteloops.com/weblog/?p=221#comments</comments>
		<pubDate>Mon, 28 Feb 2011 20:18:06 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=221</guid>
		<description><![CDATA[If you want to bind an ip address to a host name or block a certain applications from connecting to a specific server address, you can add that information to the hosts file. Here is how you do it. Log in as an admin. user. Open the Terminal.app located at Applications > Utilities > Terminal.app. [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to bind an ip address to a host name or block a certain applications from connecting to a specific server address, you can add that information to the hosts file. Here is how you do it.</p>
<ol>
<li>Log in as an admin. user.</li>
<li>Open the Terminal.app located at Applications > Utilities > Terminal.app.</li>
<li>Use
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>private<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</div></div>
<p>to open the hosts file</li>
<li>Add the corresponding record.<br />
Eg.: <em>127.0.0.1 activate.adobe.com</em></li>
<li>Press Control+o to save and Control+x to exit the nano editor.</li>
<li>Use
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dscacheutil <span style="color: #660033;">-flushcache</span></div></div>
<p>to clear DNS cache.</li>
</ol>
<p>That&#8217;s all. Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=221</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install pkg file commandline?</title>
		<link>http://www.finiteloops.com/weblog/?p=215</link>
		<comments>http://www.finiteloops.com/weblog/?p=215#comments</comments>
		<pubDate>Thu, 12 Aug 2010 11:44:19 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=215</guid>
		<description><![CDATA[Recently, when I tried to install a pkg file, just by double clicking, it gave an error. In such situations commandline installer tool comes handy. Here is how you can use it. sudo installer -pkg &#60;pkg name&#62; -target / (Usually the target location is the root folder. However you can also point it to some [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, when I tried to install a pkg file, just by double clicking, it gave an error. In such situations commandline installer tool comes handy. Here is how you can use it.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> installer <span style="color: #660033;">-pkg</span> <span style="color: #000000; font-weight: bold;">&lt;</span>pkg name<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-target</span> <span style="color: #000000; font-weight: bold;">/</span></div></div>
<p>(Usually the target location is the root folder. However you can also point it to some other location depending on your requirements)<br />
Here is an example.</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sudo</span> installer <span style="color: #660033;">-pkg</span> ~<span style="color: #000000; font-weight: bold;">/</span>Downloads<span style="color: #000000; font-weight: bold;">/</span>iStockphotoApertureExport.pkg <span style="color: #660033;">-target</span> <span style="color: #000000; font-weight: bold;">/</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=215</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use the built-in TFTP client to trasfer firmware onto your router</title>
		<link>http://www.finiteloops.com/weblog/?p=211</link>
		<comments>http://www.finiteloops.com/weblog/?p=211#comments</comments>
		<pubDate>Sat, 24 Apr 2010 11:51:22 +0000</pubDate>
		<dc:creator>Waruna</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.finiteloops.com/weblog/?p=211</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>Worst thing happened yesterday while I was updating my router(WGR614v9<br />
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. </p>
<p>In such a situation only way to save the router is to transfer the firmware file through router&#8217;s built-in TFTP server. If you are comfortable with the Terminal.app the process is really easy. Here are the steps.</p>
<ul>
<li>Fire-up the Terminal.app (/Applications/Utilities/Terminal.app).</li>
<li>cd to the location where the firmware file (with .chk extension) is located.</li>
<li>Issue the following commands and hit return</li>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tftp <span style="color: #660033;">-e</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">ip</span> address of your router<span style="color: #000000; font-weight: bold;">&gt;</span></div></div>
<p>(Command to connect to the tftp server)</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">put <span style="color: #000000; font-weight: bold;">&lt;</span>firmware filename<span style="color: #000000; font-weight: bold;">&gt;</span></div></div>
<p>(Copy the firmware file from the local machine to the server)</p>
<div class="codecolorer-container bash mac-classic" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">quit</div></div>
<p>(Quit the tftp connection)<br />
This method worked well with my router. However there may be different ways to transfer the file with other brands.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.finiteloops.com/weblog/?feed=rss2&#038;p=211</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

