<?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>robertomurray.co.uk</title>
	<atom:link href="http://robertomurray.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://robertomurray.co.uk/blog</link>
	<description>blogging, mapping and travelling from a network engineer in UK</description>
	<lastBuildDate>Tue, 15 May 2012 19:08:16 +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>How to choose a hosting provider</title>
		<link>http://robertomurray.co.uk/blog/2012/how-to-choose-a-hosting-provider/</link>
		<comments>http://robertomurray.co.uk/blog/2012/how-to-choose-a-hosting-provider/#comments</comments>
		<pubDate>Tue, 15 May 2012 18:31:35 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=618</guid>
		<description><![CDATA[Over the past few years I have had some experience of choosing hosting providers to run various websites and just thought I would share my advice for things to pick up on. This guide is talking about the smaller end of the scale; shared hosting, virtual private servers but I<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2012/how-to-choose-a-hosting-provider/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>Over the past few years I have had some experience of choosing hosting providers to run various websites and just thought I would share my advice for things to pick up on. This guide is talking about the smaller end of the scale; shared hosting, virtual private servers but I guess could be applied upwards too.</p>
<p><span style="text-decoration: underline;">The Good, The Bad and the Cheap</span></p>
<p>I have had endless problems with Cheap hosting providers, even if you just want to upload static pages I still don&#8217;t think it pays to go with the cheapest. Aside from the possibility of hidden costs somewhere I have found their systems are not reliable and if I care about the content I upload, I want it to have a reasonable uptime which is quite often nowhere close to acceptable from the cheaper options. I had countless problems with a shared hosting package from Dataflame; there would be constant problems with the server I was on &#8211; yes with this package you are at the mercy of others, if someone has some crap code or a poor SQL query then it can bring down the server &#8211; sometimes it would be down for a long time, rebooted during the day (UK time &#8211; it is a UK company). Had problems with the admin side of things, even when I didnt have a site hosted they still managed to remove some DNS entries for a website name I purchased through them.</p>
<p><span style="text-decoration: underline;">Things to look for</span></p>
<p>These are not the only things to identify a good service from a bad one but should help you make a decision, at the end of the day it should come down to your own requirements and opinion.</p>
<p>&nbsp;</p>
<ul>
<li>Member of a <a title="Regional_Internet_registry" href="http://en.wikipedia.org/wiki/Regional_Internet_registry" target="_blank">regional Internet registry (RIR)</a> and have their own <a title="Autonomous_system" href="http://en.wikipedia.org/wiki/Autonomous_system_%28Internet%29" target="_blank">Autonomous System (AS)</a> &#8211; this to me indicates that they operate their own &#8216;presence&#8217; on the internet, they can allocate their own IP addresses and take their networking seriously. Suggests they know what they are doing and are not just renting a server from someone else and then passing it on to you at an inflated cost.</li>
</ul>
<ul>
<li>Search their support forums and outage notifications &#8211; I like reading the outage notifications and if there are common themes or continuing problems or lots of &#8216;Sorry, human error&#8217; then probably best avoided. The support forums give an idea of the issues customers face from using this provider.</li>
</ul>
<ul>
<li>New technologies? &#8211; I like it when a provider has a service using a new technology or is trying something new. For example a provider that I have used is <a title="Bytemark.co.uk" href="http://www.bytemark.co.uk" target="_blank">Bytemark</a> and they have developed their own virtual machine platform to provide IaaS, called BigV which I guess is a cloud hosting solution, but designed and built themselves. Things like this to me say they know what their customers want, they know what they&#8217;re doing and are happy to build something themselves.</li>
</ul>
<p>&nbsp;</p>
<p>Of course there are other options, you dont always need a shared or dedicated server from a provider like this; there are plenty of &#8216;cloud&#8217; based IaaS and PaaS providers such as <a title="AWS" href="http://aws.amazon.com/" target="_blank">AWS</a> or <a title="http://www.heroku.com/" href="http://www.heroku.com/" target="_blank">Heroku</a>. Info about platforms like this needs another post or better explained somewhere else already.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2012/how-to-choose-a-hosting-provider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Island hopping in Thailand</title>
		<link>http://robertomurray.co.uk/blog/2012/island-hopping-in-thailand/</link>
		<comments>http://robertomurray.co.uk/blog/2012/island-hopping-in-thailand/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 12:02:31 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Thailand 2012]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=613</guid>
		<description><![CDATA[The last week or so has been fantastic, beautiful weather, pretty islands, relaxing beaches and great diving. It has been quite hectic to get around, everything involves boat journeys but has been worth it as I have been to the few islands planned. So hectic that have needed about 6<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2012/island-hopping-in-thailand/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>The last week or so has been fantastic, beautiful weather, pretty islands, relaxing beaches and great diving. It has been quite hectic to get around, everything involves boat journeys but has been worth it as I have been to the few islands planned.</p>
<p>So hectic that have needed about 6 days where I currently am; <a class="geotag" title="Koh Toa" href="http://my-tracks.co.uk/app?lat=10.006044&amp;lng=99.818344&amp;zoom=11&amp;mtype=Map&amp;info=Phuket" target="_blank">Koh Toa</a> &#8211; a great island in the gulf of Thailand, although is remote is very pretty and has some great diving.</p>
<p>The previous few days were spent on the island of <a class="geotag" title="Koh Phi Phi Don" href="http://my-tracks.co.uk/app?lat=7.721198&amp;lng=98.795242&amp;zoom=11&amp;mtype=Map&amp;info=Phuket" target="_blank">Koh Phi Phi Don</a> &#8211; in a group of islands made famous mostly by the scenery but also because of fiilms; amongst others, The Beach, James Bond &#8211; The Man with the Golden Gun, Good Morning Vietnam were filmed on these islands.</p>
<p>Unfortunately things have to come to an end and set off back to Bangkok on Thursday for a flight early on Friday morning so will be back Friday night GMT &#8211; very distressing to leave!</p>
<p>See all soon!!</p>
<p>PS. have uploaded more photos. Not many the www is very slow!</p>
<p>&nbsp;</p>
<div class="message-box">
<p>Check out my route <a title="View my Thailand travels" href="http://robertomurray.co.uk/travels/thailand">here</a> and <a class="photo-link" title="Link to my photo gallery from Thailand" href="http://robertomurray.co.uk/gallery/25-thailand">photos</a>.</p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2012/island-hopping-in-thailand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sawat dii** from Thailand</title>
		<link>http://robertomurray.co.uk/blog/2012/sawat-dii-from-thailand/</link>
		<comments>http://robertomurray.co.uk/blog/2012/sawat-dii-from-thailand/#comments</comments>
		<pubDate>Sat, 11 Feb 2012 09:37:12 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Thailand 2012]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=606</guid>
		<description><![CDATA[** Meaning &#8216;Hello&#8217; &#160; Unfortunately or fortunately from the Thais point of view that is as far as my Thai goes and luckily have not had to use it much. Thailand is, so far, very well covered for tourism and I am definately travelling along the tourist trail. This isnt<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2012/sawat-dii-from-thailand/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>** Meaning &#8216;Hello&#8217;</p>
<p>&nbsp;</p>
<p>Unfortunately or fortunately from the Thais point of view that is as far as my Thai goes and luckily have not had to use it much. Thailand is, so far, very well covered for tourism and I am definately travelling along the tourist trail. This isnt a bad thing as this is a great trail and has been fantastic so far.</p>
<p>&nbsp;</p>
<p>One week ago I set off from England to <a class="geotag" title="Bangkok" target="_blank" href="http://my-tracks.co.uk/app?lat=13.744054&amp;lng=100.524216&amp;zoom=12&amp;mtype=Map&amp;info=Bangkok">Bangkok</a> and have spent a few days around one of the busiest, congested, craziest cities around! The ground space in the commercial parts of Bangkok are so packed they are definately expanding upwards, there are even pavements 20 m up from ground level, right below the &#8216;Skytrain&#8217; the mid air train. Apart from aclimatising to the heat and humidity spent most of the time walking between temples or stuck in traffic wishing we were in a air-conditioned shopping mall.</p>
<p>&nbsp;</p>
<p>The rest of the time has been in and around a northern, much more relaxed town called <a title="Chain mai" class="geotag" href="http://my-tracks.co.uk/app?lat=18.788342&amp;lng=98.985958&amp;zoom=14&amp;mtype=Map&amp;info=Chaing%20mai" target="_blank">Chaing Mai</a>. This is in the north and much less humid and as have discovered during a trek through the jungle covered hills very cold at night! Have not only ridden an elephant up here but also been chased by one whilst on a raft down a river! Not the most eco-friendly holiday &#8211; riding an elephant that appears to be chained up most of the time and angering a free one.</p>
<p>I have had the customary travel/language barrier issues associated with this type of holiday but is very easy to travel around compared to previous years and there are also a lot of others doing similar things which makes it very interesting.</p>
<p>Right, have to go now; I am currently waiting for a plane to <a class="geotag" title="Phuket" href="http://my-tracks.co.uk/app?lat=7.965398&amp;lng=98.342743&amp;zoom=11&amp;mtype=Map&amp;info=Phuket" target="_blank">Phuket</a>&#8230; and a USB cable/ PC with SD card slot to upload some photos so be patient!</p>
<p>P.S. To all those that are looking after my house; hope it is ok!</p>
<p>&nbsp;</p>
<div class="message-box">
<p>Check out my route <a title="View my Thailand travels" href="http://robertomurray.co.uk/travels/thailand">here</a> and <a class="photo-link" title="Link to my photo gallery from Thailand" href="http://robertomurray.co.uk/gallery/25-thailand">photos</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2012/sawat-dii-from-thailand/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Off to Thailand</title>
		<link>http://robertomurray.co.uk/blog/2012/off-to-thailand/</link>
		<comments>http://robertomurray.co.uk/blog/2012/off-to-thailand/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 09:27:21 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Thailand 2012]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=601</guid>
		<description><![CDATA[In England we have been having quite a mild winter, up until the beginning of this week, 30 Janurary when the weather has got a lot colder, snow forcast; generally unpleasant! It just so happens that as the high temperature for today is only 2 degrees Celsius I am due<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2012/off-to-thailand/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>In England we have been having quite a mild winter, up until the beginning of this week, 30 Janurary when the weather has got a lot colder, snow forcast; generally unpleasant! It just so happens that as the high temperature for today is only 2 degrees Celsius I am due to depart for somewhere that only the beer is close to that temperature: <a class="geotag" title="Thailand" href="http://my-tracks.co.uk/app?lat=13.667338&amp;lng=100.766602&amp;zoom=6&amp;mtype=Terrain&amp;info=Sunshine">Thailand</a>.</p>
<p>&nbsp;</p>
<p>I have three weeks coming up of backpacking around a wonderfully inspiring country full of history and beauty, old temples to the most perfect islands and beaches. I&#8217;m hoping to see it all.</p>
<p>Keep an eye on my updates and photos from the links below.</p>
<p>&nbsp;</p>
<div class="message-box">
<p>Check out my route <a href="http://robertomurray.co.uk/travels/thailand" title="View my Thailand travels">here</a> and <a class="photo-link" href="http://robertomurray.co.uk/gallery/25-thailand" title="Link to my photo gallery from Thailand">photos</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2012/off-to-thailand/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add proxy arp on Checkpoint SPLAT</title>
		<link>http://robertomurray.co.uk/blog/2012/add-proxy-arp-on-checkpoint-splat/</link>
		<comments>http://robertomurray.co.uk/blog/2012/add-proxy-arp-on-checkpoint-splat/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 11:25:30 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Checkpoint]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=594</guid>
		<description><![CDATA[When doing client side NAT&#8217;ing on Checkpoint boxes and using manual NAT creations, IPSO is probably the most straight forward: Assume you have the NAT rule in the policy Go to Voyager; add a proxy arp entry But on SPLAT I found I had to do the following; Assume you<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2012/add-proxy-arp-on-checkpoint-splat/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>When doing client side NAT&#8217;ing on Checkpoint boxes and using manual NAT creations, IPSO is probably the most straight forward:</p>
<ol>
<li>Assume you have the NAT rule in the policy</li>
<li>Go to Voyager; add a proxy arp entry</li>
</ol>
<p>But on SPLAT I found I had to do the following;</p>
<ol>
<li>Assume you have the NAT rule in the policy</li>
<li>In Dashboard; Global Properties / NAT / Untick &#8216;Automatic ARP configuration&#8217; &#8211; install policy if necessary</li>
<li>SSH to device and enter expert mode</li>
<li>cd $FWDIR/conf ; vi local.arp</li>
<li>Add line in the format 123.123.123.123   AA:BB:CC:DD:EE:FF</li>
<li>Save file</li>
<li>It seems you have to reboot for the system for these changes to be applied</li>
</ol>
<p>Only now would the device respond to arp requests for that IP address &#8211; ie when creating manual NAT.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2012/add-proxy-arp-on-checkpoint-splat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrate Rails app and PHP on Apache</title>
		<link>http://robertomurray.co.uk/blog/2012/integrate-rails-app-and-php-on-apache/</link>
		<comments>http://robertomurray.co.uk/blog/2012/integrate-rails-app-and-php-on-apache/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 17:43:10 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[robertomurray.co.uk]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=581</guid>
		<description><![CDATA[Here is one method of how to integrate a Ruby on Rails application and a PHP application or even just static HTML using Apache webserver. One reason for doing this could be (in this website&#8217;s case) that your main website application is Rails but you want to use WordPress or<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2012/integrate-rails-app-and-php-on-apache/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>Here is one method of how to integrate a Ruby on Rails application and a PHP application or even just static HTML using Apache webserver. One reason for doing this could be (in this website&#8217;s case) that your main website application is Rails but you want to use WordPress or another technology of blog or CMS &#8216;within&#8217; that site.</p>
<p>This method is assuming you are using Apache and Passenger as your webserver, Passenger is only referenced when you need to stop rails handling that url later.</p>
<p>For example;</p>
<pre class="brush:text">example.com/ &lt;-- rails app
example.com/blog &lt;-- wordpress blog</pre>
<p>&nbsp;</p>
<p>To do this;</p>
<p>Create 2 directories, one for the rails app and one for the PHP/other app &#8211; this is not strictly necessary but nice to keep things separate. If not using this method then ignore this and the symlink!</p>
<p>&nbsp;</p>
<pre class="brush:text">/www/path/to/rails_app/public
/www/path/to/my_blog</pre>
<p>&nbsp;</p>
<p>Now go into the rails_app/public directory and create a symbolic link to the other directory.</p>
<p>&nbsp;</p>
<pre class="brush:bash">ln -s /www/path/to/my_blog /www/path/to/rails_app/public/blog

ls -la /www/path/to/rails_app/public
blog -&gt; /path/to/my_blog</pre>
<p>&nbsp;</p>
<p>Now edit your httpd.conf, .htaccess &#8211; whichever file apache is using for your rails app and add the following and restart httpd:</p>
<p>&nbsp;</p>
<pre class="brush:bash">&lt;Location /blog&gt;
PassengerEnabled off
&lt;/Location&gt;</pre>
<p>Now whenever a request for the example.com/blog comes in, passenger does not send to rails, instead looks in the public/blog dir which is actually a sym link to the real dir.</p>
<p>If you are using Capistrano then you can add something like this to your deployment script to automatically create the symlink each deployment.</p>
<p>&nbsp;</p>
<pre class="brush:ruby">set :wp_dir, "/path/to/my_blog"

task :buildlinks, :roles =&gt; :app do
  run "ln -s #{wp_dir}  #{current_path}/public/blog"
end</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2012/integrate-rails-app-and-php-on-apache/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails: Dynamic page titles</title>
		<link>http://robertomurray.co.uk/blog/2011/rails-dynamic-page-titles/</link>
		<comments>http://robertomurray.co.uk/blog/2011/rails-dynamic-page-titles/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 20:15:44 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=558</guid>
		<description><![CDATA[Here is how I have been creating dynamic page titles, page descriptions, etc (anything you want really) using Rails. &#160; In app_root/app/helpers/application_helper.rb create the following method # Format and return a title on a per-page basis def display_title base_title = "mysite.com" if @title.nil? base_title else "#{@title} - #{base_title}" end end<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2011/rails-dynamic-page-titles/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>Here is how I have been creating dynamic page titles, page descriptions, etc (anything you want really) using Rails.</p>
<p>&nbsp;</p>
<p>In app_root/app/helpers/application_helper.rb create the following method</p>
<pre class="brush:ruby">  # Format and return a title on a per-page basis
  def display_title
    base_title = "mysite.com"
    if @title.nil?
      base_title
    else
      "#{@title} - #{base_title}"
    end
  end</pre>
<p>&nbsp;</p>
<p>Then in the action in your controller, eg app_root/app/controllers/my_page_controller.rb</p>
<pre class="brush:ruby">  def index
    @title = "additional text to title here"

    respond_to do |format|
      format.html  # index.html.erb
    end

  end</pre>
<p>&nbsp;</p>
<p>Then, finally in app_root/app/views/layouts/application.html.erb add the following where appropriate</p>
<pre class="brush:ruby">...
 &lt;title&gt;&lt;%= display_title %&gt;&lt;/title&gt;
...</pre>
<p>&nbsp;</p>
<p>The helper method is called on page view and returns a title. This can be replicated for other layout content that needs to be dynamic.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2011/rails-dynamic-page-titles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Website upgrade 2011</title>
		<link>http://robertomurray.co.uk/blog/2011/website-upgrade-2011/</link>
		<comments>http://robertomurray.co.uk/blog/2011/website-upgrade-2011/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 17:37:17 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[robertomurray.co.uk]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=547</guid>
		<description><![CDATA[&#60; 17 December 2011: This website, robertomurray.co.uk was PHP and running (slowly) on a shared hosting server. &#62; 17 December 2011 The website is now on a new server and the site is mainly Ruby on Rails Switchover OK, here there are two major changes; 1) Migrating to new server<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2011/website-upgrade-2011/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>&lt; 17 December 2011:</p>
<p>This website, robertomurray.co.uk was PHP and running (slowly) on a shared hosting server.</p>
<p>&gt; 17 December 2011</p>
<p>The website is now on a new server and the site is mainly <a title="ruby on rails" href="http://rubyonrails.org/" target="_blank">Ruby on Rails</a></p>
<h6>Switchover</h6>
<p>OK, here there are two major changes; 1) Migrating to new server and 2) re-written using Rails, which actually forced change #1. The previous hosting company was not very good, or rather the product and service I was getting was not very good and the final problem was not able to host rails apps properly so this forced me to migrate to a new server on which I could install whatever I wanted.</p>
<p>The reason for actually using Rails was because changes to dynamic pages &#8211; by dynamic I mean server processing and returning data, eg database interaction or just plain old php code &#8211; took so long to re-write, create, test, etc because they were mostly custom written, varied dependencies and sometimes overly complex. This meant that development was slow and awkward &#8211; not what web development is about.</p>
<p>The goal was fast, easy development, idea to deploy time as short as possible; one method to achieve this was using an <a title="MVC framework description" href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller" target="_blank">MVC framework</a> and so I tried various PHP frameworks such as <a title="Symfony" href="http://www.symfony-project.org/" target="_blank">Symfony</a>, <a title="codeigniter" href="http://codeigniter.com/" target="_blank">codeigniter</a> but these did not meet the criteria I wanted. And then I got hooked on Ruby on Rails.</p>
<p>With Rails, I found the language, the style of programming and the design fantastic; simple concise and functional.</p>
<p>&nbsp;</p>
<pre class="brush:ruby">    @travels = Travels.all(:order =&gt; "id DESC")

    respond_to do |format|
      format.html # index.html.erb
      format.json  { render :json =&gt; @travels }
    end</pre>
<p>&nbsp;</p>
<p>The framework fits exactly with agile development methodology, with the addition of some extra tools such as <a title="Capistrano" href="https://github.com/capistrano/capistrano/wiki/Documentation-v2.x" target="_blank">Capistrano</a> I can so easily add/change features, test and deploy in minutes. The site currently is 50% of what I want but I can run the site as it is now and add the extra features incrementally without a problem, each push adding functionality.</p>
<p>I have had to solve a few problems along the way such as;</p>
<ul>
<li>WordPress blog integration : my rails app is at / and the blog at /blog/ &#8211; <a title="Integrate Rails app and PHP on Apache" href="http://robertomurray.co.uk/blog/2012/integrate-rails-app-and-php-on-apache/">how to integrate rails and php</a></li>
<li>ActiveAdmin CSS problem : <a title="Rails: fix ActiveAdmin CSS over-riding problem" href="http://robertomurray.co.uk/blog/2011/rails-fix-activeadmin-css-over-riding-problem/">how to fix</a></li>
<li>Dynamic page meta tags with Rails : A post on <a title="Rails: Dynamic page titles" href="http://robertomurray.co.uk/blog/2011/rails-dynamic-page-titles/">how to do this</a></li>
</ul>
<p>&nbsp;</p>
<p>Hopefully this will make adding new features quicker and easier, not only to this site but for other projects too. Enjoy and check again soon!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2011/website-upgrade-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>30 days of gyming</title>
		<link>http://robertomurray.co.uk/blog/2011/30-days-of-gyming/</link>
		<comments>http://robertomurray.co.uk/blog/2011/30-days-of-gyming/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 14:46:38 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Fitness]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=470</guid>
		<description><![CDATA[Recently a relative bought a new Audi and I was treated to a 30 day guest membership at my local David Lloyd gym. In these 30 days I managed to go 26 times, an average of 6 times per week. Not bad going considering everything else going on; work, rest<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2011/30-days-of-gyming/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>Recently a relative bought a new Audi and I was treated to a 30 day guest membership at my local David Lloyd gym. In these 30 days I managed to go 26 times, an average of 6 times per week. Not bad going considering everything else going on; work, rest and play.</p>
<p>It is a very nice gym, David Lloyd, Southampton; large gym, pool and racquet facilities. I tended to alternate each day such as weights one day, then CV equipment and then swimming. I also juggled playing football around this too.</p>
<p>Do I feel better? I am shattered, some muscles ache, some twitch every now and again and some just dont work but I think that is called fitness.</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2011/30-days-of-gyming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Postgresql: find next available IP addresses</title>
		<link>http://robertomurray.co.uk/blog/2011/postgresql-find-next-available-ip-addresses/</link>
		<comments>http://robertomurray.co.uk/blog/2011/postgresql-find-next-available-ip-addresses/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 09:54:27 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[Postgresql]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://robertomurray.co.uk/blog/?p=409</guid>
		<description><![CDATA[Postgresql has the inet and cidr datatypes and some great functions for these types, very useful for storing and manipulating data for IP addresses and networks. As a basic example, say you were storing hostnames and IP addresses, basic example table below: id ip_address hostname 1 10.10.100.15 server01 If I<span class="read-more more-excerpt">... <a href="http://robertomurray.co.uk/blog/2011/postgresql-find-next-available-ip-addresses/">[...]</a></span>]]></description>
			<content:encoded><![CDATA[<p>Postgresql has the inet and cidr datatypes and some great functions for these types, very useful for storing and manipulating data for IP addresses and networks.</p>
<p>As a basic example, say you were storing hostnames and IP addresses, basic example table below:</p>
<table width="200px" cellpadding="4">
<tbody>
<tr style="border-bottom: 1px solid black;">
<td style="border-right: 1px solid black;">id</td>
<td style="border-right: 1px solid black;">ip_address</td>
<td>hostname</td>
</tr>
<tr>
<td style="border-right: 1px solid black;">1</td>
<td style="border-right: 1px solid black;">10.10.100.15</td>
<td>server01</td>
</tr>
</tbody>
</table>
<p>If I wanted to add a new host then I would want to give it a unique IP address so I would have to find the next available IP address (defined as NOT already in this table) in order to allocate. Below is a query that generates a series of inets for the network passed and then looks to see if they are already in the table. An optional extra on the end is not selecting the first 10 or the last 5 IP address of a subnet &#8211; if you want to reserve these.</p>
<p>&nbsp;</p>
<p>Just substitue the subnet and ip_table tablename;</p>
<p>&nbsp;</p>
<pre class="brush: sql;"> 
SELECT sub.ip FROM
(SELECT set_masklen(((generate_series(1,
(2 ^ (32 - masklen('10.10.100.0/24'::cidr)))::integer - 2) +
'10.10.100.0/24'::cidr)::inet), 32) as ip) AS sub
WHERE sub.ip NOT IN
(SELECT ip_address from ip_table)
AND sub.ip &gt; set_masklen('10.10.100.0/24', 32)+10
AND sub.ip &lt; set_masklen(broadcast('10.10.100.0/24')::inet, 32)-5;</pre>
<p>&nbsp;</p>
<p>Here is the create function script to create a function to call for the above query.</p>
<p>&nbsp;</p>
<pre class="brush: sql;"> CREATE FUNCTION nextips_for(cidr) RETURNS SETOF inet AS
$$
SELECT sub.ip FROM (SELECT set_masklen(((generate_series(1, (2 ^ (32 -
masklen($1::cidr)))::integer - 2) +
$1::cidr)::inet), 32) as ip) AS sub
WHERE sub.ip NOT IN
(SELECT ip_address from ip_table)
AND sub.ip &gt; set_masklen($1, 32)+10
AND sub.ip &lt; set_masklen(broadcast($1)::inet, 32)-5;
$$ LANGUAGE SQL STABLE STRICT;</pre>
<p>&nbsp;</p>
<p>Again, just substitue the ip_table tablename for what you&#8217;re using;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://robertomurray.co.uk/blog/2011/postgresql-find-next-available-ip-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

