<?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>Web Log « David Heward</title>
	<atom:link href="http://www.davidheward.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidheward.com</link>
	<description>I write about stuff, mostly, to do with my work, business, the internet, web development, web design, wordpress, games,and my hobbies. In short, this is David Hewards Web Log.</description>
	<lastBuildDate>Wed, 16 May 2012 10:08:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How To Setup WordPress MU in MAMP on Mac OS X</title>
		<link>http://www.davidheward.com/how-to-setup-wordpress-mu-in-mamp-on-mac-os-x/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-setup-wordpress-mu-in-mamp-on-mac-os-x</link>
		<comments>http://www.davidheward.com/how-to-setup-wordpress-mu-in-mamp-on-mac-os-x/#comments</comments>
		<pubDate>Wed, 16 May 2012 10:01:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[wordpress mu]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=713</guid>
		<description><![CDATA[Again, as is often quite a common occurence on my blog, i&#8217;m again blogging something that I think me and my team will find useful &#8230;<p><a class="more-link" href="http://www.davidheward.com/how-to-setup-wordpress-mu-in-mamp-on-mac-os-x/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Again, as is often quite a common occurence on my blog, i&#8217;m again blogging something that I think me and my team will find useful in the future. This time it&#8217;s setting up a WordPress MU installation on OS X using MAMP. </p>
<p>We needed a WordPress Multisite install locally so that we could test flexibly, privately, and securely throughout the development process for a new project. It&#8217;s definitely worth the effort especially if you &#8211; like us love developing locally.</p>
<h3>Things you&#8217;ll need</h3>
<ul>
<li>Terminal</li>
<li>Editor &#8211; vim, nano, mate</li>
<li>MAMP installed</li>
</ul>
<h2>Getting started</h2>
<p>First lets create a site in /Applications/MAMP/htdocs/ &#8211; call it <em>mutest</em></p>
<pre class="prettyprint ">
mkdir mutest
cd mutest
</pre>
<p>Now checkout wordpress with your favourite version control (we use subversion).</p>
<pre class="prettyprint ">
svn co http://core.svn.wordpress.org/tags/3.3.2 .
</pre>
<p>You&#8217;ll see it checking out wordpress now &#8211; when it&#8217;s done navigate to localhost:8888/mutest/ and complete the WordPress installation, i&#8217;m going to assume your competent with installing it normally.</p>
<p>Now open up the MAMP portal and perform the following.</p>
<p>Now go to Ports and change the default port from 8888 to 80 &#8211; once you do this mamp will restart and probably prompt you for your admin password.</p>
<p>We&#8217;re going to use the subdomain mapping for wordpress rather than the subfolder so next we need to edit the /etc/hosts file (which is on your mac).</p>
<p>I use textmate with the terminal hook, so I fire up terminal and run a command like so.</p>
<pre class="prettyprint ">
mate /etc/hosts
</pre>
<p>You could run vim or any other terminal editor if you like.</p>
<p>Add two new example domains to the hosts file (you will probably add more in the future but two will do for now).</p>
<pre class="prettyprint ">
example.site.com
example1.site.com
</pre>
<p>Save and exit.</p>
<h2>Edit your Apache vhosts config file</h2>
<p>Open <mark>/Applications/MAMP/conf/apache/httpd.conf</mark> in a text editor and scroll down to the line that says <mark>“#NameVirtualHost *”</mark>. Replace that line with the following code:</p>
<pre class="prettyprint ">
NameVirtualHost *
&lt;virtualHost *&gt;
 ServerName example.site.com
 ServerAlias example.site.com *.example.site.com
 DocumentRoot &quot;/Applications/MAMP/htdocs/mutest&quot;
 &lt;directory &quot;/Applications/MAMP/htdocs/mutest&quot;&gt;
  Options Indexes FollowSymLinks Includes
  AllowOverride All
  Order allow,deny
  Allow from all
 &lt;/directory&gt;
&lt;/virtualHost&gt;
</pre>
<p>Save and restart mamp server.</p>
<h2>Configuring WordPress MU</h2>
<p>WordPress Multisite is really easy to configure just start by adding the following to your <mark>wp-config.php</mark> file.</p>
<pre class="prettyprint ">
define('WP_ALLOW_MULTISITE', true);
</pre>
<p>Once you&#8217;ve done this head to wp-admin backpanel and then look for the submenu &#8216;Tools&#8217; and click <strong>Network</strong>.</p>
<p>On this page you will now see an option to use sub-domains for your site addresses. Make sure that’s selected, check the other details, and then click the <strong>“Install”</strong> button to make it happen. Note that you’ll see a warning message that says, “Wildcard DNS may not be configured correctly!” – we can ignore this warning because we know our DNS is correct.</p>
<p>Finally, complete the steps outlined there on the “Enabling the Network” page (i.e., create a blogs.dir folder and add the required code snippets to your .htaccess etc). After that, re-login to the Admin area and go to Network Admin > Sites > Add New to begin adding your sub-domain network sites.</p>
<p>Your done! It&#8217;s all over. Your now rocking a nice little wordpress multisite setup locally. Good job. Grab a coffee and get coding!</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fhow-to-setup-wordpress-mu-in-mamp-on-mac-os-x%2F&amp;title=How%20To%20Setup%20WordPress%20MU%20in%20MAMP%20on%20Mac%20OS%20X" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_2"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 How To Setup Wordpress MU in MAMP on Mac OS X"  title="How To Setup Wordpress MU in MAMP on Mac OS X" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/how-to-setup-wordpress-mu-in-mamp-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress remove all inactive widgets</title>
		<link>http://www.davidheward.com/wordpress-remove-all-inactive-widgets/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-remove-all-inactive-widgets</link>
		<comments>http://www.davidheward.com/wordpress-remove-all-inactive-widgets/#comments</comments>
		<pubDate>Tue, 01 May 2012 10:56:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Customising Wordpress]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=736</guid>
		<description><![CDATA[Removing all those pesky inactive wordpress widgets can be achieved with a few lines of code. Something like this: $widgets = get_option('sidebars_widgets'); $widgets['wp_inactive_widgets'] = array(); &#8230;<p><a class="more-link" href="http://www.davidheward.com/wordpress-remove-all-inactive-widgets/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Removing all those pesky inactive wordpress widgets can be achieved with a few lines of code.</p>
<p>Something like this:</p>
<pre class="prettyprint ">
$widgets = get_option('sidebars_widgets');
$widgets['wp_inactive_widgets'] = array();
update_option('sidebars_widgets', $widgets);
</pre>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fwordpress-remove-all-inactive-widgets%2F&amp;title=WordPress%20remove%20all%20inactive%20widgets" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_4"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Wordpress remove all inactive widgets"  title="Wordpress remove all inactive widgets" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/wordpress-remove-all-inactive-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Terminal Shortcuts For Repetitive Commands</title>
		<link>http://www.davidheward.com/mac-terminal-shortcuts-for-repetitive-commands/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mac-terminal-shortcuts-for-repetitive-commands</link>
		<comments>http://www.davidheward.com/mac-terminal-shortcuts-for-repetitive-commands/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 20:54:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac Os X]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=734</guid>
		<description><![CDATA[If you&#8217;ve always wondered if it would be cool to be able to type your own custom command into mac terminal and have it do &#8230;<p><a class="more-link" href="http://www.davidheward.com/mac-terminal-shortcuts-for-repetitive-commands/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve always wondered if it would be cool to be able to type your own custom command into mac terminal and have it do whatever wonderful command thing, you can conjure up in your wonderfully creative head.</p>
<p>Then i&#8217;m afraid to say it&#8217;s just not possible&#8230;ha&#8230;only kidding&#8230;keep reading if you want to find out how, it&#8217;s actually really quite simple.</p>
<p>So to setup these ultra cool, simple shortcut commands for your mac terminal you need to locate or create a <strong>.profile</strong> file.</p>
<p>If you have one already you&#8217;ll be able to find it using the following commands.</p>
<pre class="prettyprint ">
cd ~/
ls -f
</pre>
<p>This either will or won&#8217;t reveal a <strong>.profile</strong> file. If it doesn&#8217;t, no sweat, we&#8217;ll just go ahead and create it.</p>
<pre class="prettyprint ">
mate ~/.profile
</pre>
<p>(note i&#8217;m using Textmate here, you could use <strong>vim</strong> / <strong>nano</strong> or whatever gui takes your fancy.)</p>
<p>Once you&#8217;ve got this file open we&#8217;re going to use <strong>alias</strong> to define our shortcuts.</p>
<p>Here&#8217;s an example.</p>
<pre class="prettyprint ">
alias davetest=&quot;cd /Applications/MAMP/htdocs/davetestsite/&quot;
</pre>
<p>Save the file, relaunch terminal and type &#8220;davetest&#8221; or whatever your shortcut is and wollah you&#8217;ll have created your very own customised mac terminal shortcut command. </p>
<p>Good work.</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fmac-terminal-shortcuts-for-repetitive-commands%2F&amp;title=Mac%20Terminal%20Shortcuts%20For%20Repetitive%20Commands" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_6"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Mac Terminal Shortcuts For Repetitive Commands"  title="Mac Terminal Shortcuts For Repetitive Commands" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/mac-terminal-shortcuts-for-repetitive-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Curl URL which has redirects to obtain the final URL</title>
		<link>http://www.davidheward.com/php-curl-url-which-has-redirects-to-obtain-the-final-url/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=php-curl-url-which-has-redirects-to-obtain-the-final-url</link>
		<comments>http://www.davidheward.com/php-curl-url-which-has-redirects-to-obtain-the-final-url/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 14:08:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Php development]]></category>
		<category><![CDATA[curl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php scrape data]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=731</guid>
		<description><![CDATA[Been doing some toying around lately with various ways of scraping hidden URL&#8217;s from a website that deliberately tries to hide them. I have been &#8230;<p><a class="more-link" href="http://www.davidheward.com/php-curl-url-which-has-redirects-to-obtain-the-final-url/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Been doing some toying around lately with various ways of scraping hidden URL&#8217;s from a website that deliberately tries to hide them.</p>
<p>I have been using PHP and the CURL library ascertain the final URL after redirects whilst also picking up on javascript redirects etc.</p>
<p>This is what i&#8217;ve come up with so far, and it&#8217;s working a dream.</p>
<pre class="prettyprint ">
function get_final_url( $url, $timeout = 5 ){
    $url = str_replace( &quot;&amp;amp;&quot;, &quot;&amp;&quot;, urldecode(trim($url)) );

   	$cookie = tempnam (&quot;/tmp&quot;, &quot;CURLCOOKIE&quot;);
	$ch = curl_init();
	curl_setopt( $ch, CURLOPT_USERAGENT, &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1&quot; );
	curl_setopt( $ch, CURLOPT_URL, $url );
	curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie );
	curl_setopt( $ch, CURLOPT_HEADER, true);
	curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
	curl_setopt( $ch, CURLOPT_ENCODING, &quot;&quot; );
	curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
	curl_setopt( $ch, CURLOPT_AUTOREFERER, true );
	curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout );
	curl_setopt( $ch, CURLOPT_TIMEOUT, $timeout );
	curl_setopt( $ch, CURLOPT_MAXREDIRS, 10 );
	$content = curl_exec( $ch );
	$response = curl_getinfo( $ch );
	curl_close ( $ch );

	if ($response['http_code'] == 301 || $response['http_code'] == 302):
	    ini_set(&quot;user_agent&quot;, &quot;Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1&quot;);
	    $headers = get_headers($response['url']);

	    $location = &quot;&quot;;
	    foreach( $headers as $value ):
	        if ( substr( strtolower($value), 0, 9 ) == &quot;location:&quot; )
	            return get_final_url( trim( substr( $value, 9, strlen($value) ) ) );
	    endforeach;
	endif;

	if (preg_match(&quot;/window.location.replace('(.*)')/i&quot;, $content, $value) ||
	        preg_match(&quot;/window.location=\&quot;(.*)\&quot;/i&quot;, $content, $value) ||
	        preg_match(&quot;/location.href=\&quot;(.*)\&quot;/i&quot;, $content, $value) ):

	    	return get_final_url ( $value[1] );
	else:
	    return $response['url'];
	endif;

}

// Simply called like so

$my_final_url = get_final_url('http://originalurl.com',10);
</pre>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fphp-curl-url-which-has-redirects-to-obtain-the-final-url%2F&amp;title=PHP%20Curl%20URL%20which%20has%20redirects%20to%20obtain%20the%20final%20URL" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_8"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 PHP Curl URL which has redirects to obtain the final URL"  title="PHP Curl URL which has redirects to obtain the final URL" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/php-curl-url-which-has-redirects-to-obtain-the-final-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rsync folder from one server to another</title>
		<link>http://www.davidheward.com/rsync-folder-from-one-server-to-another/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rsync-folder-from-one-server-to-another</link>
		<comments>http://www.davidheward.com/rsync-folder-from-one-server-to-another/#comments</comments>
		<pubDate>Fri, 27 Apr 2012 10:54:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac Os X]]></category>
		<category><![CDATA[Server Admin]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=729</guid>
		<description><![CDATA[Incredibly useful function that i&#8217;ve been using alot today to help move clients sites into a new server setup quickly using rysnc. rsync is a &#8230;<p><a class="more-link" href="http://www.davidheward.com/rsync-folder-from-one-server-to-another/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Incredibly useful function that i&#8217;ve been using alot today to help move clients sites into a new server setup quickly using rysnc.</p>
<p>rsync is a software application and network protocol for Unix-like and Windows systems that synchronizes files and directories from one location to another while minimizing data transfer using delta encoding when appropriate (thanks Wikipedia).</p>
<p>rsync -avz -e ssh username@yourotherserver:/pathto/domain/html/wp-content/plugins .</p>
<p>In this case I rsync the plugins folder into the current working directory (make sure if your copying and pasting this command to CD into the right folder first before running).</p>
<p>Trust me this will save you time!</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Frsync-folder-from-one-server-to-another%2F&amp;title=Rsync%20folder%20from%20one%20server%20to%20another" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_10"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Rsync folder from one server to another"  title="Rsync folder from one server to another" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/rsync-folder-from-one-server-to-another/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I released Topmmorpg100 an MMORPG Topsite</title>
		<link>http://www.davidheward.com/i-released-topmmorpg100-an-mmorpg-topsite/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=i-released-topmmorpg100-an-mmorpg-topsite</link>
		<comments>http://www.davidheward.com/i-released-topmmorpg100-an-mmorpg-topsite/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 20:39:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Free Online Games]]></category>
		<category><![CDATA[Gaming topsites]]></category>
		<category><![CDATA[topmmorpg100]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=722</guid>
		<description><![CDATA[Over the last few months as a bit of a side project I have been developing and building topmmorpg100.com &#8211; an online MMORPG, MMO &#038; &#8230;<p><a class="more-link" href="http://www.davidheward.com/i-released-topmmorpg100-an-mmorpg-topsite/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Over the last few months as a bit of a side project I have been developing and building <a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://topmmorpg100.com"  title="Topmmorpg100 game voting topsite">topmmorpg100.com</a> &#8211; an online MMORPG, MMO &#038; Browser based gaming topsite voting site.</p>
<p>Game developers and game owners can list their games on <a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://topmmorpg100.com"  title="Topmmorpg100 game voting topsite">topmmorpg100.com</a> for free and encourage their users to vote for them on it. They can make use of our industry leading API&#8217;s which provide developers with everything they need to make a successful job of incentivising voting for their players. Our API&#8217;s will do such things as callback your API URL when a vote is successfully processed with the playerID you pass to us in the voting process. </p>
<p>It&#8217;ll even allow you to verify a userID or IP Address has voted for your game.</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://topmmorpg100.com"  title="Topmmorpg100 game voting topsite">Topmmorpg100.com</a> is looking for some more game owners to join, currently they are offering 100 free votes and 1 month free Gold membership to the next 5 sites that join up.</p>
<p>It&#8217;s certainly a very good MMORPG &#038; Gaming voting site and is feature rich and well coded.</p>
<p>Come check out my hard work <a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://topmmorpg100.com"  title="Topmmorpg100 game voting topsite">here</a> if you like it, be sure to drop me a comment or buy me  a beer sometime. Also if you have any improvements you&#8217;d like to see drop them here as well.</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fi-released-topmmorpg100-an-mmorpg-topsite%2F&amp;title=I%20released%20Topmmorpg100%20an%20MMORPG%20Topsite" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_12"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 I released Topmmorpg100 an MMORPG Topsite"  title="I released Topmmorpg100 an MMORPG Topsite" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/i-released-topmmorpg100-an-mmorpg-topsite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Great terminal and useful mac osx commands I came across recently</title>
		<link>http://www.davidheward.com/great-terminal-and-useful-mac-osx-commands-i-came-across-recently/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=great-terminal-and-useful-mac-osx-commands-i-came-across-recently</link>
		<comments>http://www.davidheward.com/great-terminal-and-useful-mac-osx-commands-i-came-across-recently/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 21:13:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mac Os X]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=719</guid>
		<description><![CDATA[Having never actually known about these commands in the past, i&#8217;m quite taken by them. I am documenting them here for future reference. ctrl+u &#8211; &#8230;<p><a class="more-link" href="http://www.davidheward.com/great-terminal-and-useful-mac-osx-commands-i-came-across-recently/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Having never actually known about these commands in the past, i&#8217;m quite taken by them.</p>
<p>I am documenting them here for future reference.</p>
<p>ctrl+u &#8211; clears current line in terminal<br />
ctrl+l &#8211; clears terminal commands without having to run the cmd &#8216;clear&#8217;</p>
<p>cmd+d &#8211; creates a split terminal window<br />
cmd+d+shft &#8211; removes the split terminal window</p>
<p>cmd+shft+{ &#8211; previous terminal tab<br />
cmd+shft+} &#8211; next terminal tab</p>
<p>mkdir -p /this/is/avery/long/directory/structure/and/would/be/annoying/tocreate/</p>
<p>Will create the directory structure in one command for you rather than doing many commands.</p>
<p>top &#8211; Shows the running processes on your mac</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fgreat-terminal-and-useful-mac-osx-commands-i-came-across-recently%2F&amp;title=Great%20terminal%20and%20useful%20mac%20osx%20commands%20I%20came%20across%20recently" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_14"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Great terminal and useful mac osx commands I came across recently"  title="Great terminal and useful mac osx commands I came across recently" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/great-terminal-and-useful-mac-osx-commands-i-came-across-recently/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Checking out remote branch in Git</title>
		<link>http://www.davidheward.com/checking-out-remote-branch-in-git/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=checking-out-remote-branch-in-git</link>
		<comments>http://www.davidheward.com/checking-out-remote-branch-in-git/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 10:10:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Git]]></category>
		<category><![CDATA[Version Control]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=715</guid>
		<description><![CDATA[Simply blogging this for future reference and in the hope it will be useful for someone else. To checkout a remote branch into your local &#8230;<p><a class="more-link" href="http://www.davidheward.com/checking-out-remote-branch-in-git/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Simply blogging this for future reference and in the hope it will be useful for someone else.</p>
<p>To checkout a remote branch into your local use the following commands.</p>
<pre class="prettyprint ">git clone myrepo@git.example.com</pre>
<pre class="prettyprint ">git branch -r</pre>
<p>Will show you all the remote branches pick the one you like&#8230;</p>
<p>For instance for me it would be origin/dave.</p>
<p>Run the following command.</p>
<pre class="prettyprint ">git checkout --track origin/dave</pre>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fchecking-out-remote-branch-in-git%2F&amp;title=Checking%20out%20remote%20branch%20in%20Git" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_16"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Checking out remote branch in Git"  title="Checking out remote branch in Git" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/checking-out-remote-branch-in-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress in two sentences</title>
		<link>http://www.davidheward.com/wordpress-in-two-sentences/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-in-two-sentences</link>
		<comments>http://www.davidheward.com/wordpress-in-two-sentences/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 09:30:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=709</guid>
		<description><![CDATA[Recently tasked with doing this for work, what is WordPress? Explain in two easily understandable sentences:- WordPress is web software you can use to create &#8230;<p><a class="more-link" href="http://www.davidheward.com/wordpress-in-two-sentences/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Recently tasked with doing this for work, what is WordPress? Explain in two easily understandable sentences:-</p>
<p>WordPress is web software you can use to create a beautiful website or blog quickly, feature full and user friendly. We like to say that WordPress is both free and priceless at the same time.</p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fwordpress-in-two-sentences%2F&amp;title=WordPress%20in%20two%20sentences" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_18"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Wordpress in two sentences"  title="Wordpress in two sentences" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/wordpress-in-two-sentences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entering the world of mainstream WordPress Plugin development</title>
		<link>http://www.davidheward.com/entering-the-world-of-mainstream-wordpress-plugin-development/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=entering-the-world-of-mainstream-wordpress-plugin-development</link>
		<comments>http://www.davidheward.com/entering-the-world-of-mainstream-wordpress-plugin-development/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 20:04:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Plugin development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.davidheward.com/?p=702</guid>
		<description><![CDATA[Having written quite a few private WordPress plugins, I am now about to take on the task of creating a WordPress plugin for the general &#8230;<p><a class="more-link" href="http://www.davidheward.com/entering-the-world-of-mainstream-wordpress-plugin-development/">View more</a></p>]]></description>
			<content:encoded><![CDATA[<p>Having written quite a few private WordPress plugins, I am now about to take on the task of creating a WordPress plugin for the general public (GPL License&#8230;obviously). It&#8217;s quite a different task from creating plugins for self or a limited use, but nonetheless one i&#8217;m looking forward to having in my own portfolio and my place of works.</p>
<p>I&#8217;m currently weighing up some options in terms of what to create, but at my place of work (<a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.bytewire.co.uk"  title="Website design in chelmsford essex">Bytewire</a>) we use WordPress alot for our clients and indeed many of our own projects. We have in this time come across some annoying problems which potentially a great plugin could very much help to overcome. Deciding on a feasible plugin to create is often one of the hardest things for a developer, especially so if it&#8217;s your first. I&#8217;m not venturing into making a plugin for any other reason than to help others and ticking off a personal milestone.</p>
<p>When developing a plugin for general public use you do have to remember a heck load more stuff, here&#8217;s some of the stuff i&#8217;m preparing my plugin to be ready for, and to handle.</p>
<h2>Developing general release WordPress Plugins</h2>
<p>When your developing for the general public you have to remember that your own integrity will be judged by the very integrity of your own plugin. If your plugin breaks a prospective users site, or, simply doesn&#8217;t do as it says, the user is likely to be very unhappy and potentially blacklist you as a plugin developer choice for future needs. How can you overcome these problems? Well, the simple answer is &#8211; be thorough, very thorough.</p>
<ul>
<li>Make sure you check your plugin can function in a WordPress MU setup, by providing different or extra funtionality if <em>is_multisite()</em is true, or simply changing the experience to avoid breaking points.</li>
<li>Comment your code well &#8211; WordPress is based on a GPL license, and actively encourages, code sharing and the ability to delve into one anothers code and make changes where seen fit. This helps with learning and extendability.</li>
<li>Debug your code &#8211; Using the WordPress functionality, make sure you debug your code so that you are not using deprecated functions or code</li>
<li>Build your plugin for the current WordPress version, do not attempt to support older versions of WordPress. As wrong as this may seem, Worpdress actively encourages this and warns all users not on the most up to date versions of WordPress they are not guaranteed a secure service unless they are. This can often be enough alone to persuade many clients and blog owners to upgrade. Generally WordPress wants to encourage upgrades as much as possible and with the possibility now to perform the upgrade in a matter of a handful of clicks, any user could do it. Suggesting to me if a user needs to use your plugin and he can&#8217;t without upgrading, WordPress effectively gets what it wants from your support as well.</li>
<li>Ensure you provide the properly formatted readme.txt file when submitting it to the plugin repository on WordPress</li>
<li>Make sure you are familiar with Subversion, you are required to use this to make changes to your plugin going forward.</li>
<li>You are most likely to find that your WordPress plugin is naturally fairly backward compatible, depending on the functions it makes use of, but as a general rule of thumb you could make sure it&#8217;s compatible with at least the last two major releases. Given that they are done on a 3-4 month basis, this would give you all users in the last 8 months by default and any that have upgraded in that time. Which is fine.</li>
</ul>
<p>These are just a few things that are notable about diving into the world of WordPress public plugin development, there but many more. Perhaps as time goes by I will look to add to this post and grow it with my experiences. In the mean time if your a reader and you&#8217;ve got any great ideas for a killer WordPress plugin then i&#8217;d love to here from you. </p>
<p><a target="_blank" rel="nofollow" href="http://www.davidheward.com/goto/http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.davidheward.com%2Fentering-the-world-of-mainstream-wordpress-plugin-development%2F&amp;title=Entering%20the%20world%20of%20mainstream%20WordPress%20Plugin%20development" class="a2a_dd a2a_target addtoany_share_save"  id="wpa2a_20"><img src="http://www.davidheward.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Entering the world of mainstream Wordpress Plugin development"  title="Entering the world of mainstream Wordpress Plugin development" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.davidheward.com/entering-the-world-of-mainstream-wordpress-plugin-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

