<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rss [<!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">]>
<rss version="2.0" xml:base="http://www.tpope.net">
<channel>
 <title>tpope.net - Geek</title>
 <link>http://www.tpope.net/taxonomy/term/3/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>Prettify Your Ruby Diffs</title>
 <link>http://www.tpope.net/node/109</link>
 <description>&lt;p&gt;
  You&#039;ve probably noticed that Git puts additional context data in the
  hunk headers: the lines that start with &lt;tt&gt;@@&lt;/tt&gt; and specify the
  line numbers where the hunk fits.  For example, in the Rails Git
  repository, &lt;kbd&gt;git show 13e7849&lt;/kbd&gt; reveals the following two lines:
&lt;/p&gt;

&lt;pre&gt;@@ -39,12 +39,7 @@ module ActionController #:nodoc:
@@ -67,6 +62,12 @@ module ActionController #:nodoc:&lt;/pre&gt;

&lt;p&gt;
  The algorithm Git uses to choose these lines is simple: search
  backwards for the first line with something other than whitespace in
  the first column, and use that.  This works great for C, but as you
  can see above, it&#039;s not quite as informative when it comes to Ruby.
  Lucky for us, it can be customized with a two step process.
&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Wed, 02 Jul 2008 01:42:55 -0400</pubDate>
</item>
<item>
 <title>OS X, OS Schmen</title>
 <link>http://www.tpope.net/node/108</link>
 <description>&lt;p&gt;
  So I&#039;ve been scratching my head about how to use
  &lt;a href=&quot;http://git.tpope.net/tpope.git&quot;&gt;all my custom config files&lt;/a&gt; when
  I&#039;m using a machine without a dedicated user account (e.g., when pair
  programming).  It recently dawned on me I could sidestep the issue by setting
  up a config directory in /tmp, pointing &lt;kbd&gt;HOME&lt;/kbd&gt; to it, and launching
  &lt;a href=&quot;http://www.gnu.org/software/screen/&quot;&gt;GNU Screen&lt;/a&gt;.  I hacked
  together &lt;a href=&quot;http://c.tpope.net/&quot;&gt; a quick script&lt;/a&gt; I could run via
  &lt;kbd&gt;curl -s http://c.tpope.net|sh&lt;/kbd&gt; that allows nearly instant setup on
  any system.  It works beautifully on Linux but trying it on OS X has revealed
  several reminders why I haven&#039;t migrated.
&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Mon, 26 May 2008 23:11:15 -0400</pubDate>
</item>
<item>
 <title>Example Git Workflows: Maintaining a Long Lived Topic Branch</title>
 <link>http://www.tpope.net/node/107</link>
 <description>&lt;p&gt;
  In our &lt;a href=&quot;/node/104&quot;&gt;previous post in the series&lt;/a&gt;, we took a
  look at how a Rails core committer could best pull in a branch
  submitted by a contributer.  Today, we&#039;re going to be looking at
  things from the opposite side:  How a contributer can best maintain a
  branch intended for pulling.
&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Sat, 19 Apr 2008 09:55:21 -0400</pubDate>
</item>
<item>
 <title>A Note About Git Commit Messages</title>
 <link>http://www.tpope.net/node/106</link>
 <description>&lt;p&gt;
  Before I continue on in my workflows series, I wanted to take a moment
  to elaborate on my earlier comments about commit messages.  I think the
  best practices for commit message formatting is one of the little
  details that makes Git great.  Understandably, some of the first commits
  to rails.git have messages of the really-long-line variety, and I want
  to expand on why this is a poor practice.
&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Sat, 19 Apr 2008 04:44:55 -0400</pubDate>
</item>
<item>
 <title>Vim Runtime files for Git</title>
 <link>http://www.tpope.net/vim-git-announcement</link>
 <description>&lt;p&gt;A few months back, I started a low profile project to create &lt;a href=&quot;http://git.tpope.net/vim-git.git&quot;&gt;a set of Vim runtime files for various Git filetypes&lt;/a&gt; that would ultimately be included with Vim.  Given the warm reception they have received, an official announcement seems prudent.  Five different filetypes are provided: &lt;tt&gt;gitcommit&lt;/tt&gt;, &lt;tt&gt;gitconfig&lt;/tt&gt;, &lt;tt&gt;gitrebase&lt;/tt&gt;, &lt;tt&gt;gitsendemail&lt;/tt&gt;, and &lt;tt&gt;git&lt;/tt&gt; (which is a generic filetype for things like &lt;kbd&gt;git log&lt;/kbd&gt; output).&lt;/p&gt;

&lt;p&gt;There&#039;s no formalized install procedure but the following shell commands should suffice:&lt;/p&gt;

&lt;pre&gt;mkdir -p ~/.vim
git archive --remote=git://git.tpope.net/vim-git.git HEAD|tar tf - -C ~/.vim&lt;/pre&gt;

&lt;p&gt;The files tagged with &lt;var&gt;v1.0&lt;/var&gt; are already slated to be included with the next Vim release, and those tagged &lt;var&gt;v2.0&lt;/var&gt; have just recently been submitted for inclusion.&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Sun, 27 Apr 2008 21:55:14 -0400</pubDate>
</item>
<item>
 <title>Example Git Workflows: Merging a Contributor via Pull</title>
 <link>http://www.tpope.net/node/104</link>
 <description>&lt;p&gt;
  Welcome to my series of articles providing example workflows for
  working with the Rails core Git repository.  My first post is designed
  for Rails core committers and explains one way to deal with
  contributions that come in the form of a Git URL and a branch name.
&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Fri, 18 Apr 2008 23:33:18 -0400</pubDate>
</item>
<item>
 <title>Best Practices for Contributing to Rails with Git</title>
 <link>http://www.tpope.net/rails-git-best-practices</link>
 <description>&lt;p&gt;
  The Ruby on Rails core is now
  &lt;a href=&quot;http://www.github.com/rails/rails&quot;&gt;hosted on Git&lt;/a&gt;.
  This is great news for Git fans like myself.  For those of Rails core
  contributors who are coming late to the party, here&#039;s a quick list of
  tips I&#039;ve put together especially for you.  This no substitute for &lt;a
    href=&quot;http://www.kernel.org/pub/software/scm/git/docs/tutorial.html&quot;&gt;a
    proper tutorial&lt;/a&gt; but rather a Rails biased supplement to one.
&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Fri, 18 Apr 2008 21:34:27 -0400</pubDate>
</item>
<item>
 <title>Easy Ruby Examples</title>
 <link>http://www.tpope.net/node/102</link>
 <description>&lt;p&gt;Today I devised a little script to generate Ruby examples showing code and output.&lt;/p&gt;

&lt;pre&gt;% &lt;kbd&gt;rubydemo &#039;[1,2,3].inject {|m,o|m+o}&#039;&lt;/kbd&gt;
[1,2,3].inject {|m,o|m+o} #=&amp;gt; 6
% &lt;kbd&gt;rubydemo 1/0&lt;/kbd&gt;
1/0 #=&amp;gt; #&amp;lt;ZeroDivisionError: divided by 0&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Here&#039;s the script I used for generation.  (It could have been one line if I didn&#039;t care so much about exception formatting.)&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/usr/bin/ruby
print ARGV.join(&amp;quot; &amp;quot;) + &amp;quot; #=&amp;gt; &amp;quot;
begin
    p(eval(ARGV.join(&amp;quot; &amp;quot;),binding,&amp;quot;(demo)&amp;quot;))
rescue Exception =&amp;gt; e
    puts &amp;quot;#&amp;lt;#{e.class}: #{e.message[/.*/]}&amp;gt;&amp;quot;
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The real killer app, though, is using it in conjunction with IRC.  Here&#039;s the alias I used in &lt;a href=&quot;http://www.irssi.org&quot;&gt;Irssi&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;kbd&gt;/alias rd exec -nosh - -out rubydemo $*&lt;/kbd&gt;&lt;/pre&gt;

&lt;p&gt;Now I need merely do &lt;kbd&gt;/rd 2+2&lt;/kbd&gt; to get a beautifully formatted &lt;code&gt;2+2 #=&amp;gt; 4&lt;/code&gt; in any conversation.&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Fri, 04 May 2007 00:40:30 -0400</pubDate>
</item>
<item>
 <title>Auto-loading Ruby Code</title>
 <link>http://www.tpope.net/node/101</link>
 <description>&lt;p&gt;An incredibly useful technique when using Ruby is to auto-load at start-up a custom library written for exactly that purpose.  This is easy to accomplish with a couple of environment variables, but I see very little discussion on the subject.  Thus, I&#039;ve written a nice summary of how to go about setting this up.&lt;/p&gt;
</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Sun, 11 Feb 2007 20:35:55 -0500</pubDate>
</item>
<item>
 <title>Website for rails.vim</title>
 <link>http://www.tpope.net/node/99</link>
 <description>&lt;p&gt;The Rails plugin for Vim now has &lt;a href=&quot;http://rails.vim.tpope.net/&quot;&gt;an official website&lt;/a&gt;.  Coinciding with this announcement is a &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1567&quot;&gt;new release of &lt;tt&gt;rails.vim&lt;/tt&gt;&lt;/a&gt;.  Things have come a long way in the last six months.&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Fri, 05 Jan 2007 18:12:24 -0500</pubDate>
</item>
<item>
 <title>Announcing surround.vim</title>
 <link>http://www.tpope.net/node/97</link>
 <description>&lt;p&gt;
  Recently, when crafting some HTML macros for &lt;a href=&quot;http://www.vim.org&quot;&gt;Vim&lt;/a&gt;, I had a profound idea for a general interface to deal with pairs of parentheses, quotes, HTML tags, and just about anything else.  After a few hours work, I had an early version of &lt;tt&gt;surround.vim&lt;/tt&gt;, a Vim plugin which allows one to easily add, remove, and change what I have termed &quot;surroundings.&quot;  This is perhaps the most useful plugin I have written since &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1567&quot;&gt;rails.vim&lt;/a&gt; (which recently had an update, by the way).  Examples of use of &lt;tt&gt;surround.vim&lt;/tt&gt;, along with a link to download, are &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1697&quot;&gt;available from vim.org&lt;/a&gt;.  The development version can also be &lt;a href=&quot;http://git.tpope.net/tpope.git/blobs/.vim/plugin/surround.vim&quot;&gt;snagged from my CVS repository&lt;/a&gt;. 
&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Sat, 26 Apr 2008 00:42:32 -0400</pubDate>
</item>
<item>
 <title>Rails Plugin for Vim</title>
 <link>http://www.tpope.net/node/96</link>
 <description>&lt;p&gt;Recently, I&#039;ve been working on a &lt;a href=&quot;http://www.vim.org/&quot;&gt;Vim&lt;/a&gt; plugin to aid development with &lt;a href=&quot;http://www.rubyonrails.com/&quot;&gt;Ruby on Rails&lt;/a&gt;.  It features autodetection of Rails applications, easy file navigation, enhanced syntax highlighting, and more.  Grab it from &lt;a href=&quot;http://svn.tpope.net/rails/vim/railsvim&quot;&gt;my Subversion repository&lt;/a&gt; (always the most up-to-date), as a &lt;a href=&quot;http://tpope.us/rails.zip&quot;&gt;zip file&lt;/a&gt;, or as a &lt;a href=&quot;http://tpope.us/rails.vba&quot;&gt;Vimball&lt;/a&gt; (Vim 7 only).
&lt;strong&gt;&lt;em&gt;Update:&lt;/em&gt;&lt;/strong&gt; Also &lt;a href=&quot;http://www.vim.org/scripts/script.php?script_id=1567&quot;&gt;available from Vim.org&lt;/a&gt; (and has been for a while).  Be sure to vote if you like it!&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Thu, 12 Oct 2006 01:26:30 -0400</pubDate>
</item>
<item>
 <title>Relational Schema Diagramming</title>
 <link>http://www.tpope.net/node/91</link>
 <description>&lt;p&gt;Recently, for a class, I was required to create a whole bunch of diagrams relational schema in a format specified in a textbook.  While &lt;a href=&quot;node/90&quot;&gt;the format looks simple&lt;/a&gt;, it is apparently so obscure that no software exists that can easily reproduce it.  I responded by &lt;a href=&quot;http://git.tpope.net/tpope-extra.git/blobs/perl/relational-schema&quot;&gt;creating my own.&lt;/a&gt;  While this script is somewhat lacking in both functionality and user-friendliness, it might prove to be a good foundation for similar projects.&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Tue, 27 Sep 2005 23:28:24 -0400</pubDate>
</item>
<item>
 <title>Schedule Processing</title>
 <link>http://www.tpope.net/node/87</link>
 <description>&lt;p&gt;Not content with my last solution for retrieving my schedule, I came up with a new one.  Both my original script (&lt;a href=&quot;http://git.tpope.net/tpope-extra.git/blobs/perl/sctweb&quot;&gt;sctweb&lt;/a&gt;) and my more recent one (&lt;a href=&quot;http://git.tpope.net/tpope-extra.git/blobs/perl/sct6&quot;&gt;sct6&lt;/a&gt;) have been modified to only produce XML output.  My brand new script (&lt;a href=&quot;http://git.tpope.net/tpope-extra.git/blobs/perl/schedproc&quot;&gt;schedproc&lt;/a&gt;) reads in that XML and converts it to the usual formats like HTML and vCalendar.  This seperates the website-parsing backend from the content-producing frontend, which should ease maintenance in the future.&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Wed, 31 May 2006 18:08:44 -0400</pubDate>
</item>
<item>
 <title>Another Schedule Retrieval Announcement</title>
 <link>http://www.tpope.net/node/86</link>
 <description>&lt;p&gt;No sooner had I finished updating my schedule retrieval script to work with my new school than I discovered said school was migrating to a new web interface, rendering my efforts obsolete before I even finished testing them.  This week, I finally addressed the situation, creating a &lt;a href=&quot;http://git.tpope.net/tpope-extra.git/blobs/perl/sct6&quot;&gt;new script&lt;/a&gt;, as opposed to further hacking the old one, since the changes I had to implement were much more drastic this time around. Like last time, this script will be lacking in grade retrieval support until I have some actual grades to retrieve. (I have since added grade support to the &lt;a href=&quot;http://git.tpope.net/tpope-extra.git/blobs/perl/sctweb&quot;&gt;old script&lt;/a&gt;, for what little good that does.)&lt;/p&gt;</description>
 <category domain="http://www.tpope.net/taxonomy/term/3">Geek</category>
 <pubDate>Wed, 31 May 2006 18:08:28 -0400</pubDate>
</item>
</channel>
</rss>
