<?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/"
	>

<channel>
	<title>jesperrasmussen.com</title>
	<atom:link href="http://jesperrasmussen.com/feed" rel="self" type="application/rss+xml" />
	<link>http://jesperrasmussen.com</link>
	<description>confessions of yet another Mac-geek</description>
	<pubDate>Sun, 01 Nov 2009 18:57:35 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Coding on the go - Setting up local Apache</title>
		<link>http://jesperrasmussen.com/coding-on-the-go-setting-up-local-apache</link>
		<comments>http://jesperrasmussen.com/coding-on-the-go-setting-up-local-apache#comments</comments>
		<pubDate>Thu, 27 Aug 2009 16:13:11 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://jesperrasmussen.com/?p=43</guid>
		<description><![CDATA[As one might imagine, I&#8217;ve setup Apache with PHP support quite some times over the last years. A thing I&#8217;ve already enjoyed, is having a local development environment installed on my laptop, and having my development environment with me, everywhere I go. Over the next couple of weeks, I&#8217;ll walk you through setting everything up. [...]]]></description>
			<content:encoded><![CDATA[<p>As one might imagine, I&#8217;ve setup Apache with PHP support quite some times over the last years. A thing I&#8217;ve already enjoyed, is having a local development environment installed on my laptop, and having my development environment with me, everywhere I go. Over the next couple of weeks, I&#8217;ll walk you through setting everything up. We&#8217;ll start out by setting up Apache.<span id="more-43"></span></p>
<h4>Why would I run everything locally ?</h4>
<p>Over the last years, a lot of the development agencies in the PHP world, has found out the joys of having local, individual environments for all developers, and managing larger projects through version control like SVN, CVS or, my new favourite, Git. Most people don&#8217;t have the luxury of having their own dedicated testserver for development, but you really don&#8217;t need one either. If you just have a Mac with OS X, you&#8217;ll have everything you need.</p>
<p>The reasons for having a local environment are quite massive: You&#8217;re able to have a complete replica of a running website, you&#8217;ll be able to develop new features without risking the stability of your public site. You&#8217;ll have full control of every setting in Apache, MySQL and PHP, meaning you&#8217;ll have the opportunity of testing optimizations and database structures properly, without the risk of destroying everything in a production environment.</p>
<h3>Prerequirements</h3>
<p>To complete the setup of Apache &amp; friends, you&#8217;ll need the assistance of Terminal. If you are not comfortable with Terminal, just feel free to copy&#8217;n'paste every command here. Of course, as time passes, and you&#8217;re using your new environment, you&#8217;ll probably notice the advantages of Terminal anyway.</p>
<h3>Setting up Apache</h3>
<p>As Apache 2 is bundled with Leopard, this is very easy. Apache is controlled by enabling Web sharing in System Preferences.</p>
<h4>Setting up webroots</h4>
<p>As you have full control of Apache&#8217;s setup, you could actually put your websites whereever you&#8217;d like. However, as you already have the Sites folder available in your home directory, I&#8217;ll just make use of that. This also ensures, that Time Machine for instance is able to create backups of your sites.</p>
<p>So go ahead and create a directory within Sites for your new site, and try to give it a memorable name (In this example I&#8217;ll use jesperrasmussen.com from now on) .</p>
<pre class="brush: bash;">sudo mkdir -p ~/Sites/jesperrasmussen.com/htdocs</pre>
<p>While you&#8217;re at it, add a general directory for Apache&#8217;s logs within Sites, to gather all sites logs within one place, making debugging and log-analyzing a bit easier.</p>
<pre class="brush: bash;">sudo mkdir ~/Sites/logs</pre>
<p>Now that that&#8217;s done, you should have a couple of nice directories for the virtualhost and its logfiles, so let&#8217;s move on.</p>
<h4>Setting up a VirtualHost</h4>
<p>In the default setting, Apache will see your Sites folder as one site, as it&#8217;s setup to allow one personal site per user. To make Apache recognize the new virtual hosts, you need to edit the file /private/etc/apache2/users/.conf in your favourite editor (I recommend emacs or nano for Terminal editing).</p>
<p>The file will look somewhat like this when you open it:</p>
<pre class="brush: bash;">&lt;Directory &quot;/Users/jesper/Sites/&quot;&gt;
 Options Indexes MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all
&lt;/Directory&gt;</pre>
<p>Now, what we&#8217;ll do, is that we&#8217;ll add the lines for a new virtualhost in the configuration. Furthermore, in my example, there&#8217;s  an added .dev alias to the domain, allowing me to access the local development version of the site by accessing jesperrasmussen.dev, and access the public version (On another server) by accessing jesperrasmussen.com. Anyway, add the following lines, replacing jesperrasmussen.com with whatever your virtual host is called, and save the file.</p>
<pre class="brush: bash;">NameVirtualHost *:80
DocumentRoot /Users/jesper/Sites/jesperrasmussen.com/htdocs
ServerName jesperrasmussen.com
ServerAlias jesperrasmussen.dev
ErrorLog /Users/jesper/Sites/logs/jesperrasmussen.com-error_log
CustomLog /Users/jesper/Sites/logs/jesperrasmussen.com-access_log common</pre>
<h4>Restarting Apache</h4>
<p>Inorder to test the new site, we need to reload Apache&#8217;s configuration files. This is done by testing the new config files first.</p>
<pre class="brush: bash;">sudo apachectl -t</pre>
<p>If this says &#8220;Syntax OK&#8221;, we should gracefully load the changes into Apache. *)</p>
<pre class="brush: bash;">sudo apachectl graceful</pre>
<h4>Accessing your newly created site</h4>
<p>Now, you may think you should be able to access your new site at the domain you&#8217;ve entered. But no, you still need one more thing, changing your hosts-file into handling your domain locally (Or at least, the development version). This is done by editing /etc/hosts (Again, using emacs or nano), like so:</p>
<pre class="brush: bash;">sudo nano /etc/hosts</pre>
<p>This should load your hosts-file **), which should look like this:</p>
<pre class="brush: bash;">127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost</pre>
<p>Now, in the bottom of the file, insert a couple of blank lines to seperate your changes from the default parts, and insert this line:</p>
<pre class="brush: bash;">127.0.0.1       jesperrasmussen.dev www.jesperrasmussen.dev</pre>
<p>This will force your machine into believing that your domain is located at localhost, thus making the request at your local Apache.</p>
<p>Now, everything should work, try putting a dummy index.html file in your new htdocs directory, and try loading the site in your browser. Next time I&#8217;ll have a look at enabling PHP and MySQL support on your standard machine.</p>
<h4>Further reading</h4>
<p>It&#8217;s come to my attention that Patrick Gibson has a fine shellscript for handling the VirtualHost part, making this a lot easier.<br />
You might want to <a href="http://patrickgibson.com/utilities/virtualhost/">check that out</a></p>
<hr />
<p>* Gracefully restarting Apache lets Apache apply the configuration more smoothly, by allowing it&#8217;s child processes to keep running with the old configuration, but loading the new configuration for all new processes. This is usually done in production environments, to avoid hard restarting servers, thereby avoiding possible downtime.</p>
<p>** The hosts-file is OS X&#8217;s way of overriding DNS locally. It allows you to force a domain to a specific IP-address rather than the one specified in the domains DNS. This is especially useful for testing a development or staging environment with the correct domainname.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesperrasmussen.com/coding-on-the-go-setting-up-local-apache/feed</wfw:commentRss>
		</item>
		<item>
		<title>GTD - a crash course</title>
		<link>http://jesperrasmussen.com/gtd-a-crash-course</link>
		<comments>http://jesperrasmussen.com/gtd-a-crash-course#comments</comments>
		<pubDate>Wed, 01 Apr 2009 13:07:40 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[gtd]]></category>

		<guid isPermaLink="false">http://jesperrasmussen.com/?p=39</guid>
		<description><![CDATA[I&#8217;ve been on the GTD (Getting Things Done) wagon for a couple of years, and as part of it, a lot of people ask the obvious question: What is it, and what&#8217;s the point ?
Let&#8217;s start at the beginning: Getting Things Done is a way of improving productivity. It&#8217;s a way of organizing your life, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been on the GTD (Getting Things Done) wagon for a couple of years, and as part of it, a lot of people ask the obvious question: What is it, and what&#8217;s the point ?</p>
<p>Let&#8217;s start at the beginning: Getting Things Done is a way of improving productivity. It&#8217;s a way of organizing your life, it&#8217;s a way of optimizing your day-to-day life and it&#8217;s a way to combat stress. This might sound like just yet another scheme to steal money, but it&#8217;s not really. The only thing you have to invest in, is the book, and from there on, the implementation of GTD in you life depends on what you make of it.</p>
<p>GTD has had quite a lot of success during the last couple of years, and is in general very popular among especially developers, as it has a very structured approach to projectmanagement, and life in general.<span id="more-39"></span></p>
<h3>The concepts of GTD</h3>
<p>The primary concept of GTD, handles the way we perceive tasks. Usually, a lot of people have things written down on post-its, taking the tasks one by one in no particular order. Usually this means a lot of clutter, or &#8220;stuff&#8221; as it&#8217;s called in GTD.</p>
<p>GTD puts focus on a couple of things to remove stuff, both from our desks and our consciousness, by splitting every project into atomic &#8220;bits&#8221; representing every single, physical action required for the project to be completed.</p>
<h4>The Inbox</h4>
<p>The inbox is the source of organizing. Everything goes inhere, just like a mail inbox. The inbox is where you write everything down, ideas, notes, todos, projects etc. The inbox is sorted regularly, taking care of smaller tasks right away, while larger projects are split into single, physical actions described later in this post.</p>
<p>An important note about the inbox, is that a large part of GTD is having the discipline to clean this up, or review it. This is for a lot of people handled on a daily basis, and a more advanced weekly or monthly basis. This is also the largest weak spot of GTD, as it requires a steady discipline to maintain the order of organizing everything regularly, and avoid having a large inbox.</p>
<h4>Actions</h4>
<p>Actions are the atomic bits and pieces of GTD. Actions define every physical action you have to take to complete the project at hand. Actions make up projects, and inorder to finish a project, one must complete every action within. This could be &#8220;Call Jack Bauer about nuclear device&#8221;, &#8220;Gather information on Ruby development&#8221;, &#8220;E-mail John from IT about server specs, remember to CC Jack&#8221;.</p>
<h4>Contexts</h4>
<p>Contexts are defined by the surroundings you are currently in. This is a way of organizing actions that can only be fixed while being &#8220;at the computer&#8221;, &#8220;at the office&#8221;, &#8220;on the phone&#8221; or even &#8220;In Brazil&#8221;. Context are used to group all actions, based on location or the tools at hand, and provides you with a simple list of &#8220;Things you&#8217;re able to do right now&#8221;. This means a context might hold 10 actions for 4 different projects, meaning you&#8217;ll be able to focus on what&#8217;s actually achievable from your current location, with the current tools.</p>
<h4>More reading</h4>
<p>As this is a very brief introduction into the world of GTD, which will probably be expanded into more advanced articles later on, I would recommend reading more about GTD, and some general concepts of increasing productivity without adding stress. Here&#8217;s a few of my favourite books and sites about GTD.</p>
<p><a href="http://www.amazon.com/gp/product/0142000280?ie=UTF8&amp;tag=jesperrasmuss-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0142000280">David Allen - Getting Things Done</a><br />
<a href="http://43folders.com">43 Folders<br />
</a><a href="http://www.davidco.com/what_is_gtd.php">What is GTD ?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jesperrasmussen.com/gtd-a-crash-course/feed</wfw:commentRss>
		</item>
		<item>
		<title>Switching bash with zsh</title>
		<link>http://jesperrasmussen.com/switching-bash-with-zsh</link>
		<comments>http://jesperrasmussen.com/switching-bash-with-zsh#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:30:25 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Development]]></category>

		<category><![CDATA[Featured]]></category>

		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[shells]]></category>

		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://jesperrasmussen.com/?p=4</guid>
		<description><![CDATA[I&#8217;ve been running OS X since the beginning back in 2001. During that time, the system have gone through a lot of changes, and while some has improved a lot of visual effects, and have a great impact on the way we perceive our tasks at hand, some are more invisible, but also have a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been running OS X since the beginning back in 2001. During that time, the system have gone through a lot of changes, and while some has improved a lot of visual effects, and have a great impact on the way we perceive our tasks at hand, some are more invisible, but also have a large effect on the way we work.</p>
<p>I usually spend 20-30% of my day in Terminal, doing administrative tasks, ssh&#8217;ing to the servers I use for development and for my work, watching logs, debugging etc. This might not be typical behaviour for an OS X user (Which is good, as I think Terminal should be an addition for those who wants the power of it, and not a necessity for &#8220;regular&#8221; users) , but I find working directly with Terminal to improve my workflow when it comes to the previously mentioned tasks.</p>
<p>As some Mac-users will know, OS X currently comes with bash as the standard shell. Even though bash is often perceived as one of the best shells available in the Unix-community, quite a lot of other shells exist, all with different features, and approaches to shell-work. A couple of years ago I decided to try out Z Shell, also known as zsh, and I&#8217;ve never regretted this.<span id="more-4"></span></p>
<h3>Why run zsh ?</h3>
<p>To begin with, it&#8217;s not even a big deal switching or trying zsh out. If you are currently using bash, you&#8217;ll feel right at home. Zsh uses a lot of the same shortcuts, has support for most of the features bash uses, and this means the only thing you&#8217;ll actually notice, is how the extra features just make things easier. Some of the key features for zsh are:</p>
<ul>
<li>Nice autocompletion for commands, aliases etc. Zsh allows you to tab through completions if there are multiple possibilities, showing possible completions in a nice grid, browsable even by arrow keys, to make it simple and fast to find exactly the completion you want.</li>
<li>Autocompletion for remote files. If you are using scp to transfer a file to a remote server, zsh will figure out what you are doing, so if you try to autocomplete while typing the remote part, it will try to connect via ssh and actually perform autocompletion on the remote side.</li>
<li>Functions in addition to aliases. It&#8217;s possible to create entire routines as zsh functions with arguments, allowing for complex functionality for running multiple commands in succession easily.</li>
<li>Share history across sessions. When running multiple instances of zsh at the same time, the instances are able to share a common history, rather than being limited to only each its own. One of the most frustrating things to a bash user is typing in a long command, then searching for it again the next day via Ctrl+r, only to find it nowhere in the history.</li>
</ul>
<h3>Ok, so how do I change my shell to zsh ?</h3>
<p>Enabling zsh in OS X Leopard is really easy. Previously, you had to install zsh from <a href="http://www.macports.org/">MacPorts</a>, but in Leopard it&#8217;s part of the base install, and as such is easily accessed. try writing &#8220;zsh&#8221; in your bash, and bang! You&#8217;re running zsh! To set zsh as your default shell in OS X, and make it run every time you start Terminal, load up Terminal&#8217;s settings, and set your default theme to run the command &#8220;zsh&#8221; on startup.</p>
<p><img class="alignnone" title="ZSH Setup on OS X" src="http://jesperrasmussen.com/uploads/zsh-setup.jpg" alt="" width="670" height="535" /></p>
<p>To change it in older OS X versions, you should be able to use the chsh command. But there are <a href="http://osxdaily.com/2007/02/27/how-to-change-from-bash-to-tcsh-shell/">other suggestions</a> as well.</p>
<h3>But, but, it&#8217;s not working like you promised ?</h3>
<p>You&#8217;ll need a .zshrc file to take full advantage of zsh. The .zshrc is zsh&#8217;s configuration file, and will setup most of the features I&#8217;ve mentioned earlier. There&#8217;s a couple of ways of getting hold of a .zshrc. You could google for it, and you&#8217;ll find a bunch of examples. Another way is to take a look at <a href="http://jesperrasmussen.com/uploads/dummy-.zshrc">my sample file</a> . This is not an exact copy of my running .zshrc, but it has a bunch of the most common setups.</p>
<p>To make it work, you have to save the file as .zshrc in your home directory.</p>
<p>Be aware that zsh holds a bunch of more features than I&#8217;ve talked about here, and there&#8217;s much to explore.  Feel free to use my sample file as a starting point, and do change it anyway you&#8217;d like. If you find any other useful features in zsh, please let me know, and I&#8217;ll make some notes about it here.</p>
<h3>Further reading</h3>
<p>If you want to know more about the glorious world of zsh, try checking out the <a href="http://zsh.sourceforge.net/">official zsh website</a>, containing documentation, the manual as well as some pointers to getting started with scripting in zsh.</p>
<p><a href="http://zsh.sourceforge.net/">Zsh homepage</a></p>
<p><a href="http://jesperrasmussen.com/uploads/dummy-.zshrc">My sample .zshrc</a></p>
<p><a href="http://zshwiki.org/">Zsh Wiki</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jesperrasmussen.com/switching-bash-with-zsh/feed</wfw:commentRss>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://jesperrasmussen.com/welcome</link>
		<comments>http://jesperrasmussen.com/welcome#comments</comments>
		<pubDate>Sun, 22 Feb 2009 10:25:20 +0000</pubDate>
		<dc:creator>Jesper</dc:creator>
		
		<category><![CDATA[Apple]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[Featured]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Productivity]]></category>

		<category><![CDATA[welcome]]></category>

		<guid isPermaLink="false">http://jesperrasmussen.com/?p=3</guid>
		<description><![CDATA[Welcome to the very first post on jesperrasmussen.com. I&#8217;m very excited about this, and I hope in time you&#8217;ll be too. To start off, I&#8217;ll explain a bit about the sites purpose and history:
Back in 1999, I purchased my very first domain. It was called highonpixels.dk , and acted as my personal playground at the [...]]]></description>
			<content:encoded><![CDATA[<p>Welcome to the very first post on <a href="http://www.jesperrasmussen.com">jesperrasmussen.com</a>. I&#8217;m very excited about this, and I hope in time you&#8217;ll be too. To start off, I&#8217;ll explain a bit about the sites purpose and history:</p>
<p>Back in 1999, I purchased my very first domain. It was called highonpixels.dk , and acted as my personal playground at the time. During the first couple of years, I focused a lot on webdesign and usability, and the website was my first adventures into creating webpages. Alot has happened since then, I&#8217;ve matured, gotten a couple of different jobs, and over the years my website faded into the background.</p>
<p>I rarely had the time to update the site, my friends started poking me for more content and new layouts etc., but in the end I just didn&#8217;t have the drive for updating a website anymore. Working as a webdeveloper on a fulltime-basis for clients will do that to you, trust me ;)<span id="more-3"></span></p>
<p>So what changed ? Well, during the last year or so, I&#8217;ve regained a lot of the enthusiasm regarding the web, and the technologies surrounding it. Another thing that has happened, is that I just recently acquired this domain. For the last couple of years it&#8217;s been occupied by another danish guy with the same name, and I&#8217;ve tried to capture it a couple of times without success. However, in December 2008, magic happened. The domain was released, and I put a couple of hosting-companies on the case of capturing it for me, which happened around Christmas (yay, best christmaspresent for myself ever!).</p>
<p>One of the things I&#8217;ve had a lot of advantages from online, has been technical guides. Everything from setting up virtualhosts on a Mac, over learning BASH-scripting to hacking my Xbox to allow it to be a multimedia-player. All of these experiences has helped me a lot, but sometimes I see myself googling for the same themes over and over again. And everytime I need a guide I have to find it again, and hope the site I&#8217;m looking for is still available. Initially I thought about running my own Wiki for the guides that I need, but I figure someone else could probably benefit from my mistakes and experiences.</p>
<p>So I&#8217;ve decided to launch a blog-like site with those exact subjects. The site will contain guides for most of everything I come into contact with. Expect guides involving Linux/Unix/Mac maintenance, Javascript, MySQL, PHP architecture and development patterns, as well as my personal thoughts, ideas and tips.</p>
<p>Anyway, welcome once more, I will try to make your stay as pleasant as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://jesperrasmussen.com/welcome/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
