<?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>Pass By Value</title>
	<atom:link href="http://passbyvalue.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://passbyvalue.com</link>
	<description>... or is it pass by reference?</description>
	<lastBuildDate>Sun, 15 Aug 2010 12:48:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Passenger (mod_rails) updates</title>
		<link>http://passbyvalue.com/2010/08/passenger-mod_rails-updates/</link>
		<comments>http://passbyvalue.com/2010/08/passenger-mod_rails-updates/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 12:48:46 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=182</guid>
		<description><![CDATA[When updating Passenger:

sudo gem update passenger
passenger-install-apache2-module

The second command is important as it compiles the apache 2 module (caught me out for a whiles, hence this post).  Ensure that the module is properly added to your config file. (e.g. /etc/apache2/apache2.conf) by confirming its pointing to the new directory for the updated version of the gem! [...]]]></description>
			<content:encoded><![CDATA[<p>When updating <a href="http://www.modrails.com/">Passenger</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem update passenger
passenger-install-apache2-module</pre></div></div>

<p>The second command is important as it compiles the apache 2 module (caught me out for a whiles, hence this post).  Ensure that the module is properly added to your config file. (e.g. <code>/etc/apache2/apache2.conf</code>) by confirming its pointing to the new directory for the updated version of the gem!  An example is given in the blurb one the apache2 module is compiled:</p>
<pre>
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15
PassengerRuby /usr/bin/ruby1.8
</pre>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2010/08/passenger-mod_rails-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version controlling WordPress themes on simple hosts</title>
		<link>http://passbyvalue.com/2010/07/version-controlling-wordpress-themes-on-simple-hosts/</link>
		<comments>http://passbyvalue.com/2010/07/version-controlling-wordpress-themes-on-simple-hosts/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 12:12:07 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=177</guid>
		<description><![CDATA[Here&#8217;s a quick tip if your WordPress host is quite simple and only provides FTP access and no version control tools (svn, git) or specific syncing tools (rsync)
Use version control for the theme on your local machine (where you run your dev WordPress environment), then use syncing capability of FTP tool (Cyberduck for MacOSX has [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick tip if your WordPress host is quite simple and only provides FTP access and no version control tools (svn, git) or specific syncing tools (rsync)</p>
<p>Use version control for the theme on your local machine (where you run your dev WordPress environment), then use syncing capability of FTP tool (<a href="http://cyberduck.ch/">Cyberduck</a> for MacOSX has this feature) to promote the changes to your host.</p>
<p>Remember, version control is the only way to sensibly manage changes to your theme &#8211; editing through the WordPress theme editor on your host is a really bad way to manage it!</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2010/07/version-controlling-wordpress-themes-on-simple-hosts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s the people, stupid!</title>
		<link>http://passbyvalue.com/2010/05/its-the-people-stupid/</link>
		<comments>http://passbyvalue.com/2010/05/its-the-people-stupid/#comments</comments>
		<pubDate>Tue, 11 May 2010 12:17:58 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Project management]]></category>
		<category><![CDATA[Software development]]></category>
		<category><![CDATA[agile]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=164</guid>
		<description><![CDATA[Bill Clinton summed it up beautifully when he used the line, &#8220;It&#8217;s the economy, stupid.&#8221;
It has just become frustratingly obvious to me of late that when it comes to organisations maximising their investment in technology, a lot of their energy is misguided.  In the spirit of Bill:
It&#8217;s the people, stupid!
Focus on the people first [...]]]></description>
			<content:encoded><![CDATA[<p>Bill Clinton summed it up beautifully when he used the line, &#8220;<a href="http://en.wikipedia.org/wiki/It's_the_economy,_stupid">It&#8217;s the economy, stupid</a>.&#8221;</p>
<p>It has just become frustratingly obvious to me of late that when it comes to organisations maximising their investment in technology, a lot of their energy is misguided.  In the spirit of Bill:</p>
<p><em>It&#8217;s the people, stupid!</em></p>
<p>Focus on the people first and foremost and everything else will stem from that.  However, when I say focus on the people, I don&#8217;t mean make hierarchical command and control structures where everyone clearly has a place and protocol rules over productivity.   Rather the approach of flat structures where the emphasis is on self-organising teams, getting things done and self-improvement.</p>
<p>Of course, I&#8217;m not the first person to think of this, the whole <a href="http://agilemanifesto.org/">Agile</a> movement is driven on this organisational approach.</p>
<p>Organisations seem to believe that the way to solve problems is based on preferencing technology first, then process, then lastly the people will fall into line.  And big technology product vendors go a long way to supporting this type of thinking.  Many times they&#8217;ll pitch to executives with how they can make their technical people work smarter by using their products and tools.  But this often results in forcing technology upon talented technical people which will always be met with resistance and frustration.  The products may make the execs feel better in the short term but will usually demoralise the people and make them feel powerless.</p>
<p>Reverse this approach around; focus on the people first, and STOP!  Empowering people by encouraging them to collaborate and self organise has proven to raise engagement they have with the organisation.  It starts to build up one of the most valuable assets that a organisation could hope for, social contracts.  People will start to work out what are the most appropriate ways that they can work together.  They&#8217;ll remove bottlenecks that stop them from getting things done.  They&#8217;ll work out what technologies are best for the problem at hand.</p>
<p>People will be as stupid as you force them to be and as creative as you&#8217;ll let them be.  </p>
<p> So why the rant?  Well, its time for me to put my money where my mouth is.  I&#8217;ve banged on long enough about the benefits of adopting a more Agile approach to maximising an organisation&#8217;s investment in technology.  At Agile&#8217;s core is focusing on empowering people.   The outcome should lead to what organisations really want &#8211; true and sustainable competitive advantage!  </p>
<p>As of tomorrow, I&#8217;m going to step away from my technical career path and move into a more people focused direction.  Time for me to really prove what I believe in, not just for myself but for the people that I work with.  I want the win-win situation, the organisation wins and the people win!  Here goes&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2010/05/its-the-people-stupid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Git repositories with Slicehost</title>
		<link>http://passbyvalue.com/2009/12/git-repositories-with-slicehost/</link>
		<comments>http://passbyvalue.com/2009/12/git-repositories-with-slicehost/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 11:31:09 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[slicehost]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=157</guid>
		<description><![CDATA[No doubt I am really happy with my Slicehost VPS, it has been so hassle free!  The best part about Slicehost is all the amazing articles they provide to help you get going with your slice.
I&#8217;ve setup my slice to host my private git repositories, particularly since I wanted to use them with Rails and [...]]]></description>
			<content:encoded><![CDATA[<p>No doubt I am really happy with my <a href="http://www.slicehost.com">Slicehost</a> VPS, it has been so hassle free!  The best part about Slicehost is all the amazing articles they provide to help you get going with your slice.</p>
<p>I&#8217;ve setup my slice to host my private git repositories, particularly since I wanted to use them with Rails and Capistrano.  This article provide to be just what I needed:</p>
<p><a href="http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git">http://articles.slicehost.com/2009/5/13/capistrano-series-setting-up-git</a></p>
<p>The article even shows you how to secure the shell that the git user has to avoid anyone SSHing into your box with their ID.  However, it doesn&#8217;t tell you what to do when you want to create another repository as you cannot switch to the git user while ever it is using the git-shell as opposed to a normal shell.  The trick is you need to switch with the root user as only they are allowed to provide an alternative shell.  Here are the commands once you have logged into your slice with a user that is able to sudo:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ sudo su --shell /bin/bash git
$ cd /home/git
$ mkdir project2
$ cd project2
$ git --bare init
$ exit</pre></div></div>

<p>Now your repository is good to go and you can follow the steps from &#8220;Making your first commit&#8221; section.</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/12/git-repositories-with-slicehost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing MySQL, Apache2, PHP, and WordPress with MacPorts</title>
		<link>http://passbyvalue.com/2009/11/installing-mysql-apache2-php-and-wordpress-with-macports/</link>
		<comments>http://passbyvalue.com/2009/11/installing-mysql-apache2-php-and-wordpress-with-macports/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 11:14:41 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[macport]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=113</guid>
		<description><![CDATA[I&#8217;ve recently started working on a website project using WordPress.  I&#8217;ve got a production environment where I run this blog on my ubuntu server (VPS) hosted by slicehost.  But because I&#8217;m going to muck around with themes and plugins I decided that I&#8217;m better off doing that locally on my Mac.  So this is the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently started working on a website project using WordPress.  I&#8217;ve got a production environment where I run this blog on my ubuntu server (VPS) hosted by<a href="http://www.slicehost.com"> slicehost</a>.  But because I&#8217;m going to muck around with themes and plugins I decided that I&#8217;m better off doing that locally on my Mac.  So this is the first of a series of blog posts for getting WordPress up and running on my local machine.</p>
<p>I have <a href="http://www.macports.org/">macports</a> already installed and I prefer its packages over the packages shipped with OSX.  Mostly because they are more up to date and there is more variety.  Plus it feels more native to working with my VPS.  Before we get started, lets ensure that our MacPorts is up to date:</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo port selfupdate
---&gt;  Updating the ports tree
---&gt;  Updating MacPorts base sources using rsync
MacPorts base version 1.8.1 installed,
MacPorts base version 1.8.1 downloaded.
---&gt;  MacPorts base is already the latest version</pre></div></div>

<p>There will be four parts to this series:</p>
<ol>
<li>Installing MySQL</li>
<li>Installing Apache2</li>
<li>Installing PHP along with MySQL support</li>
<li>Installing WordPress</li>
</ol>
<p>I like to chunk these up rather than merge them all into one article as the temptation is to mix information together and then its harder to see where one step stops and the next one starts.  Also it means that you can look at the entries in isolation and they should still make sense.</p>
<h2>Installing MySQL</h2>
<p>I had a binary distribution of MySQL on machine which I needed to remove before installing the macports distro, this thread was useful as it isn&#8217;t particularly clear what to do:</p>
<p><a href="http://forums.mysql.com/read.php?11,75256,255851#msg-255851">http://forums.mysql.com/read.php?11,75256,255851#msg-255851</a></p>
<p>The following article was my main source of inspiration, I&#8217;ve pretty much followed these steps:</p>
<p><a href="http://2tbsp.com/content/install_and_configure_mysql_5_macports">http://2tbsp.com/content/install_and_configure_mysql_5_macports</a></p>
<p>Install the port and setup the mysql system database</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo port install mysql5-server
$ sudo -u mysql mysql_install_db5</pre></div></div>

<p>Setup some handy aliases in your shell</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ mate ~/.profile</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mysqlstart</span>=<span style="color: #ff0000;">'sudo /opt/local/bin/mysqld_safe5 &amp;'</span>
<span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">mysqlstop</span>=<span style="color: #ff0000;">'/opt/local/bin/mysqladmin5 -u root -p shutdown'</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ source ~/.profile</pre></div></div>

<p>Start the server and set the root password</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ mysqlstart
$ /opt/local/lib/mysql5/bin/mysqladmin -u root password 'root'
$ /opt/local/lib/mysql5/bin/mysqladmin -u root -p -h localhost password 'root'</pre></div></div>

<p>(Not sure what this second step is for!)</p>
<p>Now we can use the <code>mysqlstop</code> alias because the password has been set.</p>
<p>And we&#8217;re all done!</p>
<h2>Installing Apache2</h2>
<p>Source of inspiration for this entry is from here:</p>
<p><a href="http://2tbsp.com/content/install_apache_2_and_php_5_macports">http://2tbsp.com/content/install_apache_2_and_php_5_macports</a></p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo port install apache2</pre></div></div>

<p>Enabled virtual hosts in main config</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo mate /opt/loca/apache2/conf/httpd.conf</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Virtual hosts</span>
Include conf<span style="color: #000000; font-weight: bold;">/</span>extra<span style="color: #000000; font-weight: bold;">/</span>httpd-vhosts.conf</pre></div></div>

<p>Updated virtual hosts config</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo mate /opt/local/apache2/conf/extra/httpd-vhosts.conf</pre></div></div>

<p>The directory part is important as Apache 2.2 directories are by default not browsable so ensure that you enable them!</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
    ServerAdmin webmaster@myapp.local
    DocumentRoot &quot;/Users/tgmcclen/workspace/myapp/htdocs/site&quot;
    ServerName myapp.local
    ServerAlias www.myapp.local
    ErrorLog &quot;/Users/tgmcclen/workspace/myapp/logs/error_log&quot;
    CustomLog &quot;/Users/tgmcclen/workspace/myapp/logs/access_log&quot; common
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> <span style="color: #ff0000;">&quot;/Users/tgmcclen/workspace/myapp/htdocs/site&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>    
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Setup an alias for controlling apache and start</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ mate ~/.profile</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> <span style="color: #007800;">apache2ctl</span>=<span style="color: #ff0000;">'sudo /opt/local/apache2/bin/apachectl'</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ source ~/.profile
$ apache2ctl start</pre></div></div>

<p>Add an entry in the hosts file for the virtual host</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ mate /etc/hosts</pre></div></div>

<pre>127.0.0.1 myapp.local</pre>
<p>Now place files in the <code>htdocs</code> directory and browse to them in a browser:</p>
<p>http://myapp.local/hello.html</p>
<h2>Installing PHP along with MySQL support</h2>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo port install php5 +apache2 +pear
...
Note: php5 installs files outside the common directory structure.
---&gt;  Installing php5 @5.3.0_3+apache2+darwin_10+macosx+mysql5+pear+sqlite
---&gt;  Activating php5 @5.3.0_3+apache2+darwin_10+macosx+mysql5+pear+sqlite
To customize php, copy
/opt/local/etc/php5/php.ini-development (if this is a development server) or
/opt/local/etc/php5/php.ini-production (if this is a production server) to
/opt/local/etc/php5/php.ini and then make changes.
$ sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini</pre></div></div>

<p>Now enable PHP module with apache2</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ cd /opt/local/apache2/modules
$ sudo /opt/local/apache2/bin/apxs -a -e -n &quot;php5&quot; libphp5.so</pre></div></div>

<p>and add directives for <code>mime_module</code> and <code>dir_module</code> in the virtual host entry:</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;VirtualHost</span> *:80<span style="color: #000000; font-weight: bold;">&gt;</span></span>
    ServerAdmin webmaster@myapp.local
    DocumentRoot &quot;/Users/tgmcclen/workspace/myapp/htdocs&quot;
    ServerName myapp.local
    ServerAlias www.myapp.local
    ErrorLog &quot;/Users/tgmcclen/workspace/myapp/logs/error_log&quot;
    CustomLog &quot;/Users/tgmcclen/workspace/myapp/logs/access_log&quot; common
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Directory</span> <span style="color: #ff0000;">&quot;/Users/tgmcclen/workspace/myapp/htdocs&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Directory<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IfModule</span> mime_module<span style="color: #000000; font-weight: bold;">&gt;</span></span>
      AddType application/x-httpd-php .php
      AddType application/x-httpd-php-source .phps
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;IfModule</span> dir_module<span style="color: #000000; font-weight: bold;">&gt;</span></span>
        DirectoryIndex index.html index.php
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/IfModule<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/VirtualHost<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>And then restart Apache to get going&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ apache2ctl restart</pre></div></div>

<p><strong>Installing MySQL support for PHP</strong></p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo port install php5-mysql
---&gt;  Computing dependencies for php5-mysql
---&gt;  Fetching php5-mysql
---&gt;  Verifying checksum(s) for php5-mysql
---&gt;  Extracting php5-mysql
---&gt;  Configuring php5-mysql
---&gt;  Building php5-mysql
---&gt;  Staging php5-mysql into destroot
---&gt;  Installing php5-mysql @5.3.0_0+mysqlnd
To use mysqlnd with a local MySQL server, edit /opt/local/etc/php5/php.ini and set
mysql.default_socket, mysqli.default_socket and pdo_mysql.default_socket
to /opt/local/var/run/mysql5/mysqld.sock
---&gt;  Activating php5-mysql @5.3.0_0+mysqlnd
---&gt;  Cleaning php5-mysql
$ sudo mate /opt/local/etc/php5/php.ini</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">; Default socket name for local MySQL connects.  If empty, uses the built-in</span>
<span style="color: #666666; font-style: italic;">; MySQL defaults.</span>
<span style="color: #666666; font-style: italic;">; http://php.net/pdo_mysql.default-socket</span>
pdo_mysql.default_socket<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">/opt/local/var/run/mysql5/mysqld.sock</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Default socket name for local MySQL connects.  If empty, uses the built-in</span>
<span style="color: #666666; font-style: italic;">; MySQL defaults.</span>
<span style="color: #666666; font-style: italic;">; http://php.net/mysql.default-socket</span>
mysql.default_socket <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /opt/local/var/run/mysql5/mysqld.sock</span>
&nbsp;
<span style="color: #666666; font-style: italic;">; Default socket name for local MySQL connects.  If empty, uses the built-in</span>
<span style="color: #666666; font-style: italic;">; MySQL defaults.</span>
<span style="color: #666666; font-style: italic;">; http://php.net/mysqli.default-socket</span>
mysqli.default_socket <span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;"> /opt/local/var/run/mysql5/mysqld.sock</span></pre></div></div>

<h2>Installing WordPress</h2>
<p>Inspiration for instructions from here:</p>
<p><a href="http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion">http://codex.wordpress.org/Installing/Updating_WordPress_with_Subversion</a><br />
<a href="http://codex.wordpress.org/Installing_WordPress">http://codex.wordpress.org/Installing_WordPress</a></p>
<p>Inside your <code>htdocs</code> directory:</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ svn co http://core.svn.wordpress.org/tags/2.8.6 .</pre></div></div>

<p>(Latest tag will in URL on page, otherwise just browse to tags dir in folder to determine)</p>
<p>Create the database in MySQL</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ /opt/local/bin/mysql5 -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.40 Source distribution
&nbsp;
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
&nbsp;
mysql&amp;gt; CREATE DATABASE mydb;
Query OK, 1 row affected (0.05 sec)
&nbsp;
mysql&amp;gt; GRANT ALL PRIVILEGES ON myname.* TO &quot;mydb&quot;@&quot;localhost&quot; IDENTIFIED BY &quot;mypassword&quot;;
Query OK, 0 rows affected (0.58 sec)
&nbsp;
mysql&amp;gt; FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
&nbsp;
mysql&amp;gt; EXIT
Bye</pre></div></div>

<p>Now setup configuration</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ cp wp-config-sample.php wp-config.php</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'mydb');
&nbsp;
/** MySQL database username */
define('DB_USER', 'myname');
&nbsp;
/** MySQL database password */
define('DB_PASSWORD', 'mypassword');
&nbsp;
/** MySQL hostname */
define('DB_HOST', 'localhost');
&nbsp;
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
&nbsp;
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');</pre></div></div>

<p>Open a browser and continue the install:</p>
<p>http://myapp.local/wp-admin/install.php</p>
<p>You&#8217;ll most likely notice that you&#8217;re getting lots of errors and warnings on the pages, these can be turned off:</p>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ sudo mate /opt/local/etc/php5/php.ini</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">$ apache2ctl restart</pre></div></div>

<p>Now you&#8217;re good to WordPress away!</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/11/installing-mysql-apache2-php-and-wordpress-with-macports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making your Rails app work on Java</title>
		<link>http://passbyvalue.com/2009/09/making-your-rails-app-work-on-java/</link>
		<comments>http://passbyvalue.com/2009/09/making-your-rails-app-work-on-java/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 12:07:12 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://passbyvalue.com/?p=99</guid>
		<description><![CDATA[So you&#8217;ve written a Rails app and you want to show it off to your boss at work because you know that it will impress them.  Problem is that your company only uses Java and won&#8217;t consider it for their production environment if it can&#8217;t be deployed under a JVM.  Let&#8217;s go:

Install JRuby [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve written a Rails app and you want to show it off to your boss at work because you know that it will impress them.  Problem is that your company only uses Java and won&#8217;t consider it for their production environment if it can&#8217;t be deployed under a JVM.  Let&#8217;s go:</p>
<ol>
<li>Install JRuby <a href="http://jruby.org">http://jruby.org</a></li>
<li>Install the required gems for Ruby on Rails to work with JRuby</li>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">jgem install mongrel activerecord-jdbcsqlite3-adapter rails</pre></div></div>

<li>Install the gems particular to your application</li>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">jruby -S rake gems:install</pre></div></div>

<li>Update your <code>database.xml</code> file, prefixing your adapter with <strong>jdbc</strong></li>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">development:
  adapter: jdbcsqlite3
  database: db<span style="color:#006600; font-weight:bold;">/</span>development.<span style="color:#9900CC;">sqlite3</span>
  pool: <span style="color:#006666;">5</span>
  timeout: <span style="color:#006666;">5000</span></pre></div></div>

<li>Start your JVM</li>

<div class="wp_syntax"><div class="code"><pre class="script" style="font-family:monospace;">jruby script/server</pre></div></div>

<li>Demonstrate</li>
<li>Sit back and wait for promotion</li>
</ol>
<p>Some notes on whats going on above:</p>
<ul>
<li>Detailed installation instructions for JRuby can be found on their wiki: <a href="http://kenai.com/projects/jruby/pages/GettingStarted">http://kenai.com/projects/jruby/pages/GettingStarted</a></li>
<li>The <code>jruby -S rake</code> command is very important as the <code>-S</code> switch ensures that the <code>rake</code> command is sourced from the JRuby home, not the system path which would contain a native Ruby install</li>
<li>ActiveRecord-JDBC can handle most any database you can think of in a corporate environment.  Check it out here: <a href="http://kenai.com/projects/activerecord-jdbc/">http://kenai.com/projects/activerecord-jdbc/</a></li>
<li>If you wish to use another database, there are some gems already pre-packaged, more details on the github page: <a href="http://github.com/nicksieger/activerecord-jdbc-adapter">http://github.com/nicksieger/activerecord-jdbc-adapter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/09/making-your-rails-app-work-on-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Oracle XE to work with SpringFramework JDBC Template</title>
		<link>http://passbyvalue.com/2009/07/getting-oracle-xe-to-work-with-springframework-jdbc-template/</link>
		<comments>http://passbyvalue.com/2009/07/getting-oracle-xe-to-work-with-springframework-jdbc-template/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 00:03:48 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[springframework]]></category>

		<guid isPermaLink="false">http://blog.passbyvalue.com/?p=23</guid>
		<description><![CDATA[Ever get this error when using Oracle XE with SpringFramework JDBC Template?
SORA-12519, TNS:no appropriate service handler found
You can get around it by executing the following commands:

ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;
ALTER SYSTEM SET SESSIONS=100 SCOPE=SPFILE;

Then stop and start database (Oracle XE service) and you&#8217;re good to go!
Remember:

needs to be capitals,
needs to have both entries
stop and start [...]]]></description>
			<content:encoded><![CDATA[<p>Ever get this error when using Oracle XE with SpringFramework JDBC Template?</p>
<pre>SORA-12519, TNS:no appropriate service handler found</pre>
<p>You can get around it by executing the following commands:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">ALTER</span> SYSTEM <span style="color: #993333; font-weight: bold;">SET</span> PROCESSES<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">150</span> SCOPE<span style="color: #66cc66;">=</span>SPFILE;
<span style="color: #993333; font-weight: bold;">ALTER</span> SYSTEM <span style="color: #993333; font-weight: bold;">SET</span> SESSIONS<span style="color: #66cc66;">=</span><span style="color: #cc66cc;">100</span> SCOPE<span style="color: #66cc66;">=</span>SPFILE;</pre></div></div>

<p>Then stop and start database (Oracle XE service) and you&#8217;re good to go!</p>
<p>Remember:</p>
<ul>
<li>needs to be capitals,</li>
<li>needs to have both entries</li>
<li>stop and start the database (oracle XE service)</li>
</ul>
<p>Got this from the following two resources:</p>
<p><a href="http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/">http://en.newinstance.it/2007/06/01/ora-12519-tnsno-appropriate-service-handler-found/</a><br />
<a href="http://forum.springsource.org/showthread.php?p=133267"> http://forum.springsource.org/showthread.php?p=133267</a></p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/07/getting-oracle-xe-to-work-with-springframework-jdbc-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up scheduled jobs with Rails</title>
		<link>http://passbyvalue.com/2009/06/setting-up-scheduled-jobs-with-rails/</link>
		<comments>http://passbyvalue.com/2009/06/setting-up-scheduled-jobs-with-rails/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 13:02:42 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.passbyvalue.com/?p=3</guid>
		<description><![CDATA[I&#8217;ve seen lots of different approaches to scheduling jobs with Rails, including a great run down by Ryan Bates&#8217; Rails Casts Episode 129, however the most elegant solution I&#8217;ve seen so far is what was outlined in Episode 164 using the cool Whenever gem and good ol&#8217; Cron.
Within a couple of hours I had a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen lots of different approaches to scheduling jobs with Rails, including a great run down by Ryan Bates&#8217; Rails Casts <a href="http://railscasts.com/episodes/129-custom-daemon">Episode 129</a>, however the most elegant solution I&#8217;ve seen so far is what was outlined in <a href="http://railscasts.com/episodes/164-cron-in-ruby">Episode 164</a> using the cool <a href="http://github.com/javan/whenever/tree/master">Whenever</a> gem and good ol&#8217; <a href="http://en.wikipedia.org/wiki/Cron">Cron</a>.</p>
<p>Within a couple of hours I had a weekly scheduled job running all nicely managed entirely through my Rails application code base.  The incorporation into Capistrano makes it killer.  The only thing that caught me out was that my script/runner file was not set as executable when capistrano was deploying it, therefore runner commands failed to execute through Cron with a &#8220;permission denied&#8221; error.</p>
<p>Found that all I needed to do was set it to executable within svn:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">svn</span> propset <span style="color: #c20cb9; font-weight: bold;">svn</span>:executable on script<span style="color: #000000; font-weight: bold;">/</span>runner</pre></div></div>

<p>All good!</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/06/setting-up-scheduled-jobs-with-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git for dummies</title>
		<link>http://passbyvalue.com/2009/01/git-for-dummies/</link>
		<comments>http://passbyvalue.com/2009/01/git-for-dummies/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 06:41:44 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[scm]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.passbyvalue.com/?p=45</guid>
		<description><![CDATA[Only just started to finally get stuck into learning git.  It certainly seems to be revolutionising the way we do version control.  I&#8217;m pretty hooked on subversion and I have to admit, I thought that was as good as it gets!  But the hype around git to much to ignore.
Here&#8217;s some resources [...]]]></description>
			<content:encoded><![CDATA[<p>Only just started to finally get stuck into learning <a href="http://git-scm.com/">git</a>.  It certainly seems to be revolutionising the way we do version control.  I&#8217;m pretty hooked on <a href="http://subversion.tigris.org/">subversion</a> and I have to admit, I thought that was as good as it gets!  But the hype around git to much to ignore.</p>
<p>Here&#8217;s some resources I&#8217;ve found really useful to get (git) going:</p>
<h3>Resources</h3>
<ul>
<li><a href="http://feeds.feedburner.com/Gitcasts">GitCasts</a> by Scott Chacon.  Screencasts are for me one of the best ways to learn things, these casts, although very quick, give you that good leg up.</li>
<li><a href="http://www.newartisans.com/blog/2008/04/git-from-the-bottom-up.html">Git from the bottom up</a> by John Wiegley.  There is a link from his blog entry to a paper he has put together on his understanding of Git.  Always good to read some theory!</li>
<li><a href="http://git-scm.com/course/svn.html">Git &#8211; SVN crash course</a> from the offical git site.  A great place to start if like me, you&#8217;re already familiar with svn.</li>
<li>Github&#8217;s <a href="http://github.com/guides/git-cheat-sheet">Git Cheat Sheet</a> is a good resource too!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/01/git-for-dummies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting Ruby to talk to Oracle with Cygwin</title>
		<link>http://passbyvalue.com/2009/01/getting-ruby-to-talk-to-oracle-with-cygwin/</link>
		<comments>http://passbyvalue.com/2009/01/getting-ruby-to-talk-to-oracle-with-cygwin/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 22:52:04 +0000</pubDate>
		<dc:creator>Trent</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.passbyvalue.com/?p=42</guid>
		<description><![CDATA[I need to be able to use Ruby to talk to Oracle databases to help us easily build scripts for maintenance and support.  So, I started doing some googling and found ruby-oci8.  Excellent!
I&#8217;m also mainly PC bound so I needed to get this working on my cygwin installation.  My entire Ruby environment [...]]]></description>
			<content:encoded><![CDATA[<p>I need to be able to use Ruby to talk to Oracle databases to help us easily build scripts for maintenance and support.  So, I started doing some googling and found <a href="http://ruby-oci8.rubyforge.org/">ruby-oci8</a>.  Excellent!</p>
<p>I&#8217;m also mainly PC bound so I needed to get this working on my <a href="http://www.cygwin.com/">cygwin</a> installation.  My entire Ruby environment is running through cygwin.</p>
<p>So I started through the installation instructions on the ruby-oci8 site but started to find it pretty confusing to follow for the cygwin-specific installation.  Finally, after a bit of trial and error, here are the steps I followed to get this baby humming:</p>
<ol>
<li>Download and unzip the Oracle Instant Client Basic and SDK packages.  I successfully did this with version 11.1.0.7.0.  The path I chose was:

<div class="wp_syntax"><div class="code"><pre class="dos" style="font-family:monospace;">C:\oracle\instantclient_11_1</pre></div></div>

</li>
<li>Add the instant client to the front of your system path (through Control Panel &#8211;&gt; System)</li>
<li>Launch cygwin</li>
<li>Install the gem

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gem <span style="color: #c20cb9; font-weight: bold;">install</span> ruby-oci8
Building native extensions.  This could take a while...
Successfully installed ruby-oci8-1.0.3
<span style="color: #000000;">1</span> gem installed
Installing ri documentation <span style="color: #000000; font-weight: bold;">for</span> ruby-oci8-1.0.3...
Installing RDoc documentation <span style="color: #000000; font-weight: bold;">for</span> ruby-oci8-1.0.3...</pre></div></div>

</li>
</ol>
<p>That&#8217;s it!  You&#8217;re now all installed!  You&#8217;ll notice that the gem compiles some native extensions, this is why you need the instant client to be available in your path.</p>
<p>Now to give it a test run, open up and irb session and give it a go:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">irb<span style="color:#006600; font-weight:bold;">&#40;</span>main<span style="color:#006600; font-weight:bold;">&#41;</span>:001:<span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'oci8'</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>
irb<span style="color:#006600; font-weight:bold;">&#40;</span>main<span style="color:#006600; font-weight:bold;">&#41;</span>:002:<span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&gt;</span> conn = OCI8.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'username'</span>, <span style="color:#996600;">'password'</span>, <span style="color:#996600;">'//server:port/sid'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#008000; font-style:italic;">#&lt;OCI8:0x7fdb3d44 @privilege=nil, @prefetch_rows=nil, @ctx=[0, #&lt;Mutex:0x7fdb3cf4&gt;, nil, 65535], @svc=#&lt;ocisvcctx:0x7fdb3ce0&gt;&gt;</span></pre></div></div>

<p>We have a connection!</p>
]]></content:encoded>
			<wfw:commentRss>http://passbyvalue.com/2009/01/getting-ruby-to-talk-to-oracle-with-cygwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
