<?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 Development</title>
	<atom:link href="http://www.peter-dillon.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.peter-dillon.com</link>
	<description>Random Tips</description>
	<lastBuildDate>Tue, 24 Jan 2012 01:51:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu set Static ip</title>
		<link>http://www.peter-dillon.com/ubuntu-set-static-ip/</link>
		<comments>http://www.peter-dillon.com/ubuntu-set-static-ip/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 04:39:43 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=93</guid>
		<description><![CDATA[Edit /etc/networking/interfaces with nano change eth0 from dhcp to static as show below ( remember to use your own net ip addresses. auto eth0 iface eth0 inet static address 192.168.1.20 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1]]></description>
			<content:encoded><![CDATA[<p>Edit /etc/networking/interfaces with nano change eth0 from dhcp to static as show below ( remember to use your own net ip addresses.</p>
<pre><code>auto eth0
iface eth0 inet static
        address 192.168.1.20
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/ubuntu-set-static-ip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If then Xslt Choose</title>
		<link>http://www.peter-dillon.com/if-then-xslt-choose/</link>
		<comments>http://www.peter-dillon.com/if-then-xslt-choose/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 05:49:17 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Xslt]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=88</guid>
		<description><![CDATA[If there is image/filename then use the first filename found, otherwise show image not found. &#60;xsl:choose&#62; &#60;xsl:when test="image/filename"&#62; &#60;IMG&#62; &#60;xsl:attribute name="src"&#62; &#60;xsl:value-of select="image/filename[1]" /&#62; &#60;/xsl:attribute&#62; &#60;/IMG&#62; &#60;/xsl:when&#62; &#60;xsl:otherwise&#62; &#60;IMG&#62; &#60;xsl:attribute name="src"&#62; &#60;xsl:text&#62;http://images.domain.com/NAN.gif&#60;/xsl:text&#62; &#60;/xsl:attribute&#62; &#60;/IMG&#62; &#60;/xsl:otherwise&#62; &#60;/xsl:choose&#62;]]></description>
			<content:encoded><![CDATA[<p>If there is image/filename then use the first filename found, otherwise show image not found.</p>
<pre>
<code>&lt;xsl:choose&gt;
    &lt;xsl:when test="image/filename"&gt;
        &lt;IMG&gt;
            &lt;xsl:attribute name="src"&gt;
                &lt;xsl:value-of select="image/filename[1]" /&gt;
            &lt;/xsl:attribute&gt;
        &lt;/IMG&gt;
    &lt;/xsl:when&gt;
    &lt;xsl:otherwise&gt;
        &lt;IMG&gt;
            &lt;xsl:attribute name="src"&gt;
                &lt;xsl:text&gt;http://images.domain.com/NAN.gif&lt;/xsl:text&gt;
            &lt;/xsl:attribute&gt;
        &lt;/IMG&gt;
    &lt;/xsl:otherwise&gt;
&lt;/xsl:choose&gt;</code>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/if-then-xslt-choose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Currency Format Xslt</title>
		<link>http://www.peter-dillon.com/currency-format-xslt/</link>
		<comments>http://www.peter-dillon.com/currency-format-xslt/#comments</comments>
		<pubDate>Sun, 24 Oct 2010 05:47:28 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Xslt]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=86</guid>
		<description><![CDATA[&#60;div class="list_price"&#62;$&#60;xsl:value-of select = "format-number(list_price,'#,###')" /&#62;&#60;/div&#62;]]></description>
			<content:encoded><![CDATA[<p><pre><code>&lt;div class="list_price"&gt;$&lt;xsl:value-of select = "format-number(list_price,'#,###')" /&gt;&lt;/div&gt;</code></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/currency-format-xslt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RailsPlayground Mod_deflate Disabled on developer accounts</title>
		<link>http://www.peter-dillon.com/railsplayground-mod_deflate-disabled-on-developer-accounts/</link>
		<comments>http://www.peter-dillon.com/railsplayground-mod_deflate-disabled-on-developer-accounts/#comments</comments>
		<pubDate>Sun, 17 Oct 2010 03:58:29 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=84</guid>
		<description><![CDATA[RailsPlayground Mod_deflate Disabled on developer accounts, can check which mods are enabled with &#60;?php print_r(apache_get_modules()); ?&#62;]]></description>
			<content:encoded><![CDATA[<p>RailsPlayground Mod_deflate Disabled on developer accounts, can check which mods are enabled with</p>
<p><code>&lt;?php<br />
print_r(apache_get_modules());<br />
?&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/railsplayground-mod_deflate-disabled-on-developer-accounts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Playground Add rails app into subdomain</title>
		<link>http://www.peter-dillon.com/rails-playground-add-rails-app-into-subdomain/</link>
		<comments>http://www.peter-dillon.com/rails-playground-add-rails-app-into-subdomain/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 19:19:35 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=79</guid>
		<description><![CDATA[Create your subdomain using your cpanel. For instance &#8216;staging&#8217;. ssh into your account. cd into your www directory mv staging staging.back now link your public directory from your new rails app to &#8216;staging&#8217; ln -s /home/username/newapp/public /home/username/www/staging make sure file and folder permissions are set staging should be 777.]]></description>
			<content:encoded><![CDATA[<p>Create your subdomain using your cpanel. For instance &#8216;staging&#8217;.</p>
<p>ssh into your account.</p>
<p>cd into your www directory</p>
<pre><code>mv staging staging.back</code></pre>
<p>now link your public directory from your new rails app to &#8216;staging&#8217;</p>
<pre><code>ln -s /home/username/newapp/public /home/username/www/staging</code></pre>
<p>make sure file and folder permissions are set staging should be 777.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/rails-playground-add-rails-app-into-subdomain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Playground kill fcgi process</title>
		<link>http://www.peter-dillon.com/rails-playground-kill-fcgi-process/</link>
		<comments>http://www.peter-dillon.com/rails-playground-kill-fcgi-process/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 18:39:54 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=76</guid>
		<description><![CDATA[From ssh ( you&#8217;ll need to ask for this to be enabled. ) pkill -9 dispatch.fcgi Ignore the warning only your process will be killed.]]></description>
			<content:encoded><![CDATA[<p>From ssh ( you&#8217;ll need to ask for this to be enabled. )</p>
<pre><code>pkill -9 dispatch.fcgi</code></pre>
<p>Ignore the warning only your process will be killed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/rails-playground-kill-fcgi-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extract base64 encoded images from XML file</title>
		<link>http://www.peter-dillon.com/extract-base64-encoded-images-from-xml-file/</link>
		<comments>http://www.peter-dillon.com/extract-base64-encoded-images-from-xml-file/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 04:53:06 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Php]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/extract-base64-encoded-images-from-xml-file/</guid>
		<description><![CDATA[&#60;?php $this-&#62;xml = simplexml_load_file('images.xml'); foreach ($this-&#62;xml-&#62;Listing-&#62;Picture as $picture) { $filename = $this-&#62;cleanBrackets($picture-&#62;PictureID) . ".jpg"; //open file for writing $this-&#62;image_handle = fopen("xml/images/". $filename , "wb+") or die('error file write'); $data = base64_decode(trim($picture-&#62;BinaryData)); @fwrite($this-&#62;image_handle,$data); fclose($this-&#62;image_handle); } // end foreach ?&#62;]]></description>
			<content:encoded><![CDATA[<pre><code>&lt;?php
$this-&gt;xml = simplexml_load_file('images.xml');
 foreach ($this-&gt;xml-&gt;Listing-&gt;Picture as $picture) {
        $filename = $this-&gt;cleanBrackets($picture-&gt;PictureID) . ".jpg";
        //open file for writing
        $this-&gt;image_handle = fopen("xml/images/". $filename , "wb+") or die('error file write');
        $data = base64_decode(trim($picture-&gt;BinaryData));
        @fwrite($this-&gt;image_handle,$data);
        fclose($this-&gt;image_handle);
    } // end foreach
?&gt;
  </code> </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/extract-base64-encoded-images-from-xml-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add ftp port 21 to iptables</title>
		<link>http://www.peter-dillon.com/add-ftp-port-21-to-iptables/</link>
		<comments>http://www.peter-dillon.com/add-ftp-port-21-to-iptables/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 18:49:27 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=66</guid>
		<description><![CDATA[iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT]]></description>
			<content:encoded><![CDATA[<pre><code>iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/add-ftp-port-21-to-iptables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Eager Loading</title>
		<link>http://www.peter-dillon.com/rails-eager-loading/</link>
		<comments>http://www.peter-dillon.com/rails-eager-loading/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 16:55:48 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=58</guid>
		<description><![CDATA[Loading associated models together in far fewer queries using egar loading. Each User has one state, Has many Properties each property Has many images, has many pdfs, has one state &#62;&#62; u = User.find(120, :include =&#62; [:state,{:properties =&#62; [:images,:pdfs,:state]}])]]></description>
			<content:encoded><![CDATA[<p>Loading associated models together in far fewer queries using egar loading.</p>
<p>Each User has one state, Has many Properties each property Has many images, has many pdfs, has one state</p>
<pre><code>&gt;&gt; u = User.find(120, :include =&gt; [:state,{:properties =&gt; [:images,:pdfs,:state]}])</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/rails-eager-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2 Virtual Host Setup for Windows</title>
		<link>http://www.peter-dillon.com/apache-2-virtual-host-setup-for-windows/</link>
		<comments>http://www.peter-dillon.com/apache-2-virtual-host-setup-for-windows/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 16:55:59 +0000</pubDate>
		<dc:creator>peterdillon@gmail.com</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Virtual Host]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.peter-dillon.com/?p=47</guid>
		<description><![CDATA[Setting up Virtual Hosts with Apache 2.2 is a fairly painless process. First I created a webroot folder to contain all the local sites.For each project i created a folder personal.blog.localhost. Inside this folder create a www folder. Should look something like C:\webroot\personal.blog.localhost\www Then edit your hosts file, it can be found c:\windows\system32\drivers\etc\hosts add a [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up Virtual Hosts with Apache 2.2 is a fairly painless process.</p>
<p>First I created a webroot folder to contain all the local sites.For each project i created a folder personal.blog.localhost. Inside this folder create a www folder.</p>
<p>Should look something like</p>
<p>C:\webroot\personal.blog.localhost\www</p>
<p>Then edit your hosts file, it can be found c:\windows\system32\drivers\etc\hosts</p>
<p>add a line for each of your projects</p>
<pre>127.0.0.1 personal.blog.localhost
127.0.0.1 cakephp.localhost
127.0.0.1 codeigniter.localhost</pre>
<p>and save the file.</p>
<p>Next modify your httpd.conf file in your Apache conf folder uncomment the line by removing the #</p>
<pre>Include conf/extra/httpd-vhosts.conf</pre>
<p>and save the file.</p>
<p>Open up the httpd-vhost.conf file found in the extra&#8217;s folder</p>
<p>and add a VirtualHost entry for each of your local sites.</p>
<pre><code >&lt;VirtualHost *:80&gt;
 ServerName personal.blog.localhost
 DocumentRoot "c:/webroot/personal.blog.localhost/www"
 CustomLog logs/personal.blog.localhost.access.log combined
 ErrorLog logs/personal.blog.localhost.error.log
&lt;/VirutalHost&gt;</code></pre>
<p>Save the httpd-vhost.conf file, unzip your WordPress application into your www folder and restart Apache and browse http://personal.blog.localhost.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.peter-dillon.com/apache-2-virtual-host-setup-for-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

