<?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>Grapii</title>
	<atom:link href="http://blog.grapii.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.grapii.com</link>
	<description>Personal Site of Raj Patel</description>
	<lastBuildDate>Wed, 08 May 2013 04:00:19 +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>Remove custom fields from WordPress database using SQL</title>
		<link>http://blog.grapii.com/2012/08/remove-custom-fields-from-wordpress-database-using-sql/</link>
		<comments>http://blog.grapii.com/2012/08/remove-custom-fields-from-wordpress-database-using-sql/#comments</comments>
		<pubDate>Fri, 17 Aug 2012 15:25:58 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1367</guid>
		<description><![CDATA[I found that over time I had a vast number of custom fields set throughout my posts and pages, put there by plugins which are no longer used. In order to remove these unwanted custom fields, you need to edit each post and click on the delete option for each field no longer required, then [...]]]></description>
			<content:encoded><![CDATA[<p>I found that over time I had a vast number of <a href="http://codex.wordpress.org/Custom_Fields" title="Custom Fields" target="_blank">custom fields</a> set throughout my posts and pages, put there by plugins which are no longer used. In order to remove these unwanted custom fields, you need to edit each post and click on the delete option for each field no longer required, then save the post.</p>
<p><span id="more-1367"></span></p>
<p>This is a good method if you have only one or two posts/pages that are affected, but what if you have hundreds of posts and pages. Editing each one and deleting each field is time consuming and laborious. Luckily there is a faster option to do this by directly interacting with the <a href="http://codex.wordpress.org/Database_Description" title="WordPress Database" target="_blank">WordPress database</a> and issuing SQL commands to update the relevant tables.</p>
<p>This quick guide shows you just that, but first please make sure you&#8217;ve taken a <a href="http://codex.wordpress.org/WordPress_Backups" title="WordPress Backup" target="_blank">backup of the database</a>, just in case.</p>
<h2>Step 1</h2>
<p>Login to your hosting account and launch <code>myPHPadmin</code> from the <a href="http://en.wikipedia.org/wiki/CPanel" title="cPanel" target="_blank">cPanel</a>, or equivalent, to access the WordPress database engine.</p>
<h2>Step 2</h2>
<p>Enter a select SQL command to list all the meta keys you want to remove. In this example, I want to find and eventually remove the meta key <strong>dcssb_short_url</strong>.</p>
<pre>SELECT * FROM 'wp_postmeta' where 'meta_key' = 'dcssb_short_url'</pre>
<h2>Step 3</h2>
<p>Once you are satisfied you&#8217;ve narrowed down the selection, issue a delete SQL command to remove the rogue data</p>
<pre>DELETE * FROM 'wp-postmeta' WHERE 'meta_key' = 'dcssb_short_url'</pre>
<h2>Step 4</h2>
<p>Issue the same select SQL command again, to verify all the offending records have been deleted.</p>
<pre>SELECT * FROM 'wp_postmeta' where 'meta_key' = 'dcssb_short_url'</pre>
<p>If you get no results returned, it means that you successfully deleted the records.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/08/remove-custom-fields-from-wordpress-database-using-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SVN Missing in Mac OS X 10.8 &#8211; Mountain Lion</title>
		<link>http://blog.grapii.com/2012/08/svn-missing-in-mac-os-x-10-8-mountain-lion/</link>
		<comments>http://blog.grapii.com/2012/08/svn-missing-in-mac-os-x-10-8-mountain-lion/#comments</comments>
		<pubDate>Fri, 10 Aug 2012 16:16:07 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1358</guid>
		<description><![CDATA[Having recently upgraded to Mac OS X 10.8 &#8211; Mountain Lion, I was surprised to learn that SVN (Subversion) is not included in this release of the OS. This was a big pain point for me as I use Coda together with Versions for versioning and tracking revisions to my WordPress themes and websites. One [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently upgraded to Mac OS X 10.8 &#8211; Mountain Lion, I was surprised to learn that <a href="http://en.wikipedia.org/wiki/Apache_Subversion" title="SVN" target="_blank">SVN (Subversion)</a> is not included in this release of the OS. This was a big pain point for me as I use <a href="http://panic.com/coda/" title="Coda" target="_blank">Coda</a> together with <a href="http://www.versionsapp.com/" title="Versions" target="_blank">Versions</a> for versioning and tracking revisions to my <a href="http://wordpress.org/" title="WordPress" target="_blank">WordPress</a> themes and websites.</p>
<p><span id="more-1358"></span></p>
<p>One option is to download the latest <a href="http://en.wikipedia.org/wiki/Xcode" title="Xcode" target="_blank">Xcode</a> for Mountain Lion from the <a href="http://itunes.apple.com/gb/app/xcode/id497799835?mt=12" title="download Xcode from Mac App Store" target="_blank">Mac Apple Store</a>. Once installed go to <code>Xcode > Preferences > Downloads > Command Line Tools > Install</code>.</p>
<p>The Command Line Tools contain the latest SVN system.  However, for me downloading Xcode, all 1.5GB of it, was an overkill, especially as I only wanted the SVN element, and not the Xcode IDE as I&#8217;m not a OS X / iOS developer.</p>
<p>Luckily there is a way to install SVN without Xcode, simply install the Command Line Tools for Mountain Lion available as a separate 116MB <a href="https://developer.apple.com/downloads/index.action" title="Command Line Tools for Mountain Lion" target="_blank">download from the Apple Developer site</a>.  You&#8217;ll need an Apple Developer ID, but it&#8217;s free and easy to create using your existing AppleID.</p>
<p>Once you&#8217;ve downloaded the 116MB file and installed the tools, you can verify that SVN is installed and check the version by opening <code>Terminal</code> and enter the following at the command prompt <code>svn --version</code>, you should see something like:</p>
<pre>$ svn --version

svn, version 1.6.18 (r1303927)
   compiled Jun 15 2012, 19:07:58

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/08/svn-missing-in-mac-os-x-10-8-mountain-lion/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>How to edit the hosts file in Mac OS X 10.8 &#8211; Mountain Lion</title>
		<link>http://blog.grapii.com/2012/08/how-to-edit-the-hosts-file-in-mac-os-x-10-8-mountain-lion/</link>
		<comments>http://blog.grapii.com/2012/08/how-to-edit-the-hosts-file-in-mac-os-x-10-8-mountain-lion/#comments</comments>
		<pubDate>Thu, 02 Aug 2012 14:49:34 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1350</guid>
		<description><![CDATA[The hosts file is a text file that maps hostnames to IP addresses. Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address. If no entries exists it resolves the IP via the active connection’s [...]]]></description>
			<content:encoded><![CDATA[<p>The hosts file is a text file that maps hostnames to IP addresses. Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address. If no entries exists it resolves the IP via the active connection’s DNS servers.</p>
<p>The hosts file can be edited to block certain hostsnames, like ad-serving/malicious hosts, or used for web development purposes, i.e. to redirect domains to local addresses.</p>
<p><span id="more-1350"></span></p>
<h2>Step 1 – Open the Terminal.app</h2>
<p>Either start typing <code>Terminal</code> in the Spotlight search, or goto Applications &gt; Utilities &gt; Terminal.</p>
<h2>Step 2 – Open the host file</h2>
<p>Open the hosts file by typing the following in the Terminal window:</p>
<pre>$ sudo nano /private/etc/hosts</pre>
<p>Type your user password when prompted.</p>
<h2>Step 3 – Edit the hosts file</h2>
<p>The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – local host). Simply append your new mappings underneath the default ones.</p>
<h2>Step 4 – Save the hosts file</h2>
<p>When done editing the hosts file, press <strong>Control+o</strong> to save the file.</p>
<p>Press <strong>Enter</strong> on the filename prompt, and</p>
<p><strong>Control-x</strong> to exit the editor.</p>
<h2>Step 5 – Flush the DNS cache</h2>
<p>You can use a simple Terminal command to flush the DNS cache, and have your host file changes take immediate effect. Using the open Terminal window, then the following command:</p>
<pre>$ dscacheutil -flushcache</pre>
<p>Your new mappings should now take effect.</p>
<p>Previous Mac OS X operating systems:<br />
<a href="http://blog.grapii.com/2010/09/how-to-edit-the-hosts-file-in-mac-os-x-snow-leopard/" title="How to edit the hosts file in Mac OS X 10.6 – Snow Leopard">How to edit the hosts file in Mac OS X 10.6 – Snow Leopard</a><br />
<a href="http://blog.grapii.com/2012/03/how-to-edit-the-hosts-file-in-mac-os-x-lion-10-7/" title="How to edit the hosts file in Mac OS X 10.7 – Lion">How to edit the hosts file in Mac OS X 10.7 – Lion</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/08/how-to-edit-the-hosts-file-in-mac-os-x-10-8-mountain-lion/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Disable the Sudden Motion Sensor on a Mac Laptop</title>
		<link>http://blog.grapii.com/2012/07/disable-the-sudden-motion-sensor-on-a-mac-laptop/</link>
		<comments>http://blog.grapii.com/2012/07/disable-the-sudden-motion-sensor-on-a-mac-laptop/#comments</comments>
		<pubDate>Fri, 27 Jul 2012 14:27:24 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[MacBook Pro]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1344</guid>
		<description><![CDATA[The Sudden Motion Sensor is designed to protect your Mac hard drive in the event of a computer being dropped or an unusually strong vibration. Essentially what it does is park the hard drive head when movement is detected, which prevents it from potentially scooting across the disk surface and scratching or otherwise damaging the [...]]]></description>
			<content:encoded><![CDATA[<p>The Sudden Motion Sensor is designed to protect your Mac hard drive in the event of a computer being dropped or an unusually strong vibration. Essentially what it does is park the hard drive head when movement is detected, which prevents it from potentially scooting across the disk surface and scratching or otherwise damaging the drive or drive head.</p>
<p><span id="more-1344"></span></p>
<p>Generally speaking, you will want to always have the SMS sensor enabled, but if you&#8217;re like me and have replaced the stock hard drive with a Solid State Hardrive. then this setting is not-required. Further more, like me, if you&#8217;re using an Intel 320 SSD you definitely want to disable this setting, because if activated it could render your disk non-functioning and cause the dreaded <a title="Intel 320 SSD 8mb Bug" href="http://news.softpedia.com/news/Intel-320-Series-SSDs-Affected-by-Firmware-Bug-that-Causes-Data-Loss-210809.shtml" target="_blank">8mb failure</a>.</p>
<h2>Disable Sudden Motion Sensor on a Mac Laptop</h2>
<p>This works to disable the Sudden Motion Sensor on the MacBook Pro, MacBook Air, MacBook, PowerBook, and iBook running Mac OS X 10.6 (Snow Leopard), 10.7 (Lion) and 10.8 (Mountain Lion)</p>
<ol>
<li>Launch <code>Terminal</code></li>
<li>Type the following at the command line: <code>sudo pmset -a sms 0</code></li>
<li>Hit return and enter your <code>password</code></li>
</ol>
<p>The SMS sensor is now <strong>disabled</strong>, it’s just as easy to reenable again by changing the zero to a one when you need the protection back:</p>
<h2>Enable the Sudden Motion Sensor on a Mac Laptop</h2>
<p>This works on the same hardware as disabling the feature, and it’s basically the same commands:</p>
<ol>
<li>Launch <code>Terminal</code></li>
<li>Type the following at the command line: <code>sudo pmset -a sms 1</code></li>
<li>Hit return and enter your <code>password</code></li>
</ol>
<p>The SMS sensor is now <strong>enabled</strong>, you’ll notice the commands are identical except that the <code>-a sms</code> flag now has <code>1</code> attached to it rather than <code>0</code> (standard computing protocol of 1 for on, 0 for off).</p>
<h2>Checking the status of the Sudden Motion Sensor</h2>
<p>If you’re not sure whether the motion sensor is enabled or not, you can check quickly with the command line:</p>
<ol>
<li>Launch <code>Terminal</code></li>
<li>At the command line, type: <code>sudo pmset -g</code></li>
<li>Hit return, enter your <code>password</code></li>
<li>In the list of settings look for the <code>sms</code> entry. Seeing a <code>1</code> next to <code>sms</code> indicates that the motion sensor is <strong>enabled</strong>, seeing a <code>0</code> next to <code>sms</code> indicates the motion sensor is <strong>disabled</strong>.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/07/disable-the-sudden-motion-sensor-on-a-mac-laptop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>View Source of a web page on iPad, iPhone or iPod Touch (using mobile Safari)</title>
		<link>http://blog.grapii.com/2012/07/view-source-of-a-web-page-on-ipad-iphone-or-ipod-touch-using-mobile-safari/</link>
		<comments>http://blog.grapii.com/2012/07/view-source-of-a-web-page-on-ipad-iphone-or-ipod-touch-using-mobile-safari/#comments</comments>
		<pubDate>Mon, 23 Jul 2012 14:23:18 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Safari]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1316</guid>
		<description><![CDATA[After recently implementing WPTouch Pro for mobile devices, I was curious to know what HTML it generated when viewed from my iPhone and iPad. Surprisingly the mobile Safari browser does not have an option to view source, even more surprising is that I&#8217;ve just found this out after owning a iPhone for over 3 years!. [...]]]></description>
			<content:encoded><![CDATA[<p>After recently implementing <a title="Creating a mobile wordpress site using WPTouch Pro" href="http://blog.grapii.com/2012/07/creating-a-mobile-wordpress-site-using-wptouch-pro/">WPTouch Pro</a> for mobile devices, I was curious to know what HTML it generated when viewed from my iPhone and iPad. Surprisingly the mobile Safari browser does not have an option to view source, even more surprising is that I&#8217;ve just found this out after owning a iPhone for over 3 years!. This little guide shows you how to view the source code for the HTML, CSS and JavaScript code of a web page from Safari on the iPad, iPhone or iPod touch.</p>
<p><span id="more-1316"></span></p>
<p>This simple <a title="Bookmarklet" href="http://en.wikipedia.org/wiki/Bookmarklet" target="_blank">bookmarklet</a> is a piece of JavaScript code saved as a bookmark. When you want to see the source of a web page, just click the bookmark and the source of the page is displayed.</p>
<pre>javascript:(function(){
    var w = window.open('about:blank'),
        s = w.document;
    s.write('');
    s.close();
    var f = s.body.appendChild(s.createElement('form'));
        f.setAttribute('method','post');
        f.setAttribute('action','http://resource.grapii.com/files/viewsource/?uri='+location.href);
    var i = f.appendChild(s.createElement('input'));
        i.setAttribute('type','hidden');
        i.setAttribute('name','DOM');
        i.setAttribute('value',encodeURIComponent(document.documentElement.innerHTML));
    f.submit();
})();</pre>
<p style="text-align: center;"><a title="View Source" href="javascript:(function(){var d=window.open('about:blank'),a=d.document;a.write('&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;Loading Source&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;');a.close();var b=a.body.appendChild(a.createElement('form'));b.setAttribute('method','post');b.setAttribute('action','http://resource.grapii.com/files/viewsource/?uri='+location.href);var c=b.appendChild(a.createElement('input'));c.setAttribute('type','hidden');c.setAttribute('name','DOM');c.setAttribute('value',encodeURIComponent(document.documentElement.innerHTML));b.submit()})()" target="_blank">View Source</a> (click to try)</p>
<h2>Step 1.</h2>
<p>Visit this page using Safari on your iPad, iPhone or iPod touch.</p>
<h2>Step 2.</h2>
<p>Tap the <strong>Share</strong> button and select <strong>Add Bookmark</strong> from the popup menu.</p>
<p style="text-align: center;"><a href="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0010.png" rel="lightbox[1316]"><img src="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0010-150x150.png" alt="" title="IMG_0010" width="150" height="150" class="alignnone size-thumbnail wp-image-1329" /></a></p>
<h2>Step 3.</h2>
<p>In the <strong>title field</strong>, enter <code>View Source</code>. Leave the address field as is for now, and tap <strong>save</strong>.</p>
<p style="text-align: center;"><a href="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0011.png" rel="lightbox[1316]"><img src="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0011-150x150.png" alt="" title="IMG_0011" width="150" height="150" class="alignnone size-thumbnail wp-image-1336" /></a></p>
<h2>Step 4.</h2>
<p>Using your touch selection skills, <strong>copy</strong> the following JavaScript code to the devices clipboard (this is a condensed version of the code above)</p>
<pre>javascript:(function(){var d=window.open("about:blank"),a=d.document;a.write("&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;Loading Source&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;");a.close();var b=a.body.appendChild(a.createElement("form"));b.setAttribute("method","post");b.setAttribute("action","http://resource.grapii.com/files/viewsource/?uri="+location.href);var c=b.appendChild(a.createElement("input"));c.setAttribute("type","hidden");c.setAttribute("name","DOM");c.setAttribute("value",encodeURIComponent(document.documentElement.innerHTML));b.submit()})()</pre>
<h2>Step 5.</h2>
<p>Tap the <strong>Bookmarks</strong> icon and then <strong>edit</strong>. Find the <em>View Source</em> bookmark in the list and tap the <strong>right arrow</strong> to get the bookmark details. Now tap on the <strong>address field</strong> and hit the <strong>X</strong> icon to clear the existing entry. Tap and <strong>paste</strong> the JavaScript code from the clipboard (Step 4).</p>
<p style="text-align: center;"><a href="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0016.png" rel="lightbox[1316]"><img src="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0016-150x150.png" alt="" title="IMG_0016" width="150" height="150" class="alignnone size-thumbnail wp-image-1333" /></a><a href="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0014.png" rel="lightbox[1316]"><img src="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0014-150x150.png" alt="" title="IMG_0014" width="150" height="150" class="alignnone size-thumbnail wp-image-1331" /></a></p>
<h2>Step 6.</h2>
<p>Tap the <strong>Bookmarks</strong> navigation item to save the changes.</p>
<h2>All Done.</h2>
<p>Simply visit any web page, and if you want to see it&#8217;s source code, tap on the <strong>Bookmarks</strong> icon and select the <strong>View Source</strong> bookmark.
<p style="text-align: center;"><a href="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0015.png" rel="lightbox[1316]"><img src="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0015-150x150.png" alt="" title="IMG_0015" width="150" height="150" class="alignnone size-thumbnail wp-image-1332" /></a><a href="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0017.png" rel="lightbox[1316]"><img src="http://blog.grapii.com/wp-content/uploads/2012/07/IMG_0017-150x150.png" alt="" title="IMG_0017" width="150" height="150" class="alignnone size-thumbnail wp-image-1334" /></a></p>
<p>Note that the source shown is the generated <a title="Document Object Model" href="http://en.wikipedia.org/wiki/Document_Object_Model" target="_blank">DOM</a>, and not the original HTML. These might differ depending on the amount of JavaScript used on the page.</p>
<h3>Alternative View Source code</h3>
<p>You could use this code for the bookmarklet instead, described by <a href="http://banagale.com/view-source-from-safari-on-ipad.htm" title="Rob" target="_blank"></a>, which is &#8220;pure&#8221; but doesn&#8217;t include the highlighted syntax, clickable links or selectable text.</p>
<pre>javascript:(function(){
    var w = window.open('about:blank'),
        s = w.document;
    s.write('&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;head&gt;&lt;title&gt;Source of ' + location.href + '&lt;/title&gt;&lt;meta name="viewport" content="width=device-width" /&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;');
    s.close();

    var pre = s.body.appendChild(s.createElement("pre"));
    pre.style.overflow = 'auto';
    pre.style.whiteSpace = 'pre-wrap';
    pre.appendChild(s.createTextNode(document.documentElement.innerHTML));
})();</pre>
<p><strong>Copy &#038; Paste the following for the alternative View Source code:</strong></p>
<pre>javascript:var%20sourceWindow%20%3D%20window.open%28%27about%3Ablank%27%29%3B%20%0Avar%20newDoc%20%3D%20sourceWindow.document%3B%20%0AnewDoc.open%28%29%3B%20%0AnewDoc.write%28%27%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20%27%20%2B%20document.location.href%20%2B%20%27%3C/title%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E%27%29%3B%20%0AnewDoc.close%28%29%3B%20%0Avar%20pre%20%3D%20newDoc.body.appendChild%28newDoc.createElement%28%22pre%22%29%29%3B%20%0Apre.appendChild%28newDoc.createTextNode%28document.documentElement.innerHTML%29%29%3B</pre>
<p style="text-align: center;"><a title="View Source" href="javascript:var%20sourceWindow%20%3D%20window.open%28%27about%3Ablank%27%29%3B%20%0Avar%20newDoc%20%3D%20sourceWindow.document%3B%20%0AnewDoc.open%28%29%3B%20%0AnewDoc.write%28%27%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20%27%20%2B%20document.location.href%20%2B%20%27%3C/title%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E%27%29%3B%20%0AnewDoc.close%28%29%3B%20%0Avar%20pre%20%3D%20newDoc.body.appendChild%28newDoc.createElement%28%22pre%22%29%29%3B%20%0Apre.appendChild%28newDoc.createTextNode%28document.documentElement.innerHTML%29%29%3B" target="_blank">View Source</a> (click to try)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/07/view-source-of-a-web-page-on-ipad-iphone-or-ipod-touch-using-mobile-safari/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Creating a mobile WordPress site using WPTouch Pro</title>
		<link>http://blog.grapii.com/2012/07/creating-a-mobile-wordpress-site-using-wptouch-pro/</link>
		<comments>http://blog.grapii.com/2012/07/creating-a-mobile-wordpress-site-using-wptouch-pro/#comments</comments>
		<pubDate>Mon, 16 Jul 2012 14:49:36 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1297</guid>
		<description><![CDATA[I like my wordpress desktop site, I really do. It took me a long time to design the layouts in Photoshop, with countless evenings creating the CSS styles, and just as long, if not longer, creating and updating the various WordPress theme PHP pages. However it is a desktop theme, and in today&#8217;s world where [...]]]></description>
			<content:encoded><![CDATA[<p>I like my wordpress desktop site, I really do. It took me a long time to design the layouts in Photoshop, with countless evenings creating the CSS styles, and just as long, if not longer, creating and updating the various <a title="Wordpress" href="http://www.wordpress.org" target="_blank">WordPress</a> theme PHP pages.</p>
<p><span id="more-1297"></span></p>
<p style="text-align: center;"><a href="http://blog.grapii.com/wp-content/uploads/2012/07/grapii-mobile-site.png" rel="lightbox[1297]"><img class="alignnone size-medium wp-image-1312" title="grapii-mobile-site" src="http://blog.grapii.com/wp-content/uploads/2012/07/grapii-mobile-site-500x300.png" alt="" width="500" height="300" /></a></p>
<p>However it is a desktop theme, and in today&#8217;s world where more and more people are using mobile devices to browse the Internet, it doesn&#8217;t make sense to alienate this potential audience by providing content that they cannot see, navigate or interact with.</p>
<p>I wanted to make sense, and to do so needed to provide viewing public the ability to view, navigate and interact with my site regardless of the device they use.</p>
<p>Two options came to mind, firstly create a new <a title="Responsive Web Design" href="http://en.wikipedia.org/wiki/Responsive_Web_Design" target="_blank">responsive site</a>, the site would adapt based on the users device resolution, so whether they&#8217;re using a smartphone, tablet, laptop or desktop, the contents they would see and interact with would be suited to their device. the second option is to create a site specifically for the mobile devices, whilst leaving the desktop version as is.</p>
<p>The ultimate goal is to create a responsive site, however, that is going to take a long time as I&#8217;d like to keep my current theme but make it responsive, so I decided with the second option, which I expected would be a much quicker implementation.</p>
<p>Problem with creating a new layout for mobile usage is that I would&#8217;ve ended up with two sets of themes to maintain, one for the desktop and the other for mobile. This didn&#8217;t appeal to me, so instead a started looking for existing <a title="Wordpress Mobile Themes" href="https://www.google.com.au/search?sugexp=chrome,mod=3&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=wordpress+mobile+themes" target="_blank">wordpress mobile themes</a>, or better still <a title="Wordpress Plugins" href="http://wordpress.org/extend/plugins/" target="_blank">wordpress plugins</a> that would take care of the theming without much intervention from me.</p>
<p>I soon discovered a plugin application called <a title="WPTouch Pro" href="http://www.bravenewcode.com/product/wptouch-pro/" target="_blank">WPTouch Pro</a>, which allows you to present a mobile theme to users on mobile devices, whilst displaying the desktop theme to desktop browser users, perfect.</p>
<p>Installation and configuration was fairly simple, all done through its own GUI within the WordPress admin panel. What wasn&#8217;t so straightforward was displaying custom template pages and fields. Luckily WPTouch Pro allows you to create a clone of the pre-configured themes, which you can then modify without affecting the default. I downloaded the cloned version of the theme from <code>../wp-content/plugins/wptouch-pro/themes/classic</code> and using <a title="Coda" href="http://panic.com/coda/" target="_blank">Coda</a>, started to look at their PHP and CSS pages. After making some changes to the <code>ipad/style.css</code> and <code>iphone/style.css</code> pages and creating my own set of template pages ( the same names as those used in the desktop theme) I uploaded the files back to the server <code>../wp-content/wptouch-data/themes</code></p>
<p>I now have a dynamic mobile theme for mobile devices and a desktop theme for desktop browsers, and all this took me less than one day!</p>
<p>As I said the ultimate goal is to create a responsive design based on the desktop theme, but that will take a very long time, so in the meantime <a title="WPTouch Pro" href="http://www.bravenewcode.com/product/wptouch-pro/" target="_blank">WPTouch Pro</a> serves it purpose and hopefully helps people read my content using a mobile device.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/07/creating-a-mobile-wordpress-site-using-wptouch-pro/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to find the MAC address in Mac OS X</title>
		<link>http://blog.grapii.com/2012/06/how-to-find-the-mac-address-in-mac-os-x/</link>
		<comments>http://blog.grapii.com/2012/06/how-to-find-the-mac-address-in-mac-os-x/#comments</comments>
		<pubDate>Mon, 25 Jun 2012 04:48:49 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1276</guid>
		<description><![CDATA[Every physical interface of a computer has an associated MAC address which is a unique identifier. A MAC address is different from an IP address and is used for network access control and monitoring of network connectivity, such as applying MAC filtering on your Internet router to only allow specific machines to connect to the [...]]]></description>
			<content:encoded><![CDATA[<p>Every physical interface of a computer has an associated MAC address which is a unique identifier. A MAC address is different from an IP address and is used for network access control and monitoring of network connectivity, such as applying MAC filtering on your Internet router to only allow specific machines to connect to the internet via your router. However, in order to do any of this you need to know the computers MAC address. This article explains how to find the MAC address of your MAC OS X machine.</p>
<p><span id="more-1276"></span></p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-1284" title="mac-address" src="http://blog.grapii.com/wp-content/uploads/2012/06/mac-address.png" alt="" width="382" height="319" /></p>
<h3>How to find the MAC address in Mac OS X</h3>
<p>In order to find the MAC address of your network card, do the following:</p>
<ol>
<li>From the Apple menu, Open System Preferences</li>
<li>Now go to “Network”.</li>
<li>From Network, select your active network connection. This would be displayed in the left menu (Wi-Fi, Ethernet, etc).</li>
<li>Now select “Advanced” in the lower right corner.</li>
<li>You&#8217;ll should now see “Wi-Fi Address” at the bottom of the window, next to which is a set of hexadecimal characters. These characters are your Mac OS X’s MAC address for the network connection.</li>
</ol>
<p style="text-align: center;"><a href="http://blog.grapii.com/wp-content/uploads/2012/06/mac-address-2.jpg" rel="lightbox[1276]"><img class="aligncenter size-medium wp-image-1280" title="mac-address-2" src="http://blog.grapii.com/wp-content/uploads/2012/06/mac-address-2-300x260.jpg" alt="" width="300" height="260" /></a><br />
<strong>You should note that the MAC address is called “Wi-Fi Address” in OS X 10.7 Lion, whereas it was called “Airport Address” in Mac OS X 10.6 Snow Leopard and before.<br />
</strong></p>
<h3>How to list all network hardware MAC addresses in Mac OS X</h3>
<p>In order to list the MAC addresses of all the network hardware on a Mac running OS X, run the following command in the <code>Terminal</code>:</p>
<pre> networksetup -listallhardwareports</pre>
<p>This would return something as follows. The “Ethernet Address” is the MAC address of each interface.</p>
<pre>Hardware Port: Bluetooth DUN
Device: Bluetooth-Modem
<strong>Ethernet Address: db:26:cd:41:c3:79</strong>

Hardware Port: Ethernet
Device: en0
<strong>Ethernet Address: 21:d3:91:bb:11:bd</strong>

Hardware Port: FireWire
Device: fw0
<strong>Ethernet Address: c6:18:ed:fa:ff:15:db:51</strong>

Hardware Port: Wi-Fi
Device: en1
<strong>Ethernet Address: f2:8b:fc:ae:bb:f5</strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/06/how-to-find-the-mac-address-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to edit the hosts file in Mac OS X 10.7 – Lion</title>
		<link>http://blog.grapii.com/2012/03/how-to-edit-the-hosts-file-in-mac-os-x-lion-10-7/</link>
		<comments>http://blog.grapii.com/2012/03/how-to-edit-the-hosts-file-in-mac-os-x-lion-10-7/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 05:59:25 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1251</guid>
		<description><![CDATA[The hosts file is a text file that maps hostnames to IP addresses. Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address. If no entries exists it resolves the IP via the active connection’s [...]]]></description>
			<content:encoded><![CDATA[<p>The hosts file is a text file that maps hostnames to IP addresses. Upon typing a url address in the browser, the system first checks if there is a relevant entry in the hosts file and if exists gets the corresponding IP address. If no entries exists it resolves the IP via the active connection’s DNS servers.</p>
<p>The hosts file can be edited to block certain hostsnames, like ad-serving/malicious hosts, or used for web development purposes, i.e. to redirect domains to local addresses.</p>
<p><span id="more-1251"></span></p>
<h2>Step 1 – Open the Terminal.app</h2>
<p>Either start typing <code>Terminal</code> in the Spotlight search, or goto Applications &gt; Utilities &gt; Terminal.</p>
<h2>Step 2 – Open the host file</h2>
<p>Open the hosts file by typing the following in the Terminal window:</p>
<pre>$ sudo nano /private/etc/hosts</pre>
<p>Type your user password when prompted.</p>
<h2>Step 3 – Edit the hosts file</h2>
<p>The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – local host). Simply append your new mappings underneath the default ones.</p>
<h2>Step 4 – Save the hosts file</h2>
<p>When done editing the hosts file, press <strong>Control+o</strong> to save the file.</p>
<p>Press <strong>Enter</strong> on the filename prompt, and</p>
<p><strong>Control-x</strong> to exit the editor.</p>
<h2>Step 5 – Flush the DNS cache</h2>
<p>You can use a simple Terminal command to flush the DNS cache, and have your host file changes take immediate effect. Using the open Terminal window, then the following command:</p>
<pre>$ dscacheutil -flushcache</pre>
<p>Your new mappings should now take effect.</p>
<p>Other Mac OS X operating systems:<br />
<a href="http://blog.grapii.com/2012/08/how-to-edit-the-hosts-file-in-mac-os-x-10-8-mountain-lion/" title="How to edit the hosts file in Mac OS X 10.8 – Mountain Lion">How to edit the hosts file in Mac OS X 10.8 – Mountain Lion</a><br />
<a href="http://blog.grapii.com/2010/09/how-to-edit-the-hosts-file-in-mac-os-x-snow-leopard/" title="How to edit the hosts file in Mac OS X 10.6 – Snow Leopard">How to edit the hosts file in Mac OS X 10.6 – Snow Leopard</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2012/03/how-to-edit-the-hosts-file-in-mac-os-x-lion-10-7/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How To Create Kindle Optimised Screensavers</title>
		<link>http://blog.grapii.com/2011/09/how-to-create-kindle-optimised-screensavers/</link>
		<comments>http://blog.grapii.com/2011/09/how-to-create-kindle-optimised-screensavers/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 14:20:32 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Kindle]]></category>
		<category><![CDATA[Wallpapers]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/2011/09/how-to-create-kindle-optimised-screensavers/</guid>
		<description><![CDATA[This guide will walk you through the basic steps of creating an optimised screensaver for your Kindle.&#160; Aimed at the Kindle 3, the end results should look fine on Kindle DX or Kindle 2.&#160; The walk through uses Photoshop CS4, but any version of Photoshop should suffice. Shades of Grey The Kindle 3 (and Kindle [...]]]></description>
			<content:encoded><![CDATA[<p>This guide will walk you through the basic steps of creating an optimised screensaver for your Kindle.&#160; Aimed at the Kindle 3, the end results should look fine on Kindle DX or Kindle 2.&#160; The walk through uses Photoshop CS4, but any version of Photoshop should suffice.</p>
<p><span id="more-1250"></span><br />
<h3>Shades of Grey</h3>
<p>The Kindle 3 (and Kindle DX) support the following sixteen shades of grey:</p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-shades-of-grey.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-shades-of-grey" alt="kindle-shades-of-grey" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-shades-of-grey_thumb.png" width="322" height="480" /></a></p>
<p>The key is try and use only these sixteen shades of grey.</p>
<h3>Step 1.</h3>
<p>Download the Photoshop colour table below</p>
<blockquote><p><a href="http://resource.grapii.com/download/kindle3colours.act.zip">kindle photoshop colour table</a></p>
</blockquote>
<h3>Step 2.</h3>
<p>Start Photoshop and create a new blank document.</p>
<ul>
<li>For Kindle 3 create a document 600px wide by 800px tall.</li>
<li>For Kindle DX create a document 824px wide by 1200px tall.</li>
</ul>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-new-document.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-new-document" alt="kindle-new-document" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-new-document_thumb.png" width="450" height="254" /></a></p>
<h3>Step 3.</h3>
<p>Import a picture or draw your own design into the new document.&#160; High contrast designs look the best on Kindle’s eInk display.</p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-new-design.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-new-design" alt="kindle-new-design" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-new-design_thumb.png" width="400" height="530" /></a></p>
<h3>Step 4.</h3>
<p>Once you have your design, it needs to be optimised for the Kindle by reducing the colour depth to the 16 supported shades of grey.</p>
<p>From Photoshop menu choose <strong>Image &gt; Mode &gt; Indexed Color</strong></p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-menu-indexed-colour.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-menu-indexed-colour" alt="kindle-menu-indexed-colour" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-menu-indexed-colour_thumb.png" width="500" height="327" /></a></p>
<p>Photoshop should prompt if you want to flatten layers, choose <strong>OK</strong>.</p>
<p>You should now have the Indexed Color window showing.&#160; Click on the Palette menu and choose <strong>Custom</strong>…</p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-custom-palette.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-custom-palette" alt="kindle-custom-palette" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-custom-palette_thumb.png" width="300" height="434" /></a></p>
<p>From the Color Table menu, select <strong>Load</strong> and locate the <strong>kindle3colours.act</strong> file you downloaded in <strong>Step 1</strong>.</p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-custom-colour-table.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-custom-colour-table" alt="kindle-custom-colour-table" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-custom-colour-table_thumb.png" width="300" height="257" /></a></p>
<p>The Color Table should now display the 16 Kindle supported grey’s only.&#160; Select <strong>OK</strong> to close the window.</p>
<p>In the Indexed Color window, under the options section select the Dither menu and select <strong>None</strong>.&#160; If the picture does not look good, select the Dither menu again and choose one of the <strong>other options</strong>.&#160; Repeat until you find the best representation.</p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-indexed-color.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-indexed-color" alt="kindle-indexed-color" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-indexed-color_thumb.png" width="300" height="246" /></a></p>
<p>Click <strong>OK</strong> to close the Indexed Color window.</p>
<h3>Step 5.</h3>
<p>The design is now ready for export.&#160; From Photoshop menu, choose <strong>File &gt; Save for Web &amp; Devices</strong></p>
<p><a href="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-save-for-the-web.png" rel="lightbox[1250]"><img style="display: block; float: none; margin-left: auto; margin-right: auto" title="kindle-save-for-the-web" alt="kindle-save-for-the-web" src="http://blog.grapii.com/wp-content/uploads/2011/09/kindle-save-for-the-web_thumb.png" width="500" height="365" /></a></p>
<p>Make the following changes:</p>
<ul>
<li>Set file format to PNG-8</li>
<li>Deselect Transparency</li>
<li>Set Colors to 16</li>
<li>Deselect “Convert to sRGB”</li>
</ul>
<h3>Step 6.</h3>
<p>Save the file and <a href="http://wiki.mobileread.com/wiki/Kindle_Screen_Saver_Hack_for_all_2.x_and_3.x_Kindles">transfer the screensaver to your Kindle</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2011/09/how-to-create-kindle-optimised-screensavers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Unhide Library Folder in Mac OS X 10.7 &#8211; Lion</title>
		<link>http://blog.grapii.com/2011/07/unhide-library-folder-in-mac-os-x-10-7-lion/</link>
		<comments>http://blog.grapii.com/2011/07/unhide-library-folder-in-mac-os-x-10-7-lion/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 10:27:32 +0000</pubDate>
		<dc:creator>Rajesh Patel</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://blog.grapii.com/?p=1224</guid>
		<description><![CDATA[In Mac OS X Lion (10.7), Apple has made the user Library folder hidden. Preferences, presets, and other user customisation settings are stored within this Library folder. There are two ways to access this folder: Temporary To keep the folder hidden and to access it sporadically: In Finder, choose Go > Go To Folder In [...]]]></description>
			<content:encoded><![CDATA[<p>In Mac OS X Lion (10.7), Apple has made the user Library folder hidden.  Preferences, presets, and other user customisation settings are stored within this Library folder.</p>
<p>There are two ways to access this folder:</p>
<h3>Temporary</h3>
<p>To keep the folder hidden and to access it sporadically:</p>
<ol>
<li>In Finder, choose Go > Go To Folder</li>
<li>In the Go To Folder dialog, enter <code>~/Library</code></li>
<li>Click Go</li>
</ol>
<h3>Permanent</h3>
<p>To unhide the folder permanently:</p>
<ol>
<li>Open a Terminal session</li>
<li>Enter the following command (replace &lt;username&gt; with your actual username</li>
<pre>chflags nohidden /Users/&lt;username&gt;/Library</pre>
<li>Quit Terminal</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.grapii.com/2011/07/unhide-library-folder-in-mac-os-x-10-7-lion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
