<?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>Alba HK</title>
	<atom:link href="http://www.albahk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.albahk.com</link>
	<description>Development, Design and the Web</description>
	<lastBuildDate>Thu, 16 Feb 2012 04:04:55 +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>Building an invoice-focused business</title>
		<link>http://www.albahk.com/blog/building-an-invoice-focused-business/</link>
		<comments>http://www.albahk.com/blog/building-an-invoice-focused-business/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 03:52:41 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[business]]></category>

		<guid isPermaLink="false">http://www.albahk.com/?p=13</guid>
		<description><![CDATA[Moving into the fourth week of full-time work on a new business I am concerned at how easily distractions can creep into my day and pull me away from my work. Until now I have forced myself to do a &#8230; <a href="http://www.albahk.com/blog/building-an-invoice-focused-business/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Moving into the fourth week of full-time work on a <a href="http://www.propoffice.com/" title="Prop Office">new business</a> I am concerned at how easily distractions can creep into my day and pull me away from my work. Until now I have forced myself to do a quick evaluation by asking myself the following question: &#8220;Does this task bring me closer to writing an invoice for a new client?&#8221; If the answer is no, then I stop and move to a task that does.</p>
<p>Focusing on the invoice is not the goal per se &dash; improving the site and the product for an end user is going to get you closer to something your clients will happily pull out their cheque books for. The money is a simple proxy for measuring the impact of improvements on the users of the site and by extension my customers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albahk.com/blog/building-an-invoice-focused-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My email gotcha</title>
		<link>http://www.albahk.com/blog/my-email-gotcha/</link>
		<comments>http://www.albahk.com/blog/my-email-gotcha/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 03:46:26 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.albahk.com/?p=20</guid>
		<description><![CDATA[tldr; &#8211; If Postmark emails are not sending on a new server, make sure curl is installed &#38; active. If this little post spares someone else the 30 minutes of stress I went through trying to figure this out then &#8230; <a href="http://www.albahk.com/blog/my-email-gotcha/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>tldr; &#8211; If <a href="http://postmarkapp.com">Postmark</a> emails are not sending on a new server, make sure <code>curl</code> is installed &amp; active. If this little post spares someone else the 30 minutes of stress I went through trying to figure this out then I am happy.</p>
<p>This morning I discovered enquiry emails from our website were not getting through to recipients. As a property listing website this is bread and butter stuff that cannot be broken. First thing I did was walk through the email sending process to track down where the problem might be. </p>
<p>We use Postmark for sending transactional emails and its fantastic. From our development server we&#8217;ve had zero issues sending through the Postmark API (making use of the also-fantastic <a href="http://www.github.com/zackkitzmiller/postmark-codeigniter" title="Codeigniter Postmark library">Codeigniter Postmark Library</a>)</p>
<p>The Postmark API was never receiving the api request from our server backend so a bit of digging reveals a <code>curl</code> call within php that wasn&#8217;t getting run. A quick check of a <code>phpinfo();</code> page showed me the live server did not have a <code>curl</code> module installed. Fingers crossed its as simple as this.</p>
<p>A helpful blog post on how to install <a href="http://www.ivankristianto.com/os/ubuntu/howto-install-curl-in-php-apache/379/" title="curl for php on ubuntu">curl for php on ubuntu</a> and I was on my way again. Let the emails (re)commence.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albahk.com/blog/my-email-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MAMP and Virtual hosts on Mac OS</title>
		<link>http://www.albahk.com/blog/mamp-and-virtual-hosts-on-mac-os/</link>
		<comments>http://www.albahk.com/blog/mamp-and-virtual-hosts-on-mac-os/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 04:30:57 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.albahk.com/?p=1</guid>
		<description><![CDATA[I’ve just spent a few hours setting up a new local development environment for development and thought I would write down the steps both for my own reference and hopefully for the benefit of others using MAMP. Development Environment We &#8230; <a href="http://www.albahk.com/blog/mamp-and-virtual-hosts-on-mac-os/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’ve just spent a few hours setting up a new local development environment for development and thought I would write down the steps both for my own reference and hopefully for the benefit of others using MAMP.</p>
<h3>Development Environment</h3>
<p>We are using a Mac OS X environment for development. Basically all our projects are under version control (SVN) and we use MAMP to get the basic web development stack up and running with as little drama as possible. We use the command-line or svnX for SVN and Textmate for code. It’s relatively problem-free to setup and most importantly gets out of our way so we can get on with real work rather than faffing about with configurations and Yak shaving.</p>
<h3>Multiple Projects under MAMP</h3>
<p>Often we’ve got multiple projects underway and while MAMP is great out of the box for a single site, shutting down and restarting it with a new DocumentRoot was not a satisfactory solution for switching between projects, not to mention embarrassingly low-tech.<br />
<span id="more-1"></span><br />
Below is a solution to get multiple virtual hosts running locally on the same MAMP instance locally so we can access our projects at http://project1/ and http://project2/ at the same time and without a MAMP restart. This solution is clearly in the category of bleedingly obvious setup tweaks and we are not the first person to do it this way, however this little setup has saved us a truckload of time and more importantly our flow is not interrupted when switching between projects.</p>
<p>Modify /etc/hosts file</p>
<p>In OS X (and basically all flavours of *NIX-based operating systems) there is a config file such as:</p>
<p><code>/etc/hosts<br />
</code><br />
Open this file up in a text-editor and you should see a few lines of options such as:</p>
<p><code>##<br />
# Host Database<br />
#<br />
# localhost is used to configure the loopback interface<br />
# when the system is booting. Do not change this entry.<br />
##<br />
127.0.0.1 localhost<br />
255.255.255.255 broadcasthost<br />
</code></p>
<p>Modify the local hosts file and add one line for each new host name you require. For example I would add the following lines:</p>
<p><code>##<br />
# Host Database<br />
#<br />
# localhost is used to configure the loopback interface<br />
# when the system is booting. Do not change this entry.<br />
##<br />
127.0.0.1 localhost<br />
255.255.255.255 broadcasthost<br />
127.0.0.1 project1<br />
127.0.0.1 project2</code></p>
<p>Once you’ve saved this file, try pinging the new hostnames from Terminal like so (hit ctrl-C to terminate the pinging):</p>
<p><code>Computer1:~ User1$ ping project1<br />
PING project1 (127.0.0.1): 56 data bytes<br />
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.148 ms<br />
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.132 ms<br />
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.136 ms<br />
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.133 ms<br />
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.150 ms<br />
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.131 ms<br />
^C<br />
--- project1 ping statistics ---<br />
6 packets transmitted, 6 packets received, 0% packet loss<br />
round-trip min/avg/max/stddev = 0.131/0.138/0.150/0.008 ms</code></p>
<p>Now that this is done we need to get Apache involved.</p>
<h3>Modify Apache httpd.conf file</h3>
<p>We’ll let Apache know about the new hostnames. We will setup a Virtual Host for each of our projects. This can be done by modifying Apache’s configuration file which is located in the following location for default MAMP installations:</p>
<p><code>/Applications/MAMP/conf/apache/httpd.conf</code></p>
<p>At the very end of the file should be a section on Virtual Hosts. You’ll need to uncomment the following line:</p>
<p><code>NameVirtualHost *</code></p>
<p>and add the following nested entry for each virtual host you have:</p>
<pre>
&lt;VirtualHost *&gt;
  DocumentRoot /Users/User1/project1
  ServerName project1
  &lt;Directory "/Users/User1/project1"&gt;
    Options All
    AllowOverride All
    Order allow,deny
    Allow from all
  &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<h3>Test it out</h3>
<p>It is necessary to restart Apache (or MAMP) in order to pick up the new changes. After restarting, we can navigate to the following urls and see the respective projects in a browser:</p>
<p><code>http://project1/<br />
</code><br />
<code>http://project2/<br />
</code></p>
<p>If you’ve got any questions, please leave a comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.albahk.com/blog/mamp-and-virtual-hosts-on-mac-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

