<?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>Ed Schmalzle</title>
	<atom:link href="http://www.edschmalzle.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edschmalzle.com</link>
	<description></description>
	<lastBuildDate>Fri, 23 Mar 2012 14:27:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TIL Ruby ObjectSpace#define_finalizer</title>
		<link>http://www.edschmalzle.com/2012/01/19/til-ruby-objectspacedefine_finalizer/</link>
		<comments>http://www.edschmalzle.com/2012/01/19/til-ruby-objectspacedefine_finalizer/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 22:41:43 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[TIL]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=179</guid>
		<description><![CDATA[I ran into a situation recently where I was writing a library that utilized large files. Specifically a GTFS feed parser. I wanted to cache the files away someplace so I could safely access them for the life of an object, but I didn&#8217;t want to leave them hanging around afterwards. I couldn&#8217;t do all [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into a situation recently where I was writing a library that utilized large files. Specifically a <a href="https://developers.google.com/transit/gtfs/">GTFS</a> feed parser. I wanted to cache the files away someplace so I could safely access them for the life of an object, but I didn&#8217;t want to leave them hanging around afterwards. I couldn&#8217;t do all my work inside a block passed to <code>Dir.mktmpdir</code> because I was planning on accessing the cache when necessary (not just one big up front parsing operation).</p>

<p>This got me wondering: &#8220;does Ruby have finalizers?&#8221;. It turns out it does in the form of <code>ObjectSpace#define_finalizer</code>. It&#8217;s worth mentioning that there are some tricks to using them which are nicely documented on Mike Perham&#8217;s blog <a href="http://www.mikeperham.com/2010/02/24/the-trouble-with-ruby-finalizers/">here</a>.</p>

<p>The gist of it is this: don&#8217;t create finalizers which hold a reference to the instance they&#8217;re finalizing or it just won&#8217;t work. I&#8217;m glad I found that blog post before I started coding because I would have certainly fallen into the trap he describes. It probably doesn&#8217;t help that the ruby doc examples don&#8217;t include any examples of adding a finalizer in a class definition.</p>

<p>So all of this works out pretty nicely and leaves me with code looking something like this:</p>

<script src="https://gist.github.com/1643503.js"> </script>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2012/01/19/til-ruby-objectspacedefine_finalizer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GitX and Lion</title>
		<link>http://www.edschmalzle.com/2012/01/17/gitx-and-lion/</link>
		<comments>http://www.edschmalzle.com/2012/01/17/gitx-and-lion/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:32:54 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=176</guid>
		<description><![CDATA[Currently GitX does some funny things in OS X Lion like opening two windows every time you launch the app. This is easily fixed with the following: defaults write nl.frim.GitX ApplePersistenceIgnoreState YES I tweeted about this a while ago with appropriate credit to this tweet. But finding it again in my twitter stream was a [...]]]></description>
			<content:encoded><![CDATA[<p>Currently GitX does some funny things in OS X Lion like opening two windows every time you launch the app. This is easily fixed with the following:</p>

<p><code>defaults write nl.frim.GitX ApplePersistenceIgnoreState YES</code></p>

<p>I tweeted about this a while ago with appropriate credit to <a href="https://twitter.com/#!/ronny/status/103633100206116864">this</a> tweet. But finding it again in my twitter stream was a pain so here it is for posterity.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2012/01/17/gitx-and-lion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick font reset for MacVIM</title>
		<link>http://www.edschmalzle.com/2012/01/02/quick-font-reset-for-macvim/</link>
		<comments>http://www.edschmalzle.com/2012/01/02/quick-font-reset-for-macvim/#comments</comments>
		<pubDate>Mon, 02 Jan 2012 19:19:26 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=173</guid>
		<description><![CDATA[When my eyes are tired, or if I want to put my feet up on my desk and relax while still coding I usually bump my VIM font up way high. This is nice and easy with MacVIM because the standard OS X keyboard shortcut applies (Command+Plus). The problem is, when I&#8217;m ready to go [...]]]></description>
			<content:encoded><![CDATA[<p>When my eyes are tired, or if I want to put my feet up on my desk and relax while still coding I usually bump my VIM font up way high. This is nice and easy with MacVIM because the standard OS X keyboard shortcut applies (Command+Plus). The problem is, when I&#8217;m ready to go back to my normal font size I have to hit Command+Minus a bunch of times or source my .gvimrc to get back to the normal font size.</p>

<p>I was in the middle of doing this today when I thought &#8220;man, it would be nice if I could hit Command+0 like in other apps and go back to the standard font size&#8221;. Then I realized I was using VIM and I <em>could</em> do that. So here ya go:</p>

<p><code>
nnoremap <D-0> :set guifont=Meslo\ LG\ M\ DZ:h10<CR>
</code></p>

<p>Delightful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2012/01/02/quick-font-reset-for-macvim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tpope owns my ~/.vim directory</title>
		<link>http://www.edschmalzle.com/2011/08/28/tpope-owns-my-vim-directory/</link>
		<comments>http://www.edschmalzle.com/2011/08/28/tpope-owns-my-vim-directory/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 23:10:34 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=165</guid>
		<description><![CDATA[Some people might clean their house on the weekend… I cleaned my ~/.vim directory out. What&#8217;s this? Have I ever used that? I must have just downloaded that because someone said it was cool. All is neat and tidy now, but in doing this cleanup I got a reminder of how useful tpope&#8217;s work is. [...]]]></description>
			<content:encoded><![CDATA[<p>Some people might clean their house on the weekend… I cleaned my ~/.vim directory out. What&#8217;s this? Have I ever used that? I must have just downloaded that because someone said it was cool. All is neat and tidy now, but in doing this cleanup I got a reminder of how useful <a href="http://www.twitter.com/tpope">tpope&#8217;s</a> work is. His plugins <em>dominate</em> my setup. Not only that, but they are some of the most often used. Thanks, Tim!</p>

<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.edschmalzle.com/wp-content/uploads/2011/08/vim_plugins.png" alt="Vim plugins" title="vim_plugins.png" border="0" width="600" height="445" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2011/08/28/tpope-owns-my-vim-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool GitX Feature</title>
		<link>http://www.edschmalzle.com/2010/10/27/cool-gitx-feature/</link>
		<comments>http://www.edschmalzle.com/2010/10/27/cool-gitx-feature/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 02:57:59 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=157</guid>
		<description><![CDATA[GitX shows you stage buttons for chunks of changes in a file it thinks go together which usually works out fine. What&#8217;s cool is that it also allows you to select lines with your mouse and stage them too. WIN. Selecting lines for staging in GitX from Ed Schmalzle on Vimeo.]]></description>
			<content:encoded><![CDATA[<p>GitX shows you stage buttons for chunks of changes in a file it thinks go together which usually works out fine. What&#8217;s cool is that it also allows you to select lines with your mouse and stage them too. WIN.</p>

<iframe src="http://player.vimeo.com/video/16266546" width="640" height="400" frameborder="0" style="margin: 0 auto;"></iframe>

<p><a href="http://vimeo.com/16266546">Selecting lines for staging in GitX</a> from <a href="http://vimeo.com/nerded">Ed Schmalzle</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2010/10/27/cool-gitx-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting into tmux</title>
		<link>http://www.edschmalzle.com/2010/09/29/getting-into-tmux/</link>
		<comments>http://www.edschmalzle.com/2010/09/29/getting-into-tmux/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 14:22:14 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=123</guid>
		<description><![CDATA[I had tried out screen on OS X and failed to make it stick with me as a day to day tool, but recently I started using tmux and can&#8217;t imagine going back. Some of the things that set tmux apart are it&#8217;s ability to do vertical splits w/o any screwy patches and scriptability. Installation [...]]]></description>
			<content:encoded><![CDATA[<p>I had tried out screen on OS X and failed to make it stick with me as a day to day tool, but recently I started using <a href="http://tmux.sourceforge.net/">tmux</a> and can&#8217;t imagine going back. Some of the things that set tmux apart are it&#8217;s ability to do vertical splits w/o any screwy patches and scriptability.</p>

<h2>Installation</h2>

<p>So lets start with the basics, installation. </p>

<p><pre><code>brew install tmux</code></pre></p>

<p>You can surely install this other ways, but using <a href="http://github.com/mxcl/homebrew">homebrew</a> is super easy and you should be using it anyway.</p>

<h2>Settling In</h2>

<p>Like any tool there is some stuff that I got into the config file right away to make it feel more homey. First, I switched out the default command prefix C-b for C-a. From what I&#8217;ve read the only reason C-b is the default is so that it doesn&#8217;t conflict with scree. C-b is torture for your fingers though so there&#8217;s no reason to stick with that.</p>

<p><pre><code>set-option -g prefix C-a</code></pre></p>

<p>Next, because I use vim as my editor, I told tmux to us vi mode keys.</p>

<p><pre><code>setw -g mode-keys vi</code></pre></p>

<p>Finally, I setup some bindings so that I can move around splits using the vim movement keys.</p>

<p><pre><code>
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
</code></pre></p>

<p>That&#8217;s it. That&#8217;s everything in my ~/.tmux.conf right now. Like I said I just started with tmux so I&#8217;m sure my customizations will grow but as a vim user this is what I needed to make tmux feel more like home.</p>

<h2>Basic Operation</h2>

<p>As I got into using tmux there was definitely a point at which I learned just enough so that I was comfortable using it all the time and didn&#8217;t think to myself &#8220;Why am I using this, if I was using straight terminal I could do x so easily&#8221;. </p>

<p>Here&#8217;s the rundown of my most used commands&#8230;</p>

<p>Note: I use C-a in all the examples below, but if you have a different prefix set up substitute that for C-a.</p>

<p>Creating a new session from the command line:</p>

<p><pre><code>tmux new -s my_session_name</code></pre></p>

<p>Creating a new session from within a running session:</p>

<p><pre><code>C-a :
new -s my_session_name</code></pre></p>

<p>What&#8217;s cool here is that while in tmux you can hit <code>C-a :</code> and get a tmux command prompt and execute any of the normal tmux commands.</p>

<p>Attaching to running session:</p>

<p><pre><code>tmux attach -t some_session_name</code></pre></p>

<p>or if you know you only have one running session just:</p>

<p><pre><code>tmux attach</code></pre></p>

<p>Creating new windows while in a session: </p>

<p><pre><code>C-a c</code></pre></p>

<p>Naming your current window</p>

<p><pre><code>C-a ,</code></pre></p>

<p>Switching sessions:</p>

<p><pre><code>C-a s
</code></pre></p>

<p>Entering copy-mode:</p>

<p><pre><code>C-a [</code></pre></p>

<p>A note on copy-mode&#8230; I kind of think of this as entering normal mode in vim.Being in copy mode allows you to move around the terminal just like normal mode in vim. To be honest, I&#8217;m pretty sure I&#8217;m not using copy-mode to it&#8217;s full potential yet. I mainly use it to scroll up to see things that have gone out of view in my terminal window.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2010/09/29/getting-into-tmux/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My RDoc Setup</title>
		<link>http://www.edschmalzle.com/2010/03/08/my-rdoc-setup/</link>
		<comments>http://www.edschmalzle.com/2010/03/08/my-rdoc-setup/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 04:55:40 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyGems]]></category>
		<category><![CDATA[Self Reference]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=103</guid>
		<description><![CDATA[I used to keep rdoc and ri turned off to speed up gem installs via my .gemrc config. This became problematic recently when I was planning on doing some work while traveling, and knew I wouldn&#8217;t have an always on internet connection to get my documentation fix. I recalled a post by Jason Seifer I [...]]]></description>
			<content:encoded><![CDATA[<p>I used to keep rdoc and ri turned off to speed up gem installs via my .gemrc config. This became problematic recently when I was planning on doing some work while traveling, and knew I wouldn&#8217;t have an always on internet connection to get my documentation fix. I recalled a <a href="http://jasonseifer.com/2009/02/22/offline-gem-server-rdocs">post</a> by Jason Seifer I had seen that described how to generate your docs with a better template and host them as a passenger application. I decided to use that as a starting point to getting my docs generated in a format I liked and setting things up so that they would always be generated that way.</p>

<p>Jason&#8217;s instructions tell us to install the &#8220;hanna&#8221; template via <code>gem install mislav-hanna</code> which is out of date, so we will use the most current instructions from the gems <a href="http://github.com/mislav/hanna">github page</a> to install the template. No big deal, just drop the github username from the gem install command like this&#8230;</p>

<script src="http://gist.github.com/326240.js?file=gistfile1.sh"></script>

<p>The &#8220;hanna&#8221; template absolutely kills the default rdoc template. You&#8217;ve probably seen it around being used by various projects and there&#8217;s no reason not to use it locally.</p>

<p>Next I updated my .gemrc to ignore ri and to use the &#8220;hanna&#8221; template for rdocs.</p>

<script src="http://gist.github.com/326218.js?file=gistfile1.yml"></script>

<p>Finally I re-generated my rdocs by running:</p>

<script src="http://gist.github.com/326221.js?file=gistfile1.sh"></script>

<p>I ignored the rest of the steps in the aforementioned post as I don&#8217;t really feel the need to be running a passenger instance just to serve rubygems docs. I generally just run <code>gem server</code> whenever I need to access my local docs.</p>

<p>My solution is barely more than what you get out of the box with rubygems but with just a few changes I find myself much happier with my local docs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2010/03/08/my-rdoc-setup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Readability for sane online reading</title>
		<link>http://www.edschmalzle.com/2009/11/25/readability-for-sane-online-reading/</link>
		<comments>http://www.edschmalzle.com/2009/11/25/readability-for-sane-online-reading/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:08:47 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.edschmalzle.com/?p=97</guid>
		<description><![CDATA[If Readability isn&#8217;t in your bookmark menu bar, then there is something missing. I&#8217;ve been using arc90&#8242;s Readbility bookmarklet for a while now and thought it was probably a well known thing, maybe I was wrong. Last night I showed it to some people at the B&#8217;more on Rails Open Source Hack Night and no [...]]]></description>
			<content:encoded><![CDATA[<p>If Readability isn&#8217;t in your bookmark menu bar, then there is something missing. I&#8217;ve been using arc90&#8242;s <a href="http://lab.arc90.com/experiments/readability">Readbility bookmarklet</a> for a while now and thought it was probably a well known thing, maybe I was wrong. Last night I showed it to some people at the B&#8217;more on Rails Open Source Hack Night and no one had heard of it before. So, if you&#8217;re ever bothered by reading news online surrounded by ads and extraneous content check it out. Here is a sample of what it can do&#8230;</p>

<p>Before &amp; After Readability:</p>

<div class="iPhoneScreenhotContainer">
<img src="http://www.edschmalzle.com/wp-content/uploads/2009/11/BeforeReadbility.jpg" alt="BeforeReadbility.jpg" border="0" width="400" height="252" /><img src="http://www.edschmalzle.com/wp-content/uploads/2009/11/AfterReadability.jpg" alt="AfterReadability.jpg" border="0" width="400" height="258" />
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2009/11/25/readability-for-sane-online-reading/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Deploying Sinatra with Passenger on Dreamhost</title>
		<link>http://www.edschmalzle.com/2009/06/29/deploying-sinatra-with-passenger-on-dreamhost/</link>
		<comments>http://www.edschmalzle.com/2009/06/29/deploying-sinatra-with-passenger-on-dreamhost/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 23:07:38 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[Passenger]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Sinatra]]></category>

		<guid isPermaLink="false">http://test.nerded.net/?p=12</guid>
		<description><![CDATA[If the following is true: You want to deploy a Sinatra application with Passenger on Dreamhost You&#8217;re using a Dreamhost shared hosting account You&#8217;re application relies on gems that aren&#8217;t installed globally on Dreamhost You&#8217;ve got the gems you need installed locally like this Then you&#8217;ll want to include something like this in your rackup [...]]]></description>
			<content:encoded><![CDATA[<p>If the following is true:</p>

<ol class="circle">
    <li>You want to deploy a Sinatra application with Passenger on Dreamhost</li>
    <li>You&#8217;re using a Dreamhost shared hosting account</li>
    <li>You&#8217;re application relies on gems that aren&#8217;t installed globally on Dreamhost</li>
    <li>You&#8217;ve got the gems you need installed locally like <a href="http://wiki.dreamhost.com/index.php/RubyGems">this</a></li>
</ol>

<p style="margin-top: 15px;">Then you&#8217;ll want to include something like this in your rackup file:</p>

<script src="http://gist.github.com/137958.js"></script>

<p>This will make sure your locally installed gems will be available to your application. Maybe my google skills are getting rusty, but it took me a while to find this solution. <a href="http://groups.google.com/group/phusion-passenger/browse_thread/thread/8bad6d58f88fdbe2">Here&#8217;s</a> the original source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2009/06/29/deploying-sinatra-with-passenger-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS X, Full Keyboard Access, and Web Forms</title>
		<link>http://www.edschmalzle.com/2009/05/20/os-x-full-keyboard-access-and-web-forms/</link>
		<comments>http://www.edschmalzle.com/2009/05/20/os-x-full-keyboard-access-and-web-forms/#comments</comments>
		<pubDate>Thu, 21 May 2009 01:27:42 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://test.nerded.net/?p=59</guid>
		<description><![CDATA[For a while now I&#8217;ve been frustrated to find that when tabbing through a web form in Firefox select inputs don&#8217;t gain focus. I sat down today to research what it was that they were doing wrong so that I could avoid making the same mistake, and write a post describing the issue. What I [...]]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve been frustrated to find that when tabbing through a web form in Firefox select inputs don&#8217;t gain focus. I sat down today to research what it was that they were doing wrong so that I could avoid making the same mistake, and write a post describing the issue. What I found though was that it wasn&#8217;t the sites fault or the browsers. It turns out that what I was experiencing was merely a result of an OS X setting which determines what elements on the screen are able to get focus via tabbing. The default functionality is for OS X to only let you tab onto text inputs and lists. To change this you need to go to System Preferences -> Keyboard &amp; Mouse -> Keyboard Shortcuts and then turn on &#8220;Full Keyboard Access&#8221;. What&#8217;s more is that Safari ignores this setting entirely so while browsing in Safari you can tab onto select inputs whether full keyboard access is turned on or not. Who knew?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.edschmalzle.com/2009/05/20/os-x-full-keyboard-access-and-web-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

