<?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>Matt Kirman</title>
	<atom:link href="http://mattkirman.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattkirman.com</link>
	<description>Founder, Technical Manager &#38; Developer. Rubyist.</description>
	<lastBuildDate>Fri, 31 May 2013 19:37:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>I Use This: Terminal Edition</title>
		<link>http://mattkirman.com/2013/02/01/i-use-this-terminal-edition/</link>
		<comments>http://mattkirman.com/2013/02/01/i-use-this-terminal-edition/#comments</comments>
		<pubDate>Fri, 01 Feb 2013 22:10:05 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[I Use This]]></category>
		<category><![CDATA[tmux]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=894</guid>
		<description><![CDATA[<p>I spend a lot of time working on the command line. Day in; day out. Hours at a time. This is a brief rundown of the setup that I&#8217;ve been using for some time and am finally happy with. One quick note: In some cases I&#8217;ve extensively customised my tools from their defaults. Some of [...]</p><p>The post <a href="http://mattkirman.com/2013/02/01/i-use-this-terminal-edition/">I Use This: Terminal Edition</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2013/01/iterm-tmux-vim.jpg" width="700" height="392"></p>
<p>I spend a lot of time working on the command line. Day in; day out. Hours at a time. This is a brief rundown of the setup that I&#8217;ve been using for some time and am finally happy with.</p>
<p><strong>One quick note:</strong> In some cases I&#8217;ve extensively customised my tools from their defaults. Some of the changes are too many to detail here &#8211; I&#8217;ll go into more detail in additional posts.</p>
<p>My setup comprises of an <a href="#zsh">extended Bourne shell</a>, a <a href="#tmux">terminal multiplexer</a> and an <a href="#vim">advanced text editor</a>.</p>
<hr />
<h2 id="zsh">Zsh</h2>
<p><a href="http://www.zsh.org/">Zsh</a> (the Z shell) is an interactive login shell with powerful command completion, extended file globbing, path expansion, spelling correction and a lot more. If you want it Zsh (probably) has it.</p>
<p>Zsh is installed on OS X by default but it&#8217;s quite out of date (version 4.3.11 on OS X 10.8.2). You will want to get the latest version via <a href="http://mxcl.github.com/homebrew/">Homebrew</a> instead:</p>
<div class="codecolorer-container bash solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ brew <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">zsh</span><br />
$ <span style="color: #c20cb9; font-weight: bold;">chsh</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">zsh</span> <span style="color: #007800;">$USER</span></div></div>
<p>In comparison to <a href="http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/">some shells</a> my prompt is relatively straightforward. It&#8217;s tailored for a Git and Ruby development environment:</p>
<p><img src="http://49cc209416f11ec36ae6-da3c8cf2caa60cf887d388e2ad3c1707.r59.cf3.rackcdn.com/wp-content/uploads/2013/01/zsh-prompt.jpg" width="700" height="90"></p>
<p>The left prompt displays information such as the username, working directory and the current Git branch. The lightning bolt indicates that there are some unstaged changes that need to be committed. My right prompt simply shows the current Ruby version (with switching enabled by <a href="https://github.com/sstephenson/rbenv">rbenv</a>).</p>
<p>What isn&#8217;t shown in the screenshot above is a <code class="codecolorer text solarized-light"><span class="text">sudo</span></code> indicator. When working as a superuser the left prompt is suffixed by two red exclamation marks.</p>
<p><em>The full Zsh prompt configuration is available in my <a href="https://github.com/mattkirman/dotfiles/blob/master/zsh/prompt.zsh">dotfiles repository</a>.</em></p>
<hr />
<h2 id="tmux">Tmux</h2>
<p>Rather than opening multiple terminal windows or tabs I much prefer to use <a href="http://tmux.sourceforge.net/">tmux</a> &#8211; a terminal multiplexer. Basically this means that you can manage multiple terminal sessions within one terminal window.</p>
<p>Again, tmux is available from Homebrew:</p>
<div class="codecolorer-container bash solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ brew <span style="color: #c20cb9; font-weight: bold;">install</span> tmux<br />
$ tmux</div></div>
<p>I typically split my main tmux window into three sections:</p>
<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2013/01/iterm-tmux-vim-annotated.jpeg" width="700" height="392"></p>
<ol>
<li>Vim &#8211; for writing code</li>
<li>a command prompt &#8211; for running Rake, Git etc.</li>
<li>a utility pane for long running processes such as Foreman and Guard that tail their logs to the terminal. This pane often gets subdivided further.</li>
</ol>
<p>Occasionally I&#8217;ll like to push a window to a separate device such as an iPad or iPhone for monitoring long running processes away from my desk. Unfortunately tmux forces all clients to have the same window visible.</p>
<p>To counter this I&#8217;ve added a <a href="https://github.com/mattkirman/dotfiles/blob/master/bin/tmx">tmx</a> shell script that allows clients view different windows from within the same session. Finally make sure you add the following to your tmux config so that only visible windows are resized:</p>
<div class="codecolorer-container bash solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">setw <span style="color: #660033;">-g</span> aggressive-resize on</div></div>
<p><em>I&#8217;ve made a number of other changes to the tmux defaults &#8211; you can view my full config in my <a href="https://github.com/mattkirman/dotfiles/blob/master/tmux/tmux.conf.symlink">dotfiles repository</a>.</em></p>
<hr />
<h2 id="vim">Vim</h2>
<p>Switching to <a href="http://www.vim.org/">Vim</a> was the best thing to happen to my development workflow and day-to-day productivity despite the daunting (and seemingly never ending) learning curve.</p>
<p>If you&#8217;re tempted to give Vim a go I highly recommend that you stick with it for at least a couple before deciding whether it&#8217;s for you.</p>
<p>As usual the copy of Vim bundled with OS X is quite out of date. Install the latest version with Homebrew:</p>
<div class="codecolorer-container bash solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ brew <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">vim</span><br />
$ <span style="color: #c20cb9; font-weight: bold;">vim</span></div></div>
<p>Plugins are kept to a minimum. Due to the intricate Vim command scheme it makes sense to fully understand the editor before confusing matters with third party functionality. <strong>Bonus:</strong> my Vim isn&#8217;t <em>that</em> different from default making much it easier to move between unfamiliar environments.</p>
<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2013/01/vim.jpg" width="700" height="424"></p>
<p>The few plugins to make the cut include:</p>
<ul>
<li><a href="https://github.com/gmarik/vundle">Vundle</a> &#8211; a plugin manager</li>
<li><a href="https://github.com/tpope/vim-surround">vim-surround</a> &#8211; quoting/parenthesizing made simple</li>
<li><a href="https://github.com/ervandew/supertab">SuperTab</a> &#8211; insert mode code completions</li>
<li><a href="https://wincent.com/products/command-t">command-t</a> &#8211; TextMate style &#8220;Go to File&#8221; window</li>
<li><a href="https://github.com/scrooloose/nerdtree">nerdtree</a> &#8211; a file tree explorer</li>
</ul>
<p>Usually I opt for command line Vim rather than <a href="https://github.com/b4winckler/macvim">MacVim</a>. Differences between the two versions are minimal plus CLI Vim is accesible remotely through my tmux sessions. I haven&#8217;t found a convenient way to open files in CLI Vim from Finder or other apps quite yet; so have MacVim as the default editor for certain file types.</p>
<p><em>As before, my .vimrc and .gvimrc is available <a href="https://github.com/mattkirman/dotfiles/blob/master/vim/vimrc.symlink">on GitHub</a></em>.</p>
<p>The post <a href="http://mattkirman.com/2013/02/01/i-use-this-terminal-edition/">I Use This: Terminal Edition</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2013/02/01/i-use-this-terminal-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac: How to Rebind Caps Lock to Control</title>
		<link>http://mattkirman.com/2012/10/15/mac-how-to-rebind-caps-lock-to-control/</link>
		<comments>http://mattkirman.com/2012/10/15/mac-how-to-rebind-caps-lock-to-control/#comments</comments>
		<pubDate>Mon, 15 Oct 2012 21:02:11 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[tmux]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=854</guid>
		<description><![CDATA[<p>With the increasing time that I&#8217;m spending in Tmux and Vim I&#8217;ve come to realise that the positioning of the control key is far from comfortable when working for a period of time. On the other hand I rarely use the ergonomically positioned caps lock. Remapping the caps lock key is becoming an increasingly common [...]</p><p>The post <a href="http://mattkirman.com/2012/10/15/mac-how-to-rebind-caps-lock-to-control/">Mac: How to Rebind Caps Lock to Control</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>With the increasing time that I&#8217;m spending in Tmux and Vim I&#8217;ve come to realise that the positioning of the control key is far from comfortable when working for a period of time. On the other hand I rarely use the ergonomically positioned caps lock.</p>
<p>Remapping the caps lock key is becoming an increasingly common modification in the Vim community. Thankfully it&#8217;s extremely easy to set up on OS X &#8211; with no third party software required.</p>
<p>Tucked away in the Keyboard section of System Preferences there is the Modifier Keys section. You can then just change the value in the Caps Lock key dropdown to &#8216;^ Control&#8217;.</p>
<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2012/10/osx-modifer-keys-dialog.png" width="415" height="257" /><br />
<span class="caption">OS X Modifier Keys dialog</span></p>
<p>Some users report that they encounter a slight delay on the caps lock key when using this method but I can&#8217;t replicate this issue in Mountain Lion.</p>
<p>I&#8217;ve converted the above process into an Applescript so that I can run it automatically when setting up a Mac from scratch. Once I&#8217;ve cloned and installed my dotfiles Git repo (<a href="https://github.com/mattkirman/dotfiles">mattkirman/dotfiles</a>) it&#8217;s as simple as running <code class="codecolorer text solarized-light"><span class="text">$DOTFILES_DIR/osx/set-defaults.sh</span></code>.</p>
<p>The Applescript:</p>
<div class="codecolorer-container applescript solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="applescript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Preferences&quot;</span><br />
&nbsp; <span style="color: #0066ff;">activate</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">set</span> current pane <span style="color: #ff0033; font-weight: bold;">to</span> pane <span style="color: #009900;">&quot;com.apple.preference.keyboard&quot;</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
<br />
<span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Events&quot;</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> process <span style="color: #009900;">&quot;System Preferences&quot;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">get</span> <span style="color: #0066ff;">properties</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; click button <span style="color: #009900;">&quot;Modifier Keys…&quot;</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">tab</span> group <span style="color: #000000;">1</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">window</span> <span style="color: #009900;">&quot;Keyboard&quot;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">tell</span> sheet <span style="color: #000000;">1</span> <span style="color: #ff0033; font-weight: bold;">of</span> <span style="color: #0066ff;">window</span> <span style="color: #009900;">&quot;Keyboard&quot;</span><br />
&nbsp; &nbsp; &nbsp; click pop up button <span style="color: #000000;">4</span><br />
&nbsp; &nbsp; &nbsp; click menu <span style="color: #0066ff;">item</span> <span style="color: #000000;">2</span> <span style="color: #ff0033; font-weight: bold;">of</span> menu <span style="color: #000000;">1</span> <span style="color: #ff0033; font-weight: bold;">of</span> pop up button <span style="color: #000000;">4</span><br />
&nbsp; &nbsp; &nbsp; click button <span style="color: #009900;">&quot;OK&quot;</span><br />
&nbsp; &nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span><br />
&nbsp; <br />
&nbsp; <span style="color: #ff0033; font-weight: bold;">tell</span> <span style="color: #0066ff;">application</span> <span style="color: #009900;">&quot;System Preferences&quot;</span> <span style="color: #ff0033; font-weight: bold;">to</span> <span style="color: #0066ff;">quit</span><br />
<span style="color: #ff0033; font-weight: bold;">end</span> <span style="color: #ff0033; font-weight: bold;">tell</span></div></div>
<p>You can download and run this script from <a href="https://github.com/mattkirman/dotfiles/blob/master/osx/capslock-to-control.scpt">mattkirman/dotfiles/blob/master/osx/capslock-to-control.scpt</a>.</p>
<p>The post <a href="http://mattkirman.com/2012/10/15/mac-how-to-rebind-caps-lock-to-control/">Mac: How to Rebind Caps Lock to Control</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2012/10/15/mac-how-to-rebind-caps-lock-to-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Introducing Cirrus: CloudApp powered WordPress shortlinks</title>
		<link>http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/</link>
		<comments>http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/#comments</comments>
		<pubDate>Wed, 06 Jun 2012 19:29:54 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Cirrus]]></category>
		<category><![CDATA[cloudapp]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=817</guid>
		<description><![CDATA[<p>As of today I&#8217;m open-sourcing my custom WordPress CloudApp powered shortlink generator Cirrus. Developed ~9 months ago I&#8217;ve been using it on and off on my own blog so that I have a unified shortlink presence. Cirrus has been tested on WordPress 3.3.2 (latest version as of time of posting) and PHP 5.3. It&#8217;s fully [...]</p><p>The post <a href="http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/">Introducing Cirrus: CloudApp powered WordPress shortlinks</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>As of today I&#8217;m open-sourcing my custom WordPress <a href="http://getcloudapp.com/" target="_blank">CloudApp</a> powered shortlink generator <a href="https://github.com/mattkirman/cirrus">Cirrus</a>. Developed ~9 months ago I&#8217;ve been using it on and off on my own blog so that I have a unified shortlink presence.</p>
<p>Cirrus has been tested on WordPress 3.3.2 (latest version as of time of posting) and PHP 5.3. It&#8217;s fully compatible with both the Free and Pro versions of CloudApp.</p>
<h3>Demo</h3>
<p><a href="http://mtt.io/HBJF">http://mtt.io/HBJF</a> &rarr; http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/</p>
<h3>Installation</h3>
<p>Source code is available for download on <a href="https://github.com/mattkirman/cirrus">GitHub</a> or, if you would prefer to install the plugin through the WordPress admin interface, you can do so by downloading a zipped version <a href="https://github.com/mattkirman/cirrus/zipball/master">here</a>.</p>
<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2012/06/cirrus-settings.png" width="700" height="202" /><br />
<span class="caption">Cirrus settings page</span></p>
<p>Once the plugin is installed successfully you will then need to navigate to the Cirrus settings page (found at Settings > Cirrus) and add your CloudApp credentials. At this point you will probably want to click &#8220;Add shortlinks to existing posts&#8221; (not recommended if you&#8217;re using the free version of CloudApp). Depending on the size of your blog this may take some time.</p>
<h3>Usage</h3>
<p>Cirrus does not replace the existing WordPress functionality instead adding the custom field <code class="codecolorer text solarized-light"><span class="text">cirrus_shortlink</span></code> to posts. On the plus side it makes uninstalling the plugin easy, however you will have to modify your theme files if you want to expose the shortlink to your readers.</p>
<p>Where you want the link to show up add the following to your theme file (this assumes that you&#8217;re currently <a href="http://codex.wordpress.org/The_Loop">in the Loop</a>):</p>
<div class="codecolorer-container php solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?</span><br />
&nbsp; <span style="color: #000088;">$custom_fields</span> <span style="color: #339933;">=</span> get_post_custom<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$custom_fields</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'cirrus_shortlink'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<h3>Limitations</h3>
<p>Shortlinks are only generated for posts, that means categories, tags and pages are not included. This may be resolved in a future update, or if you&#8217;d like to patch it yourself I&#8217;m accepting <a href="https://github.com/mattkirman/cirrus/pulls">GitHub pull requests</a>.</p>
<p>The post <a href="http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/">Introducing Cirrus: CloudApp powered WordPress shortlinks</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2012/06/06/introducing-cirrus-cloudapp-powered-shortlinks/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Relative Line Numbers in Vim</title>
		<link>http://mattkirman.com/2012/04/18/relative-line-numbers-in-vim/</link>
		<comments>http://mattkirman.com/2012/04/18/relative-line-numbers-in-vim/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 21:07:46 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dotfiles]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=772</guid>
		<description><![CDATA[<p>I&#8217;ve been gradually moving back to Vim from and one aspect that has really swayed me is the recent addition of the relativenumber setting in Vim 7.3. One thing that I used to be particularly guilty of was repeatedly hammering j and k rather than performing the mental arithmetic required to use the much shorter [...]</p><p>The post <a href="http://mattkirman.com/2012/04/18/relative-line-numbers-in-vim/">Relative Line Numbers in Vim</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been gradually moving back to Vim from and one aspect that has really swayed me is the recent addition of the <code class="codecolorer text solarized-light"><span class="text">relativenumber</span></code> setting in Vim 7.3.</p>
<p>One thing that I used to be particularly guilty of was repeatedly hammering <code class="codecolorer text solarized-light"><span class="text">j</span></code> and <code class="codecolorer text solarized-light"><span class="text">k</span></code> rather than performing the mental arithmetic required to use the much shorter <code class="codecolorer text solarized-light"><span class="text">37j</span></code>. I had the same issues deleting or moving lines where switching into visual mode was quicker than counting lines and using <code class="codecolorer text solarized-light"><span class="text">d12d</span></code>.</p>
<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2012/04/vim-relative-number-1.png" width="700" height="274" /><br />
<span class="caption">Relative line numbers in Vim</span></p>
<h3>Going Relative</h3>
<p>Vim now has a setting called <code class="codecolorer text solarized-light"><span class="text">relativenumber</span></code> which acts in a similar way to the <code class="codecolorer text solarized-light"><span class="text">number</span></code> setting. However, rather than calculating line numbers from the top of the file it shows them relative to the line you&#8217;re currently on.</p>
<p>I always disable the arrow keys in insert mode, to force myself to use <code class="codecolorer text solarized-light"><span class="text">10j</span></code> and keep my hands on the home row (plus it&#8217;s great for trolling). I prefer to use relative line numbers when in normal mode for ease of movement and absolute line numbers in insert mode. We can set this up with:</p>
<div class="codecolorer-container vim solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="vim codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #804040;">au</span> <span style="color: #25BB4D;">InsertEnter</span> <span style="color: #000000;">*</span> <span style="color: #000000;">:</span><span style="color: #804040;">set</span> <span style="color: #668080;">nu</span><br />
<span style="color: #804040;">au</span> <span style="color: #25BB4D;">InsertLeave</span> <span style="color: #000000;">*</span> <span style="color: #000000;">:</span><span style="color: #804040;">set</span> rnu</div></div>
<p>Occasionally it&#8217;s useful to go to a specific line, such as when fixing failing tests. At first glance using relative line numbers appears to complicate the issue somewhat. But, line movement shortcuts such as <code class="codecolorer text solarized-light"><span class="text">&lt;line-number&gt;gg</span></code> still work.</p>
<p>The post <a href="http://mattkirman.com/2012/04/18/relative-line-numbers-in-vim/">Relative Line Numbers in Vim</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2012/04/18/relative-line-numbers-in-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graphing the switch to Nginx</title>
		<link>http://mattkirman.com/2011/06/24/graphing-the-switch-to-nginx/</link>
		<comments>http://mattkirman.com/2011/06/24/graphing-the-switch-to-nginx/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 21:13:32 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=660</guid>
		<description><![CDATA[<p>As a quick followup to my previous post detailing how to run WordPress behind a Nginx reverse proxy I thought I&#8217;d post an interesting graph retrieved from Google Webmaster Tools showing page load times of this site over the past few months: I switched to the Nginx/Apache configuration just before the start of June and, [...]</p><p>The post <a href="http://mattkirman.com/2011/06/24/graphing-the-switch-to-nginx/">Graphing the switch to Nginx</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>As a quick followup to my previous post detailing how to run <a href="/2011/06/01/how-to-speed-up-wordpress-with-nginx/">WordPress behind a Nginx reverse proxy</a> I thought I&#8217;d post an interesting graph retrieved from Google Webmaster Tools showing page load times of this site over the past few months:</p>
<p><img src="http://cdn.mattkirman.com/wp-content/uploads/2011/06/mattkirman.com-page-load-times.png?f21a40d4774988b615181bd05e0a64cb" /></p>
<p>I switched to the Nginx/Apache configuration just before the start of June and, thankfully, it appears that the performance increase I noticed has also been observed by others.</p>
<p>Additionally, Google reports that the slowest load time was a shocking <strong>5,572ms</strong> with a fastest time of <strong>225ms</strong>. Not too shabby from a single 256MB server.</p>
<p>The post <a href="http://mattkirman.com/2011/06/24/graphing-the-switch-to-nginx/">Graphing the switch to Nginx</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2011/06/24/graphing-the-switch-to-nginx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to speed up WordPress with Nginx</title>
		<link>http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/</link>
		<comments>http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 21:19:30 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=556</guid>
		<description><![CDATA[<p>Recently I&#8217;ve wondering whether it was worth trying to improve my WordPress-based blog performance. While it wasn&#8217;t particularly terrible, waiting over 2 seconds just to load a single page isn&#8217;t exactly stunning. I took a typical approach and installed the WP Super Cache plugin. Page loads dropped down to ~1 second. Much better, but there [...]</p><p>The post <a href="http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/">How to speed up WordPress with Nginx</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Recently I&#8217;ve wondering whether it was worth trying to improve my WordPress-based blog performance. While it wasn&#8217;t particularly terrible, waiting over 2 seconds just to load a single page isn&#8217;t exactly stunning.</p>
<p>I took a typical approach and installed the <a href="http://wordpress.org/extend/plugins/wp-super-cache/" target="_blank">WP Super Cache plugin</a>. Page loads dropped down to ~1 second. Much better, but there must be some more performance gains to be found somewhere without modifying the WordPress source code itself.</p>
<p>Inspired by <a href="http://markmaunder.com/2009/how-to-handle-1000s-of-concurrent-users-on-a-360mb-vps/" target="_blank">this post by Mark Maunder</a> I decided to see if I could shoehorn WordPress into a similar reverse proxy/persistent process mould. So far, it works brilliantly.</p>
<p>With the following tweaks I managed to go from 12 requests/s to over 30 requests/s on the same hardware &#8211; a single 256MB Rackspace Cloud server &#8211; whilst reducing latency from ~2 seconds to an average of only 0.4 seconds.</p>
<p><span id="more-556"></span></p>
<h3>Step 1. Configure Apache</h3>
<p>You&#8217;ve really got to be running Apache with mod_php. Even if you stop reading here you&#8217;ll still find that your server performs better. In order to allow more requests to be handled by Apache, disable Keepalive connections.</p>
<p>You&#8217;ll find at this point that your requests will slow down a bit as clients will have to create a new connection for every request. You will, however, be able to handle many more requests as you will no longer have clients with slow connections tying up processes. We&#8217;re going to rectify this slow down in the next step.</p>
<p class="align-center"><img src="http://cdn.mattkirman.com/wp-content/uploads/2011/05/apache_mod_php.png"></p>
<p>It is also important to change the IP address that Apache listens on to <code class="codecolorer text solarized-light"><span class="text">127.0.0.1</span></code> so that it can only be accessed from the local machine. Additionally, you will need to change the port from the default port 80 to, for example, port 81. This is because Nginx will need to run on port 80.</p>
<div class="codecolorer-container apache solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #adadad; font-style: italic;">#/etc/apache2/ports.conf</span><br />
<br />
<span style="color: #adadad; font-style: italic;"># Listen 80</span><br />
<span style="color: #00007f;">Listen</span> 127.0.0.1:<span style="color: #ff0000;">81</span></div></div>
<h3>Step 2. Configure Nginx as a Reverse Proxy</h3>
<p><a href="http://nginx.org/" target="_blank">Nginx</a> is a &#8220;high performance web server and a reverse proxy server&#8221; that&#8217;s capable of handling thousands of concurrent users whilst occupying only a few megabytes of memory.</p>
<p>To install Nginx on Debian/Ubuntu distributions it&#8217;s as simple as:</p>
<div class="codecolorer-container bash solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666;">$ </span><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get install</span> nginx</div></div>
<p>Initially we&#8217;re just going to create an Nginx virtual host that acts as a <a href="http://wiki.nginx.org/NginxHttpProxyModule" target="_blank">reverse proxy</a> to our persistent Apache processes. If you have never worked with Nginx before this may sound a little daunting so I&#8217;ve copied the important parts of my conf file below:</p>
<div class="codecolorer-container nginx solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="nginx codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000066;">server</span> <span style="color: #66cc66;">&#123;</span><br />
&nbsp; <span style="color: #000066;">listen</span> <span style="">80</span> default<span style="color: #66cc66;">;</span><br />
&nbsp; <span style="color: #000066;">server_name</span> mattkirman.com<span style="color: #66cc66;">;</span> <span style="color: #808080; font-style: italic;"># Change this!</span><br />
<br />
&nbsp; <span style="">add_header</span> Cache-Control public<span style="color: #66cc66;">;</span><br />
<br />
&nbsp; <span style="color: #000066;">location</span> / <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="">proxy_pass</span> <span style="color: #000066;">http</span>://127.0.0.1:<span style="">81</span><span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; <span style="">proxy_buffering</span> on<span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; <span style="">proxy_buffers</span> <span style="">12</span> 12k<span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; <span style="">proxy_redirect</span> off<span style="color: #66cc66;">;</span><br />
<br />
&nbsp; &nbsp; <span style="">proxy_set_header</span> X-Real-IP <span style="">$remote_addr</span><span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; <span style="">proxy_set_header</span> X-Forwarded-For <span style="">$remote_addr</span><span style="color: #66cc66;">;</span><br />
&nbsp; &nbsp; <span style="">proxy_set_header</span> Host <span style="">$host</span><span style="color: #66cc66;">;</span><br />
&nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></td></tr></tbody></table></div>
<p>Because we&#8217;re running WordPress behind a proxy it&#8217;s important that we forward information such as the website host name and the client IP address. By adding <code class="codecolorer nginx solarized-light"><span class="nginx"><span style="">proxy_set_header</span> Host <span style="">$host</span></span></code> we can make the reverse proxy completely transparent. We&#8217;ll make use of the <code class="codecolorer text solarized-light"><span class="text">X-Forwarded-For</span></code> header later.</p>
<p>Unfortunately, if you omit the <code class="codecolorer nginx solarized-light"><span class="nginx"><span style="">proxy_set_header</span> Host</span></code> line you will no longer be able to log into your WordPress installation and any internal links may cease to work.</p>
<p>At this point you want to enable Keepalive requests on Nginx and crank their timeout to as high as you dare. This will offset the slow down you experienced by turning off Keepalive requests on Apache.</p>
<p class="align-center"><img src="http://cdn.mattkirman.com/wp-content/uploads/2011/05/reverse_proxy.png"></p>
<p>The beauty of this setup means that the time Apache now takes to handle a request is due solely to the amount of CPU time it takes to actually handle the request &#8211; there&#8217;s zero latency from a loopback request.</p>
<p>Child processes are now no longer tied up by clients with slow connections meaning that each child can process many more requests per second. It&#8217;s therefore possible to handle a huge amount of traffic without having to increase the number of processes and RAM.</p>
<h3>Step 3. Configure WordPress</h3>
<p>There are a few modules in WordPress (mostly based around the comment system and plugins such as Akismet) that use the client remote IP address. Unfortunately, with our current configuration <code class="codecolorer php solarized-light"><span class="php"><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span></span></code> will always return <code class="codecolorer text solarized-light"><span class="text">127.0.0.1</span></code>.</p>
<p>In order to fix this we just need to set <code class="codecolorer php solarized-light"><span class="php"><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span></span></code> to the value of the <code class="codecolorer text solarized-light"><span class="text">X-Forwarded-For</span></code> header that we set in our Nginx config. You can do this by adding the following code to the top of your <code class="codecolorer text solarized-light"><span class="text">wp-config.php</span></code>.</p>
<div class="codecolorer-container php solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_X_FORWARDED_FOR'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; <span style="color: #000088;">$ips</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">','</span><span style="color: #339933;">,</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTP_X_FORWARDED_FOR'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REMOTE_ADDR'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$ips</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Why <code class="codecolorer text solarized-light"><span class="text">wp-config.php</span></code>? It&#8217;s because it&#8217;s one of the only files that isn&#8217;t effected by WordPress updates. Deploy your <code class="codecolorer text solarized-light"><span class="text">wp-config.php</span></code> to your server, sit back and enjoy your new speedy WordPress blog.</p>
<h3>Tl;dr:</h3>
<ul>
<li>Install mod_php</li>
<li>Disable Apache Keepalive connections</li>
<li>Make Apache listen on <code class="codecolorer text solarized-light"><span class="text">127.0.0.1:81</span></code></li>
<li>Install Nginx</li>
<li>Configure Nginx as a reverse proxy to Apache</li>
<li>Update <code class="codecolorer text solarized-light"><span class="text">wp-config.php</span></code> to work with our new setup</li>
<li>Epic win</li>
</ul>
<p>The post <a href="http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/">How to speed up WordPress with Nginx</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2011/06/01/how-to-speed-up-wordpress-with-nginx/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Introducing Spotio: A Spotify Remote</title>
		<link>http://mattkirman.com/2011/04/18/introducing-spotio-a-spotify-remote/</link>
		<comments>http://mattkirman.com/2011/04/18/introducing-spotio-a-spotify-remote/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 21:14:03 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Spotio]]></category>
		<category><![CDATA[spotify]]></category>
		<category><![CDATA[spotio]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=499</guid>
		<description><![CDATA[<p>Spotio is an open-source, web-based, multi-user Spotify remote. It features support for viewing the currently playing track, skipping tracks and, most importantly, the ability to control playback. Spotio is optimised for use in a modern WebKit browser (such as Google Chrome and Mobile Safari). As such it&#8217;s possible for multiple people using multiple devices to [...]</p><p>The post <a href="http://mattkirman.com/2011/04/18/introducing-spotio-a-spotify-remote/">Introducing Spotio: A Spotify Remote</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Spotio is an open-source, web-based, multi-user Spotify remote. It features support for viewing the currently playing track, skipping tracks and, most importantly, the ability to control playback.</p>
<p>Spotio is optimised for use in a modern WebKit browser (such as Google Chrome and Mobile Safari). As such it&#8217;s possible for multiple people using multiple devices to control the playback of a Spotify playlist with <em>realtime</em> feedback.</p>
<p><span id="more-499"></span></p>
<p class="align-center"><img src="http://cdn.mattkirman.com/wp-content/uploads/2011/04/spotio-comp.jpg?572f3472050365387537b7c861946b04" width="460" height="300"></p>
<p>The need for a Spotify remote with multi-user support reared it&#8217;s head whilst working at the office. Spotify is an excellent tool for allowing many people to collaborate on a playlist, but actually controlling what&#8217;s played is an area that hasn&#8217;t been fully explored yet.</p>
<p>As such, the office is now using a Mac Mini as a dedicated jukebox with our copy of Spotify running on it. This is in turn driving a 5.1 surround sound setup (courtesy of <a href="http://twitter.com/adamrhoades" target="_blank">Adam Rhoades</a>) with a central volume control. The final piece of the jigsaw is Spotio &#8211; this is installed as an application shortcut on everyone&#8217;s PC and iPhone allowing full control of the playlist as long as they&#8217;re connected to the office network.</p>
<p>Despite the fact that Spotio is far from finished, I&#8217;ve decided to start promoting it so that people can start playing with it, finding bugs and adding features.</p>
<p>Documentation is non-existent (unless you count a readme as documentation) but there isn&#8217;t really that much code so it shouldn&#8217;t take too much time to rectify matters (in theory).</p>
<h3>How It Works</h3>
<p>There are two distinct parts to Spotio. First there is the SIMBL bundle that provides us with a very simple API that can be used to control Spotify remotely. Ideally there should only be one connection to the API so that we minimise our impact on the Spotify process. Part two is little more than a proxy server written in Node.js and CoffeeScript that can easily scale to thousands of clients on one server.</p>
<p>The two parts are completely independent, however it&#8217;s important to realise that the SIMBL bundle can be used without Node but <em>not</em> vice-versa.</p>
<h3>Requirements</h3>
<ul>
<li>Mac OS X 10.6 &#8211; 10.5 might work, but it will never be officially supported</li>
<li><a href="http://www.culater.net/software/SIMBL/SIMBL.php" target="_blank">SIMBL</a></li>
<li><a href="http://nodejs.org/" target="_blank">Node</a></li>
<li><a href="http://npmjs.org/" target="_blank">Npm</a> for CoffeeScript support</li>
</ul>
<p>If you want to compile Spotio from source you will also need:</p>
<ul>
<li><a href="http://git-scm.org" target="_blank">Git VCS</a></li>
<li>Xcode 4</li>
<li><a href="http://rake.rubyforge.org/" target="_blank">Rake</a></li>
</ul>
<h3>Installation</h3>
<p>First, make sure you&#8217;ve installed the various dependencies. You can then <a href="https://github.com/mattkirman/spotio/downloads" target="_blank">download the latest copy</a> of the Spotio SIMBL bundle and Node server from GitHub. You will then need to move the Spotio bundle into your <code class="codecolorer text solarized-light"><span class="text">~/Library/Application Support/SIMBL/Plugins</span></code> directory for a single user installation or <code class="codecolorer text solarized-light"><span class="text">/Library/Application Support/SIMBL/Plugins</span></code> for all users.</p>
<p>Alternatively, if you like living on the edge, you can build the latest version of Spotio from source:</p>
<div class="codecolorer-container text solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ git clone git://github.com/mattkirman/spotio.git<br />
$ cd spotio<br />
$ rake plugin:build plugin:install</div></div>
<p>Rake will spit out the build results and then copy the compiled bundle into <code class="codecolorer text solarized-light"><span class="text">~/Library/Application Support/SIMBL/Plugins</span></code>.</p>
<p>Once you have installed Spotio you will need to restart Spotify for changes to take effect.</p>
<h3>Usage</h3>
<ol>
<li>Start Spotify</li>
<li>Open the Spotio Node directory in Finder</li>
<li>Open a terminal (<code class="codecolorer text solarized-light"><span class="text">/Applications/Utilities/Terminal</span></code>), type <code class="codecolorer text solarized-light"><span class="text">coffee</span></code> and drag <code class="codecolorer text solarized-light"><span class="text">server.coffee</span></code> into the terminal window. Hit enter.</li>
<li>Open <a href="http://127.0.0.1:8080" target="_blank"><code class="codecolorer text solarized-light"><span class="text">127.0.0.1:8080</span></code></a> (change this IP address for the one on your computer) in Chrome (or another WebKit browser).</li>
</ol>
<p>By default Spotio binds to all available IP addresses on port 8080. It&#8217;s fully compatible with DNS.</p>
<h3>Contributing</h3>
<p>This project was created as a way for me to learn Node/CoffeeScript and Objective-C. Without doubt things can be improved, so if you would like to lend a hand simply fork the repository and send me a pull request.</p>
<p>If you&#8217;re not on GitHub feel free to email me at <a href="mailto:matt@mattkirman.com">matt@mattkirman.com</a>.</p>
<p>The post <a href="http://mattkirman.com/2011/04/18/introducing-spotio-a-spotify-remote/">Introducing Spotio: A Spotify Remote</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2011/04/18/introducing-spotio-a-spotify-remote/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Super Secret Preferences in Twitter for Mac without the Nanobundle</title>
		<link>http://mattkirman.com/2011/01/13/super-secret-preferences-in-twitter-for-mac-without-the-nanobundle/</link>
		<comments>http://mattkirman.com/2011/01/13/super-secret-preferences-in-twitter-for-mac-without-the-nanobundle/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 07:39:09 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=379</guid>
		<description><![CDATA[<p>It annoyed my slightly that simple things such as hitting escape to close the new tweet window were only available to people who&#8217;d purchased the MacHeist Nanobundle. You can enable these preferences yourself with only a small amount of command line tinkering. To disable the preference that you&#8217;ve just enabled change true to false and [...]</p><p>The post <a href="http://mattkirman.com/2011/01/13/super-secret-preferences-in-twitter-for-mac-without-the-nanobundle/">Super Secret Preferences in Twitter for Mac without the Nanobundle</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>It annoyed my slightly that simple things such as hitting escape to close the new tweet window were only available to people who&#8217;d purchased the MacHeist Nanobundle. You can enable these preferences yourself with only a small amount of command line tinkering.</p>
<div class="gist-container"><script src="https://gist.github.com/768609.js?file=Twitter%20MacHeist%20Preferences"></script></div>
<p>To disable the preference that you&#8217;ve just enabled change <code class="codecolorer text solarized-light"><span class="text">true</span></code> to <code class="codecolorer text solarized-light"><span class="text">false</span></code> and vice versa.</p>
<p>The post <a href="http://mattkirman.com/2011/01/13/super-secret-preferences-in-twitter-for-mac-without-the-nanobundle/">Super Secret Preferences in Twitter for Mac without the Nanobundle</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2011/01/13/super-secret-preferences-in-twitter-for-mac-without-the-nanobundle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What I Learned from Zuckerberg’s Mistakes</title>
		<link>http://mattkirman.com/2011/01/01/what-i-learned-from-zuckerberg%e2%80%99s-mistakes/</link>
		<comments>http://mattkirman.com/2011/01/01/what-i-learned-from-zuckerberg%e2%80%99s-mistakes/#comments</comments>
		<pubDate>Sat, 01 Jan 2011 22:16:50 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=374</guid>
		<description><![CDATA[<p>I&#8217;ve been an avid reader of Jason Calacanis&#8216; various newsletters for some time, not least for the sheer amount of work he puts into each and every one. In his latest newsletter he offers a suggestion as to why Facebook is perceived as either evil, clueless or just plain unlucky when it comes to releasing new [...]</p><p>The post <a href="http://mattkirman.com/2011/01/01/what-i-learned-from-zuckerberg%e2%80%99s-mistakes/">What I Learned from Zuckerberg’s Mistakes</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<div>
<p>I&#8217;ve been an avid reader of <a href="http://twitter.com/jason"><cite>Jason Calacanis</cite>&#8216;</a> various newsletters for some time, not least for the sheer amount of work he puts into each and every one.</p>
<p>In his latest newsletter he offers a suggestion as to why Facebook is perceived as either evil, clueless or just plain unlucky when it comes to releasing new products:</p>
<blockquote><p>Facebook&#8217;s success &#8212; and mistakes &#8212; are based on its developer-driven culture, not because Zuckerberg is some evil mastermind.</p>
<p>The Zuckerberg Doctrine: Developers design products with significantly improved speed and functionality compared to product managers and designers, outweighing potential mistakes and drawbacks.</p></blockquote>
<p>And in this world, speed is everything. We shouldn&#8217;t be afraid of making mistakes at the cost of innovation. New Year Resolution anyone?</p>
<p>You can sign up for Jason&#8217;s free newsletter <a href="http://launch.is/">here</a>.</p>
</div>
<p>&nbsp;</p>
<p>The post <a href="http://mattkirman.com/2011/01/01/what-i-learned-from-zuckerberg%e2%80%99s-mistakes/">What I Learned from Zuckerberg’s Mistakes</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2011/01/01/what-i-learned-from-zuckerberg%e2%80%99s-mistakes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Places launches in the UK</title>
		<link>http://mattkirman.com/2010/09/17/facebook-places-launches-in-the-uk/</link>
		<comments>http://mattkirman.com/2010/09/17/facebook-places-launches-in-the-uk/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 06:29:10 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[places]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=333</guid>
		<description><![CDATA[<p>Well it looks like Facebook Places has just launched in the UK. Worryingly this was brought to my attention by my newsfeed showing that one of my distant friends (who shall remain nameless) has just checked-in to his house. Let&#8217;s just hope that place isn&#8217;t publicly available, though I doubt it as it&#8217;s listed as [...]</p><p>The post <a href="http://mattkirman.com/2010/09/17/facebook-places-launches-in-the-uk/">Facebook Places launches in the UK</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Well it looks like Facebook Places has just launched in the UK. Worryingly this was brought to my attention by my newsfeed showing that one of my distant friends (who shall remain nameless) has just checked-in to his house. Let&#8217;s just hope that place isn&#8217;t publicly available, though I doubt it as it&#8217;s listed as a &#8220;Local Business&#8221;. Way to go Facebook.</p>
<p>The post <a href="http://mattkirman.com/2010/09/17/facebook-places-launches-in-the-uk/">Facebook Places launches in the UK</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2010/09/17/facebook-places-launches-in-the-uk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Git Workflow; Introducing Flit</title>
		<link>http://mattkirman.com/2010/08/27/my-git-workflow-introducing-flit/</link>
		<comments>http://mattkirman.com/2010/08/27/my-git-workflow-introducing-flit/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 21:42:19 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[flit]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=306</guid>
		<description><![CDATA[<p>I&#8217;ve been a Git convert, and version control geek, for over a year now so I&#8217;ve sort of become the unofficial Git consultant at the office. If anythings breaks or something weird happens I&#8217;m usually the one called in to sort it out. In order to preserve at least some of the remnants of our [...]</p><p>The post <a href="http://mattkirman.com/2010/08/27/my-git-workflow-introducing-flit/">My Git Workflow; Introducing Flit</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been a Git convert, and version control geek, for over a year now so I&#8217;ve sort of become the unofficial Git consultant at the office. If anythings breaks or something weird happens I&#8217;m usually the one called in to sort it out.</p>
<p>In order to preserve at least some of the remnants of our sanity I decided, after my colleague managed to corrupt his entire local repository, that I needed to enforce some sort of system. What I finished up with is this fairly typical workflow:</p>
<ul>
<li>Find a feature (or bugfix, ticket, etc.) to work on</li>
<li><code class="codecolorer text solarized-light"><span class="text">git checkout -b my_new_feature</span></code></li>
<li>Hack away at some code</li>
<li><code class="codecolorer text solarized-light"><span class="text">git commit</span></code> early and often. Small diffs are the key.</li>
<li>When I&#8217;ve finished <code class="codecolorer text solarized-light"><span class="text">git checkout master</span></code></li>
<li><code class="codecolorer text solarized-light"><span class="text">git pull</span></code> any changes</li>
<li><code class="codecolorer text solarized-light"><span class="text">git checkout my_new_feature</span></code></li>
<li><code class="codecolorer text solarized-light"><span class="text">git rebase master</span></code></li>
<li>Fix any merge conflicts that I may have. If there are conflicts, fix them and keep going. Merge conflicts should be kept off the master branch if at all possible.</li>
<li><code class="codecolorer text solarized-light"><span class="text">git rebase -i</span></code> so that I squash all the commits in my branch down into one. This keeps the master branch nice and tidy.</li>
<li><code class="codecolorer text solarized-light"><span class="text">git checkout master</span></code> once the code is ready</li>
<li><code class="codecolorer text solarized-light"><span class="text">git merge my_new_feature</span></code></li>
<li><code class="codecolorer text solarized-light"><span class="text">git push</span></code></li>
</ul>
<p><span id="more-306"></span></p>
<p>Once our code is ready for staging we push our code to the <code class="codecolorer text solarized-light"><span class="text">staging</span></code> branch, and likewise to the <code class="codecolorer text solarized-light"><span class="text">production</span></code> branch. The <code class="codecolorer text solarized-light"><span class="text">master</span></code> branch is reserved for bleeding edge code.</p>
<p>I then started thinking, surely there must be a much easier way to manage this workflow? A minimum of seven separate commands to merge my changes into <code class="codecolorer text solarized-light"><span class="text">master</span></code> and push it back to the server?</p>
<h3>Introducing Flit</h3>
<p>Flit is a command line utility that eases the typical Git workflow that I&#8217;ve outlined above. Setting up Flit to work with either a new or existing Git repository is a simple as <code class="codecolorer text solarized-light"><span class="text">flit init</span></code>. If you haven&#8217;t already created a Git repository then Flit will create one for you.</p>
<p>Then, whenever you want to start, or continue with, a feature or bugfix simply do <code class="codecolorer text solarized-light"><span class="text">flit start feature my_new_feature</span></code>. Flit will create, or switch, to your feature branch, ready for you to start hacking away.</p>
<p>You can then use Git as normal, committing your changes as and when you see fit. Once you&#8217;ve finished work for the day on your feature or bugfix, <code class="codecolorer text solarized-light"><span class="text">flit stop</span></code> will return you back to your development branch.</p>
<p>Once your feature is complete <code class="codecolorer text solarized-light"><span class="text">flit finish feature my_new_feature</span></code> will pull down changes in <code class="codecolorer text solarized-light"><span class="text">master</span></code>, rebase them into your feature branch and then merge your feature back into <code class="codecolorer text solarized-light"><span class="text">master</span></code>.</p>
<h3>Caveats</h3>
<p>Flit is an extremely early alpha. Features may be broken or just plain missing, but getting this code out into the open-source community where people can start hacking away with it is much more important.</p>
<p>To that end, the entire codebase is hosted on <a href="http://github.com/mattkirman/flit">GitHub</a>. If something&#8217;s missing just fork the code, add your fix and send me a pull request.</p>
<h3>Requirements</h3>
<ul>
<li>Git 1.6.4 or greater</li>
<li>Ruby 1.8.7 or greater</li>
<li>RubyGems</li>
</ul>
<h3>Installation</h3>
<p>The easiest way to install Flit is through RubyGems:<br />
<code class="codecolorer text solarized-light"><span class="text">gem install flit --pre</span></code></p>
<p>Alternatively you can install Flit from source:<br />
<code class="codecolorer text solarized-light"><span class="text">rake gem &amp;&amp; rake install</span></code></p>
<p>The post <a href="http://mattkirman.com/2010/08/27/my-git-workflow-introducing-flit/">My Git Workflow; Introducing Flit</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2010/08/27/my-git-workflow-introducing-flit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI Compressor TextMate Bundle</title>
		<link>http://mattkirman.com/2009/11/13/yui-compressor-textmate-bundle/</link>
		<comments>http://mattkirman.com/2009/11/13/yui-compressor-textmate-bundle/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 13:14:25 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[compressor]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[textmate]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=245</guid>
		<description><![CDATA[<p>Even though the Google Closure Compiler is very useful for compressing JavaScript it has absolutely no support for CSS, something that the YUI Compressor excels at. I give you the YUI Compressor TextMate bundle, an almost direct port of the Google Closure Compiler TextMate bundle but with a different compression library. It has support for [...]</p><p>The post <a href="http://mattkirman.com/2009/11/13/yui-compressor-textmate-bundle/">YUI Compressor TextMate Bundle</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Even though the Google Closure Compiler is very useful for compressing JavaScript it has absolutely no support for CSS, something that the YUI Compressor excels at. I give you the YUI Compressor TextMate bundle, an almost direct port of the <a href="http://mattkirman.com/2009/11/10/google-closure-compiler-textmate-bundle/">Google Closure Compiler TextMate bundle</a> but with a different compression library.</p>
<p>It has support for compressing multiple JavaScript and CSS files at the same time; just select the files you want to compress and hit &#x21E7;&#8984;Y.</p>
<p><span id="more-245"></span></p>
<h3>Requirements</h3>
<p>The YUI Compressor bundle requires:</p>
<ul>
<li><a href="http://yuilibrary.com/downloads/#yuicompressor" target="_blank">The YUI Compressor</a></li>
<li><a href="http://www.ruby-lang.org/" target="_blank">Ruby</a> version 1.8.7 or greater (installed as default on Mac OS 10.5 and above)</li>
<li>and <a href="http://macromates.com/" target="_blank">TextMate</a> (obviously)</li>
</ul>
<p>Please make sure you read the <a href="http://github.com/mattkirman/YUI-Compressor-tmbundle/blob/master/README.md" target="_blank">README</a> before installing. The YUI Compressor TextMate bundle is licenced under the <a href="http://www.opensource.org/licenses/gpl-2.0.php" target="_blank">GPL Licence</a>. This bundle has only been tested with the latest versions of Mac OS X (v10.6.2) and TextMate (v1.5.8) but should work with earlier versions as long as the requirements above are met.</p>
<h3>Get It</h3>
<ul>
<li><a href="http://github.com/mattkirman/YUI-Compressor-tmbundle/downloads">Downloads</a></li>
<li><a href="http://github.com/mattkirman/YUI-Compressor-tmbundle">Source</a></li>
</ul>
<p>Using this bundle? Got any suggestions? Let me know in the comments!</p>
<p>The post <a href="http://mattkirman.com/2009/11/13/yui-compressor-textmate-bundle/">YUI Compressor TextMate Bundle</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2009/11/13/yui-compressor-textmate-bundle/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Google Closure Compiler TextMate Bundle</title>
		<link>http://mattkirman.com/2009/11/10/google-closure-compiler-textmate-bundle/</link>
		<comments>http://mattkirman.com/2009/11/10/google-closure-compiler-textmate-bundle/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 15:51:12 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[closure-compiler]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=212</guid>
		<description><![CDATA[<p>I&#8217;ve been trying out the brand new Google Closure Compiler instead of the YUI Compressor. I&#8217;m not going to go into any detail about the Closure Compiler as there&#8217;s plenty of information out there already, but I can say that it looks like another solid offering from Google. Anyway, in an effort to make a [...]</p><p>The post <a href="http://mattkirman.com/2009/11/10/google-closure-compiler-textmate-bundle/">Google Closure Compiler TextMate Bundle</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been trying out the brand new <a href="http://code.google.com/closure/compiler/" target="_blank">Google Closure Compiler</a> instead of the <a href="http://yuilibrary.com/downloads/#yuicompressor" target="_blank">YUI Compressor</a>. I&#8217;m not going to go into any detail about the Closure Compiler as there&#8217;s plenty of information out there already, but I can say that it looks like another solid offering from Google.</p>
<p>Anyway, in an effort to make a pretty good piece of software even better I decided to make a <a href="http://macromates.com/" target="_blank">TextMate</a> bundle for it so that it&#8217;s never more than a keystroke away (defaults to &#x21E7;&#8984;G).</p>
<p><span id="more-212"></span></p>
<h3>Requirements</h3>
<p>The Google Closure Compiler bundle requires:</p>
<ul>
<li><a href="http://closure-compiler.googlecode.com/files/compiler-latest.zip">The Google Closure Compiler</a> (not included in the bundle)</li>
<li><a href="http://www.ruby-lang.org/" target="_blank">Ruby</a> version 1.8.7 or greater (installed as standard on Mac OS 10.5 and above)</li>
<li><a href="http://macromates.com/" target="_blank">TextMate</a> (obviously)</li>
</ul>
<p>Make sure you read the <a href="http://github.com/mattkirman/GoogleClosureCompiler-tmbundle/blob/master/README.md">README</a> file before installing. The Google Closure Compiler TextMate bundle is licenced under the <a href="http://www.opensource.org/licenses/gpl-2.0.php">GPL Licence</a>. This bundle has only been tested with the latest versions of Mac OS X (v10.6.2) and TextMate (v1.5.8) but should work with earlier versions as long as the requirements above are met.</p>
<h3>Get It</h3>
<ul>
<li><strong>[Update]</strong> The bundle is now available via the <a href="http://svn.textmate.org/trunk/Review/Bundles/GetBundles.tmbundle/" target="_blank">GetBundles</a> TextMate bundle. Simply search for &#8220;Google Closure Compiler&#8221; (Recommended)</li>
<li><a href="http://github.com/mattkirman/GoogleClosureCompiler-tmbundle/downloads">Downloads</a></li>
<li><a href="http://github.com/mattkirman/GoogleClosureCompiler-tmbundle">Source code</a></li>
</ul>
<p>Using this bundle? Got any suggestions? Let me know in the comments!</p>
<p>The post <a href="http://mattkirman.com/2009/11/10/google-closure-compiler-textmate-bundle/">Google Closure Compiler TextMate Bundle</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2009/11/10/google-closure-compiler-textmate-bundle/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Equal height columns with pure CSS</title>
		<link>http://mattkirman.com/2009/10/12/equal-height-columns-with-pure-css/</link>
		<comments>http://mattkirman.com/2009/10/12/equal-height-columns-with-pure-css/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 11:46:36 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=172</guid>
		<description><![CDATA[<p>A common problem when designing for the web is how to create equal height columns. The usual solution is to either resort to JavaScript or CSS absolute positioning, here I will show you how to create equal height columns with pure CSS using the margin, padding and float properties. HTML The HTML of our page [...]</p><p>The post <a href="http://mattkirman.com/2009/10/12/equal-height-columns-with-pure-css/">Equal height columns with pure CSS</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>A common problem when designing for the web is how to create equal height columns. The usual solution is to either resort to JavaScript or CSS absolute positioning, here I will show you how to create equal height columns with pure CSS using the <code class="codecolorer text solarized-light"><span class="text">margin</span></code>, <code class="codecolorer text solarized-light"><span class="text">padding</span></code> and <code class="codecolorer text solarized-light"><span class="text">float</span></code> properties.</p>
<p><span id="more-172"></span></p>
<h2>HTML</h2>
<p>The HTML of our page is going to look something like this:</p>
<div class="codecolorer-container html4strict solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;wrapper&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;content&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">div</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;sidebar&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ...<br />
&nbsp; &nbsp; <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span><br />
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">div</span>&gt;</span></div></div>
<h2>CSS</h2>
<p>Our page is going to be 500px wide, with a 300px content area and a 200px sidebar. The CSS:</p>
<div class="codecolorer-container css solarized-light" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="css codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #cc00cc;">#wrapper</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span> &nbsp; &nbsp;<span style="color: #808080; font-style: italic;">/* Center the wrapper horizontally */</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">500px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#content</span><span style="color: #00AA00;">,</span> <span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-10000px</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">padding-bottom</span><span style="color: #00AA00;">:</span> <span style="color: #933;">100000px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#content</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">300px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span><br />
<br />
<span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span><br />
<span style="color: #00AA00;">&#125;</span></div></div>
<h2>The Demo</h2>
<p>Putting this together you end up with something like this:</p>
<div style="background:#fff;position:relative;margin:0 auto;overflow:hidden;width:500px">
<div style="float:right;padding-bottom:10000px;margin-bottom:-10000px;width:300px">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</p></div>
<div style="background:#ccc;float:left;padding-bottom:10000px;margin-bottom:-10000px;width:200px">
<ul>
<li>Page 1</li>
<li>Page 2</li>
<li>Page 3</li>
</ul></div>
</div>
<h2>Why does this work?</h2>
<p>The key to creating equal height columns using this method are the <code class="codecolorer text solarized-light"><span class="text">overflow: hidden</span></code> selector on the wrapper and the large <code class="codecolorer text solarized-light"><span class="text">padding-bottom</span></code> and negative <code class="codecolorer text solarized-light"><span class="text">margin-bottom</span></code>. Any padding is hidden when setting the overflow of the container to hidden. Basically, this means that by setting a large enough <code class="codecolorer text solarized-light"><span class="text">padding-bottom</span></code> then we can effectively stretch the background colour of the element to the bottom of the page. If 10000px isn&#8217;t enough then just make it even larger.</p>
<p>The large negative <code class="codecolorer text solarized-light"><span class="text">margin-bottom</span></code> then tells the browser where to render the bottom of the box (I think. Don&#8217;t quote me on that). If we had set a <code class="codecolorer text solarized-light"><span class="text">height</span></code> of the container this wouldn&#8217;t have worked, and without the negative <code class="codecolorer text solarized-light"><span class="text">margin-bottom</span></code> we would have ended up with a container over 10000px tall.</p>
<p><strong>When using this method always make sure that you set the <code class="codecolorer text solarized-light"><span class="text">margin-bottom</span></code> to be equal and negative of the <code class="codecolorer text solarized-light"><span class="text">padding-bottom</span></code>.</strong></p>
<p>And the best bit of this method? If you decide that you now want your sidebar on the right, simply set <code class="codecolorer text solarized-light"><span class="text">float: right</span></code> on the <code class="codecolorer text solarized-light"><span class="text">#sidebar</span></code> and <code class="codecolorer text solarized-light"><span class="text">float: left</span></code> on the <code class="codecolorer text solarized-light"><span class="text">#content</span></code>.</p>
<p>The post <a href="http://mattkirman.com/2009/10/12/equal-height-columns-with-pure-css/">Equal height columns with pure CSS</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2009/10/12/equal-height-columns-with-pure-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog redesign #4 (and why the WordPress Plugin API needs fixing)</title>
		<link>http://mattkirman.com/2009/10/08/blog-redesign-4-and-why-the-wordpress-plugin-api-needs-fixing/</link>
		<comments>http://mattkirman.com/2009/10/08/blog-redesign-4-and-why-the-wordpress-plugin-api-needs-fixing/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 14:18:18 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Downloads]]></category>
		<category><![CDATA[glimmer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://mattkirman.com/?p=136</guid>
		<description><![CDATA[<p>Whilst I was redesigning my blog (what do you think by the way) I decided that what I really needed to finish it off was an ajaxy live search. Now normally I would have looked for a jQuery version, but as I&#8217;ve been trying my hand at a bit of MooTools recently I decided to [...]</p><p>The post <a href="http://mattkirman.com/2009/10/08/blog-redesign-4-and-why-the-wordpress-plugin-api-needs-fixing/">Blog redesign #4 (and why the WordPress Plugin API needs fixing)</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Whilst I was redesigning my blog (what do you think by the way) I decided that what I really needed to finish it off was an ajaxy live search. Now normally I would have looked for a <a href="http://jquery.com/">jQuery</a> version, but as I&#8217;ve been trying my hand at a bit of <a href="http://mootools.net/">MooTools</a> recently I decided to write my own plugin. By the way, if you want to use it on your own site it&#8217;s available for <a href="http://github.com/mattkirman/wp-live-search">download</a> on GitHub.</p>
<p>After a few minutes hacking it together on my local web-server I had a pretty good implementation, even if I say so myself. However, once I&#8217;d installed it onto my live server it stopped returning any results. The reason for this? I had WP Super Cache installed on my live server, but not on my local server, and was messing up the JSON output by putting a comment at the bottom. Obviously, the JavaScript function refused to parse it as valid JSON. When I turned WP Super Cache off everything returned to normal.</p>
<p>As a developer this was simple enough to debug and fix, but for the average user who just wants to use WordPress, install some plugins and then start blogging away this incompatibility simply isn&#8217;t good enough. Before you know it you&#8217;ll end up with your support forums full of posts such as &#8220;<em>Your plugin doesn&#8217;t work with xxxx, please fix it</em>&#8220;, even if you have already stated this issue in your readme and installation guides.</p>
<p><span id="more-136"></span></p>
<p>Then it struck me: <strong>the WordPress Plugin API is broken</strong>.  As developers we shouldn&#8217;t have to rely on users checking that their plugins play nicely together, the plugin should know <em>before</em> it has even been activated. An excellent example of this is the <a href="http://docs.rubygems.org/">RubyGems</a> framework. I propose, therefore, <a href="http://glimmer.redflex.co.uk/">Glimmer</a> &#8211; the next-generation plugin manager for WordPress. Now, that&#8217;s a pretty bold claim to make, but I strongly believe that this is the route that WordPress ought to be going down. But just don&#8217;t take my word for it, let&#8217;s have a look at what&#8217;s planned for Glimmer Alpha 1:</p>
<dl>
<dt>Dependency checking</dt>
<dd>Utilise the hours of work carried out by other developers by building on their plugins. The user is prompted if a required plugin is missing. Glimmer can then, in some cases, automatically install missing plugins. Glimmer can even check to make sure that the correct WordPress version in installed and that certain PHP functions and extensions are available.</dd>
<dt>Incompatibility checking</dt>
<dd>Known issues with a third party plugin? Don&#8217;t rely on the user, Glimmer can warn them about possible incompatibilities before they have even activated the plugin on their site.</dd>
<dt>Easy distribution</dt>
<dd>You are no longer forced to use the WordPress hosted SVN if you want to provide automatic updates of your plugin. Glimmer uses <a href="http://connectedflow.com/appcasting/">Appcasts</a>, a RSS variant, to distribute your code from any web server. If users have already installed Glimmer they can ask it to install from the <tt>your-plugin-name.glimmer</tt> file which gets distributed with your plugin, saving them the need to upload your plugin via FTP (and potentially getting it wrong).</dd>
<dt>Awesome updates</dt>
<dd>Glimmer automatically checks for plugin updates. Better still, Glimmer supports multiple development branches (e.g. providing a legacy branch for a previous version of WordPress) and scheduling future updates via the RSS <tt>pubDate</tt> element. You can also embed any release notes in the feed to be displayed to the user <em>before</em> they update.</dd>
<dt>Glimmer is an extension, not a replacement</dt>
<dd>Users who haven&#8217;t got Glimmer installed will still be able to use your plugin but just without all the fancy features and improvements that Glimmer provides. If you want to Glimmer-ise an existing plugin simply add a <tt>your-plugin-name.glimmer</tt> file to the plugin directory.</dd>
</dl>
<p>Glimmer is open-source, it&#8217;s licensed under the <a href="http://www.opensource.org/licenses/gpl-2.0.php">GPL Licence</a>, and is <a href="http://github.com/mattkirman/glimmer">available on GitHub</a>. If you would like to contribute to Glimmer please get in touch, by leaving a comment here, messaging me on <a href="http://twitter.com/mattkirman">Twitter</a> or just send me a pull request on GitHub.</p>
<p>The post <a href="http://mattkirman.com/2009/10/08/blog-redesign-4-and-why-the-wordpress-plugin-api-needs-fixing/">Blog redesign #4 (and why the WordPress Plugin API needs fixing)</a> appeared first on <a href="http://mattkirman.com">Matt Kirman</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://mattkirman.com/2009/10/08/blog-redesign-4-and-why-the-wordpress-plugin-api-needs-fixing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Object Caching 4931/5120 objects using apc
Content Delivery Network via Rackspace Cloud Files: 49cc209416f11ec36ae6-da3c8cf2caa60cf887d388e2ad3c1707.r59.cf3.rackcdn.com

 Served from: mattkirman.com @ 2013-06-16 18:22:18 by W3 Total Cache -->