<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>Eric Goodwin - Home</title>
  <id>tag:blog.ericgoodwin.com,2008:mephisto/</id>
  <generator version="0.7.2" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://blog.ericgoodwin.com/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://blog.ericgoodwin.com/" rel="alternate" type="text/html"/>
  <updated>2008-07-15T16:40:53Z</updated>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-07-15:7309</id>
    <published>2008-07-15T16:29:00Z</published>
    <updated>2008-07-15T16:40:53Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/7/15/rouxbe-cooking-school-launched" rel="alternate" type="text/html"/>
    <title>Rouxbe Cooking School Launched</title>
<content type="html">
            &lt;p&gt;I've been working with the great team at &lt;a href='http://rouxbe.com'&gt;Rouxbe&lt;/a&gt; for almost a year now.  They are an online video recipe site that do an amazing job at showing you how to cook through their high quality video recipes and technique drilldowns. &lt;/p&gt;
&lt;p&gt;Yesterday we hit another milestone with the release of the first online &lt;a href='http://http://rouxbe.com/school'&gt;cooking school&lt;/a&gt;. The production team is still working away on more lessons that are going to be released soon, but so far the content is looking great. If you're interested in food, I would highly suggest you check it out. There is one &lt;a href='http://rouxbe.com/school/sections/81/objectives'&gt;free lesson&lt;/a&gt; that you don't even need to be logged in to check out.&lt;/p&gt;
&lt;p&gt;Happy cooking!&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-06-06:6775</id>
    <published>2008-06-06T23:41:00Z</published>
    <updated>2008-06-06T23:42:08Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/6/6/apricado-independent-music-store" rel="alternate" type="text/html"/>
    <title>Apricado - Independent Music Store</title>
<content type="html">
            For the past while I've been working on Apricado, with a few other friends. Apricado is a easy to use independent music store. No crazy features, just features that you need to get going. It's almost ready to launch now so we've released a little preview of how easy it is to create and sell music on the site. You can check out the full size preview on &lt;a href='http://www.apricado.com'&gt;apricado.com&lt;/a&gt;, or watch the embedded version on the blog here. Please let us know what you think. Thanks.&lt;br /&gt;
&amp;lt;center&gt;
&amp;lt;object height='267' width='400'&gt;	&amp;lt;param name='allowfullscreen' value='true' /&gt;	&amp;lt;param name='allowscriptaccess' value='always' /&gt;	&amp;lt;param name='movie' value='http://www.vimeo.com/moogaloop.swf?clip_id=1129105&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1' /&gt;	&amp;lt;embed allowfullscreen='true' type='application/x-shockwave-flash' src='http://www.vimeo.com/moogaloop.swf?clip_id=1129105&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=00ADEF&amp;amp;fullscreen=1' allowscriptaccess='always' height='267' width='400'&gt;&amp;lt;/embed&gt;&amp;lt;/object&gt;
&amp;lt;/center&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-04-25:6075</id>
    <published>2008-04-25T16:12:00Z</published>
    <updated>2008-04-25T16:13:59Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/4/25/gitignore-snippet" rel="alternate" type="text/html"/>
    <title>.gitignore snippet</title>
<content type="html">
            &lt;p&gt;I found this handy little snippet on &lt;a href='http://github.com'&gt;github&lt;/a&gt; yesterday when I was looking through some of the rails commits.&lt;/p&gt;
&lt;p&gt;Git won't add a folder unless there is something in it. If you want to commit an empty folder, the common practice is to add a .gitignore file in the directory.&lt;/p&gt;
This snippet will add .gitignore files to all empty directories recursively from your current directory.
&lt;pre&gt;
~ &gt; find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;
&lt;/pre&gt;
&lt;p&gt;
Thanks to &lt;a href='http://github.com/nate'&gt;Nate&lt;/a&gt; for sharing. You can view the commit where he added this snippet in the comments &lt;a href='http://github.com/rails/rails/commit/6ccfc0ebdedb53794c4981521c4299d842caf896'&gt;here&lt;/a&gt;.
&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-04-17:5909</id>
    <published>2008-04-17T17:45:00Z</published>
    <updated>2008-04-17T20:35:30Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/4/17/my-most-used-commands" rel="alternate" type="text/html"/>
    <title>What Commands Have You Been Using Lately</title>
<content type="html">
            This nice little script has been cruising the web lately. Here&#8217;s my results.
&lt;pre&gt;
~ &amp;gt; history | awk {'print $2'} | sort | uniq -c | sort -k1 -rn | head
 218 git
  90 gst
  26 rake
  21 ls
  20 cd
  15 cap
  12 mate
  11 gca
  11 gb
  10 rm
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-04-10:5715</id>
    <published>2008-04-10T05:35:00Z</published>
    <updated>2008-04-10T05:37:53Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/4/10/auto-completion-with-git" rel="alternate" type="text/html"/>
    <title>Git Auto Completion On OS X</title>
<content type="html">
            &lt;p&gt;&lt;img src='/assets/2008/4/10/auto.png' /&gt;&lt;/p&gt;

&lt;p&gt;It may be a little hidden but Git actually comes with auto completion, you just have to set it up.&lt;/p&gt;

&lt;p&gt;If you have the Git source on your computer then you are good to go. If not, you are going to have to download it. After downloading Git we are going to copy the git-completion bash file from the contrib/completion directory into our home directory, prepending it with a period so that it's hidden.&lt;/p&gt;
&lt;pre&gt;
~ &gt; git clone git://git.kernel.org/pub/scm/git/git.git git
~ &gt; cp git/contrib/completion/git-completion.bash ~/.git-completion.bash
&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;Depending on how you've setup your bash startup files the next couple of steps may differ. If you want a great guide on setting up your bash startup files, &lt;a href='http://blog.infinitered.com/entries/show/4'&gt;check out this article&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The first thing we are going to do is include git-completion.bash in our ~/.bash_profile. Look for the .bashrc source include and put git-completion right before it. 
&lt;pre&gt;
# ~/.bash_profile
source ~/.git-completion.bash
source ~/.bashrc
&lt;/pre&gt;

&lt;p&gt;Now you just need to reload the bash_profile and auto complete is ready to go.&lt;/p&gt;

&lt;pre&gt;
~ &gt; . ~/.bash_profile
&lt;/pre&gt;

&lt;p&gt;Wasn't that easy. While we're messing around in the bash startup files though, why don't we add another great little feature. Git-completion.bash includes a method (__git_ps1) to find your current branch and print out it's name. We are going to append the branch name to our command prompt so we can always tell what branch we are working in.&lt;/p&gt;

&lt;p&gt;Open your .bashrc files and search for the 'export PS1' line and replace it with the following.&lt;/p&gt;
&lt;pre&gt;
# ~/.bashrc
export PS1='\w$(__git_ps1 &quot;(%s)&quot;) &gt; '
&lt;/pre&gt;

&lt;p&gt;After reloading your ~/.bashrc you will have your branch names showing up in the command prompt whenever you are in a Git project. No need to call git-branch to see what branch you are in anymore.&lt;/p&gt;

&lt;pre&gt;
~/projects/TestGit(master) &gt; git checkout rails20 
Switched to branch &quot;rails20&quot;
~/projects/TestGit(rails20) &gt;
&lt;/pre&gt;

&lt;p&gt;If you run into any trouble, check out the git-completion.bash file. It has some good instructions on how to use it at the top of the file.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-04-07:5626</id>
    <published>2008-04-07T02:00:00Z</published>
    <updated>2008-04-07T02:01:57Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/4/7/the-best-laptop-bag" rel="alternate" type="text/html"/>
    <title>The Best Laptop Bag</title>
<content type="html">
            &lt;p&gt;Just under two years ago I was searching for a birthday present for my girlfriend. The bag that she used for school everyday was starting to fall apart so a new bag seemed in order. I started a search for the perfect bag and made up a list of criteria.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It must be well made and durable&lt;/li&gt;
&lt;li&gt;It must have lots of space for textbooks&lt;/li&gt;
&lt;li&gt;It must have a laptop pocket&lt;/li&gt;
&lt;li&gt;It must look good and have some style to it&lt;/li&gt;
&lt;li&gt;It can't be girly. I will probably end up carrying it every once in a while and I don't want to feel silly doing it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After a busy afternoon downtown I had narrowed the playing field down to three pretty nice bags.&lt;/p&gt;

&lt;p&gt;The first was the &lt;a href='http://www.ortliebusa.com/cartgenie/prodInfo.asp?pid=78&amp;cid=2'&gt;Otrlieb Sling-It&lt;/a&gt;. I had owned this bag for the previous 3 years and it was still going strong. It had a laptop sleeve and an easy velcro closure system. The design was pretty simple and elegant, but a little too 'bicycle messenger' for what I was looking for. For $132 US, it was a great bag, but not the perfect one.&lt;/p&gt;

&lt;p&gt;
The second bag that I looked at was the &lt;a href='http://www.timbuk2.com/tb2/products/messenger-messenger'&gt;Timbuk2 Messenger&lt;/a&gt;. It had lots of space, a sleeve for the laptop and looked really well put together. The design seemed cluttered though, with straps and pockets all over the place. The two big plastic snaps on the font looked a bit cheap, and tri-panel fabric cut, didn't really do it for me either. Prices ranged from $120 - $210 US. 
&lt;/p&gt;

&lt;p&gt;The bag that I finally ended up deciding on was the &lt;a href='http://www.jackspade.com/shop/home.php?cat=306'&gt;Jack Spade Laptop Tech Field Bag&lt;/a&gt;. It blended all the elements that I was looking for into one bag. It was sleek and stylish, very functional and well made. It came with custom die cast hardware (no plastic anywhere on it) and had lots of room for papers and books. It was a bit more expensive than the other bags, running from $195 - $425 US but looked like it was worth the higher price tag.&lt;/p&gt;

&lt;p&gt;
&lt;img src='/assets/2008/4/6/jackspade.png' /&gt;
&lt;/p&gt;

&lt;p&gt;After giving it to my girlfriend for her birthday I think I made it a couple days before I went out and bought myself the same bag but in a different color. It's been over a year and a half now and the bag is still holding up great.&lt;/p&gt;

&lt;p&gt;While checking out the Jack Spade site recently I also found out that they've starting to &lt;a href='http://www.jackspade.com/shop/apple_stores.php'&gt;sell their bags at Apple Stores&lt;/a&gt;.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-04-06:5600</id>
    <published>2008-04-06T03:07:00Z</published>
    <updated>2008-04-12T06:36:21Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/4/6/pushing-and-pulling-branches-on-github" rel="alternate" type="text/html"/>
    <title>Pushing and Pulling Branches on Github</title>
<content type="html">
            So you have multiple branches on your local machine and now you want to share one or more with the other developers on your project.
You can let everyone know your IP address and have them connect to your computer directly or if you're using &lt;a href='http://github.com'&gt;GitHub&lt;/a&gt;, you can push your branches up to it, and then the other developers can pull your newly shared branches from there.&lt;br /&gt;
Heres the a few commands that you are going to need to know.

&lt;pre&gt;
# Push your local branch to GitHub
git push origin &amp;lt;local branch name&amp;gt;:refs/heads/&amp;lt;remote branch name&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Just by pushing your branch to a remote server doesn't mean that you are tracking it. You'll need to add the branch to your git config or you can delete the branch and then create a new one that is linked to the remote one with the following command.&lt;/p&gt;

&lt;pre&gt;
# Create a new local branch that tracks a remote branch. 
# If you already have a branch of the same name, delete it 
# first and then recreate the branch from the remote repository.
git branch -f &amp;lt;local branch name&amp;gt; origin/&amp;lt;remote branch name&amp;gt;
&lt;/pre&gt;

&lt;p&gt;Now others can pull your branch from GitHub.&lt;/p&gt;
&lt;pre&gt;
# Create a new local branch that tracks a remote branch
git branch &amp;lt;local branch name&amp;gt; origin/&amp;lt;remote branch name&amp;gt;
&lt;/pre&gt;
&lt;p&gt;
&amp;lt;strike&gt;One thing to note is that you cannot delete a remote branch from your local machnine, and as far as I've seen, &lt;a href='http://github.com'&gt;GitHub&lt;/a&gt; doesn't have a gui to delete a branch online.&amp;lt;/strike&gt;
&lt;pre&gt;
# Delete a remote branch off the remote server
git push origin :&amp;lt;remote branch name&amp;gt;
&lt;/pre&gt;

&lt;br /&gt;You can however, remove the branch from your remote branches listing.&lt;/p&gt;
&lt;pre&gt;
# Stop tracking a remote branch
git branch -d -r origin/&amp;lt;remote branch name&amp;gt;
&lt;/pre&gt;

&lt;p&gt;For some other great tips on using Git, &lt;a href='http://wiki.sourcemage.org/Git_Guide'&gt;check out this wiki&lt;/a&gt;.

&lt;p&gt;Thanks to Dustin (in the comments) for pointing out this shortcut.  If your want the remote branch to be named the same as your local branch you can use the following.&lt;/p&gt;
&lt;pre&gt;
# Push your local branch to GitHub
git push origin &amp;lt;local branch name&amp;gt;
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-03-31:5472</id>
    <published>2008-03-31T19:34:00Z</published>
    <updated>2008-04-06T22:31:57Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/3/31/gitty-migrations-gets-even-simpler" rel="alternate" type="text/html"/>
    <title>Gitty Migrations Get Even Simpler</title>
<content type="html">
            &lt;p&gt;Most of the time when you commit a migration, you'll want to run that migration against the code base you have when you check that migration is. To make this simpler to do, all you have to do is call use_git and gitty migrations with automatically find that revision for you.&lt;/p&gt;
&lt;p&gt;Here's an updated example on how to use gitty migrations&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;23&lt;tt&gt;
&lt;/tt&gt;24&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;class&lt;/span&gt; &lt;span class='cl'&gt;ResetAllAccountTypes&lt;/span&gt; &amp;lt; &lt;span class='co'&gt;ActiveRecord&lt;/span&gt;::&lt;span class='co'&gt;Migration&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;tt&gt;
&lt;/tt&gt;  use_git&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='c'&gt;# or &lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='c'&gt;# use_git :revision =&amp;gt; &amp;quot;42ca6c6de8cbd6591dcada7437c97&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='c'&gt;# or&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='c'&gt;# use_git :revision =&amp;gt; &amp;quot;v2.0&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.up&lt;tt&gt;
&lt;/tt&gt;    add_column &lt;span class='sy'&gt;:user&lt;/span&gt;, &lt;span class='sy'&gt;:account&lt;/span&gt;, &lt;span class='sy'&gt;:integer&lt;/span&gt;, &lt;span class='sy'&gt;:null&lt;/span&gt; =&amp;gt; &lt;span class='pc'&gt;false&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='co'&gt;User&lt;/span&gt;.find(&lt;span class='sy'&gt;:all&lt;/span&gt;).each &lt;span class='r'&gt;do&lt;/span&gt; |user|&lt;tt&gt;
&lt;/tt&gt;      user.account = &lt;span class='r'&gt;case&lt;/span&gt; user.account_type&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;when&lt;/span&gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;Free&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; : &lt;span class='co'&gt;Account&lt;/span&gt;::&lt;span class='co'&gt;Types&lt;/span&gt;::&lt;span class='co'&gt;Free&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;when&lt;/span&gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;Paid&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; : &lt;span class='co'&gt;Account&lt;/span&gt;::&lt;span class='co'&gt;Types&lt;/span&gt;::&lt;span class='co'&gt;Paid&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;else&lt;/span&gt; &lt;span class='co'&gt;Account&lt;/span&gt;::&lt;span class='co'&gt;Types&lt;/span&gt;::&lt;span class='co'&gt;Unknown&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    remove_column &lt;span class='sy'&gt;:user&lt;/span&gt;, &lt;span class='sy'&gt;:account_type&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.down&lt;tt&gt;
&lt;/tt&gt;    ...&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;&lt;a href='http://github.com/ericgoodwin/gitty-migrations' class='button'&gt;&lt;span class='github'&gt;Download it from GitHub&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2008-03-20:4622</id>
    <published>2008-03-20T18:19:00Z</published>
    <updated>2008-04-06T22:31:37Z</updated>
    <link href="http://blog.ericgoodwin.com/2008/3/20/gitty-migrations" rel="alternate" type="text/html"/>
    <title>Gitty Migrations Plugin for Rails</title>
<content type="html">
            &lt;p&gt;Migrations make it super easy to work with your database in Rails, with only a few small problem that I've run across.&lt;/p&gt;
&lt;p&gt;&lt;span class='highlight'&gt;Certain migrations rely on specific changelists&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Most of the time, this is because you're dealing with a legacy database that you are trying to clean up and you are moving data around. You want everyone to get the changes, but don't want to rely on people running a rake task at a certain revision to implement the changes. To get around this we sometimes redefine a class in the migration to override the newer, updated class of the same name in our application. But what if we didn't have to do this, what if we could just tell the migration what revision or changelist the migration should run against and let it run. This is where &lt;a href='http://github.com/ericgoodwin/gitty-migrations/tree/master'&gt;gitty migrations&lt;/a&gt; would come in.
&lt;/p&gt;
&lt;p&gt;Here's how it's done. &lt;i&gt;(this example was just done for the purpose of showing how the plugin works)&lt;/i&gt;&lt;/p&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;14&lt;tt&gt;
&lt;/tt&gt;15&lt;tt&gt;
&lt;/tt&gt;16&lt;tt&gt;
&lt;/tt&gt;17&lt;tt&gt;
&lt;/tt&gt;18&lt;tt&gt;
&lt;/tt&gt;19&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;20&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;21&lt;tt&gt;
&lt;/tt&gt;22&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;class&lt;/span&gt; &lt;span class='cl'&gt;ResetAllAccountTypes&lt;/span&gt; &amp;lt; &lt;span class='co'&gt;ActiveRecord&lt;/span&gt;::&lt;span class='co'&gt;Migration&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;tt&gt;
&lt;/tt&gt;  use_git_revision &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;42ca6c6de8cbd6591dcada7437c97000839e8074&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='c'&gt;# or if you've used git-tag to tag your revision&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='c'&gt;# use_git_revision &amp;quot;v2.0&amp;quot;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;   &lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.up&lt;tt&gt;
&lt;/tt&gt;    add_column &lt;span class='sy'&gt;:user&lt;/span&gt;, &lt;span class='sy'&gt;:account&lt;/span&gt;, &lt;span class='sy'&gt;:integer&lt;/span&gt;, &lt;span class='sy'&gt;:null&lt;/span&gt; =&amp;gt; &lt;span class='pc'&gt;false&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='co'&gt;User&lt;/span&gt;.find(&lt;span class='sy'&gt;:all&lt;/span&gt;).each &lt;span class='r'&gt;do&lt;/span&gt; |user|&lt;tt&gt;
&lt;/tt&gt;      user.account = &lt;span class='r'&gt;case&lt;/span&gt; user.account_type&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;when&lt;/span&gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;Free&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; : &lt;span class='co'&gt;Account&lt;/span&gt;::&lt;span class='co'&gt;Types&lt;/span&gt;::&lt;span class='co'&gt;Free&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;when&lt;/span&gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;Paid&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; : &lt;span class='co'&gt;Account&lt;/span&gt;::&lt;span class='co'&gt;Types&lt;/span&gt;::&lt;span class='co'&gt;Paid&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='r'&gt;else&lt;/span&gt; &lt;span class='co'&gt;Account&lt;/span&gt;::&lt;span class='co'&gt;Types&lt;/span&gt;::&lt;span class='co'&gt;Unknown&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    remove_column &lt;span class='sy'&gt;:user&lt;/span&gt;, &lt;span class='sy'&gt;:account_type&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.down&lt;tt&gt;
&lt;/tt&gt;    ...&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Now whenever a developer runs this migration, it will check out that revision of git, run the migration against it, and then change your git repository back to where it was. If in the future you decide to use an account type table instead of an enum and change all your code, this migration will still work.&lt;/p&gt;
&lt;p&gt;&lt;a href='http://github.com/ericgoodwin/gitty-migrations' class='button'&gt;&lt;span class='github'&gt;Download it from GitHub&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;
TODO
&lt;ul&gt;
&lt;li&gt;If you don't set a revision have it automatically use the revision you checked the migration in on.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;Thoughts or comments? Have a better way of dealing with this. Let me know.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2006-12-19:99</id>
    <published>2006-12-19T05:36:00Z</published>
    <updated>2006-12-19T05:37:37Z</updated>
    <link href="http://blog.ericgoodwin.com/2006/12/19/unexpected-error-0x8ffe2740-occurred" rel="alternate" type="text/html"/>
    <title>Fun with IIS : Unexpected Error 0x8ffe2740 Occurred</title>
<content type="html">
            I installed IIS on my computer the other day because I'm doing some work for a client who is using ASP. When I tried to start up the server, I got this error message &lt;strong&gt;'Unexpected Error 0x8ffe2740 Occurred'&lt;/strong&gt;. Having no idea what error 0x8ffe2740 was I hit up google for some answers. Turns out Error 0x8ffe2740 means &lt;span class='highlight'&gt;Port already in use&lt;/span&gt;. It would have been nice if they had just supplied a simple explanation in there error message. Is that too much to ask for?&lt;br /&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2006-12-07:96</id>
    <published>2006-12-07T19:16:00Z</published>
    <updated>2006-12-08T00:12:41Z</updated>
    <link href="http://blog.ericgoodwin.com/2006/12/7/vicruby-com-victoria-ruby-users-group" rel="alternate" type="text/html"/>
    <title>vicruby.com - Victoria Ruby Users Group</title>
<content type="html">
            I was talking with &lt;a href='http://matharvard.com/'&gt;Mat Harvard&lt;/a&gt; on gtalk last night and the idea of starting a Victoria Ruby Users Group came up. I had bought &lt;a href='http://vicruby.com'&gt;vicruby.com&lt;/a&gt; quite a while ago but hadn't had the time to develop it so I quickly whipped up a template for &lt;a href='http://stikipad.com/'&gt;stikipad&lt;/a&gt;, changed my DNS and we now have a wiki for the newly formed 'Victoria Ruby Users Group'. We'll see how it goes. Not sure what the interest is going to be like in Victoria. It's not that big of a place. Hopefully we will have our first meeting in the new year. Talk/presentation ideas anyone?
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2006-12-05:92</id>
    <published>2006-12-05T05:34:00Z</published>
    <updated>2007-01-09T23:27:30Z</updated>
    <category term="the liquid chronicles"/>
    <link href="http://blog.ericgoodwin.com/2006/12/5/the-liquid-chronicles-the-setup" rel="alternate" type="text/html"/>
    <title>The Liquid Chronicles - The Setup</title>
<content type="html">
            I've been playing with &lt;a href='http://home.leetsoft.com/liquid/'&gt;liquid templates&lt;/a&gt; in &lt;a href='http://rubyonrails.org'&gt;rails&lt;/a&gt; now for about a month. When I first started there wasn't a great deal of nice, easy to follow, step by step tutorials. There are a few good wiki's but putting all the information together can be a bit quite a bit of work.&lt;span class='highlight'&gt;This guide is meant to be super simple and easy to follow&lt;/span&gt;. It will be a start to finish guide on how to install and use liquid in you ruby on rails application. This is part one. Enjoy!&lt;br /&gt;

First let's create our project and add the liquid rails plugin.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# cd /rails
server:/# rails liquid
server:/# cd liquid/vendor/plugins
server:/# svn export svn://home.leetsoft.com/liquid/trunk/liquid/
server:/# cd ../../
server:/# rake rails:freeze:edge
server:/# ruby script/server&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

After starting the server you should be able to see the default rails page.&lt;br /&gt;
Now that you have your server up and running create your database and add the right settings to your database.yml.&lt;br /&gt;
Now let's get rid of the default rails page and add a couple routes so we'll be able to see our new page that we are going to create a bit later.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# rm public/index.html
server:/# pico config/routes.rb&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

Add the following lines to the routes.rb file.&lt;br /&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;map.resources &lt;span class='sy'&gt;:posts&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;map.connect &lt;span class='s'&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;/span&gt;, &lt;span class='sy'&gt;:controller&lt;/span&gt; =&amp;gt; &lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;posts&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;

Now we need to create our database table. We are going to create a super simple blog, so let's add a posts table.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# cd db
server:/# mkdir migrate
server:/# cd migrate
server:/# pico 001_create_posts.rb&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

Here is our code for the migration&lt;br /&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;13&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='r'&gt;class&lt;/span&gt; &lt;span class='cl'&gt;CreatePosts&lt;/span&gt; &amp;lt; &lt;span class='co'&gt;ActiveRecord&lt;/span&gt;::&lt;span class='co'&gt;Migration&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.up&lt;tt&gt;
&lt;/tt&gt;    create_table &lt;span class='sy'&gt;:posts&lt;/span&gt; &lt;span class='r'&gt;do&lt;/span&gt; |t|&lt;tt&gt;
&lt;/tt&gt;      t.column &lt;span class='sy'&gt;:title&lt;/span&gt;, &lt;span class='sy'&gt;:string&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      t.column &lt;span class='sy'&gt;:body&lt;/span&gt;, &lt;span class='sy'&gt;:text&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;      t.column &lt;span class='sy'&gt;:created_at&lt;/span&gt;, &lt;span class='sy'&gt;:datetime&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;    &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;def&lt;/span&gt; &lt;span class='pc'&gt;self&lt;/span&gt;.down&lt;tt&gt;
&lt;/tt&gt;    drop_table &lt;span class='sy'&gt;:posts&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='r'&gt;end&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='r'&gt;end&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;

Now lets run a migration to generate the table in our database. After that we'll create our post resource and then restart the server to make sure that everything is still working properly.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# rake db:migrate
server:/# ruby script/generate scaffold_resource post
server:/# ruby script/server&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

You should now be able to go to http://localhost:3000 and see the scaffolding for your new site. Now all we have to do is add some liquid.&lt;br /&gt;
Let's edit our posts controller first.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# pico app/controllers/posts_controller.rb&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

In the index method let's change the default find statement.&lt;br /&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='c'&gt;#@posts = Post.find(:all)&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='iv'&gt;@posts&lt;/span&gt; = &lt;span class='co'&gt;Post&lt;/span&gt;.find(&lt;span class='sy'&gt;:all&lt;/span&gt;).collect(&amp;amp;&lt;span class='sy'&gt;:attributes&lt;/span&gt;)&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;

This last line might be a bit confusing. Basically all that it is doing is grabbing all of our posts and then creating hashes for each one with all of its attributes. Since liquid likes to use hashes we need to do this conversion.&lt;br /&gt;
Now that we have some hashes to work with we need to create our liquid view.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# cd app/views/post
server:/# mv index.rhtml index.liquid
server:/# pico index.liquid&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

We're going to simplify our index view a little and take out all the editing capabilities and add some liquid methods. For liquid syntax, &lt;a href='http://mephistoblog.com/docs/templates/using-liquid-templates'&gt;
check out this site&lt;/a&gt;.&lt;br /&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='ta'&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Our Posts&lt;span class='ta'&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;div&lt;/span&gt; &lt;span class='an'&gt;id&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;posts&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class='ta'&gt;&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;{% for post in posts %}&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='ta'&gt;&amp;lt;div&lt;/span&gt; &lt;span class='an'&gt;class&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;post&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class='ta'&gt;&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;                &lt;span class='ta'&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;{{ post.title }}&lt;span class='ta'&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;                &lt;span class='ta'&gt;&amp;lt;p&lt;/span&gt; &lt;span class='an'&gt;class&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;date&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class='ta'&gt;&amp;gt;&lt;/span&gt;{{ post.created_at | date:&amp;quot;%b %d, %Y&amp;quot; }}&lt;span class='ta'&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;                &lt;span class='ta'&gt;&amp;lt;p&amp;gt;&lt;/span&gt;{{ post.body }}&lt;span class='ta'&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;        &lt;span class='ta'&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;{% endfor %}&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;

Ok .. now that that's all done we can add a couple records to the database. When we restart the server we should be able to see the records.
We should probably add our main layout as a liquid template as well. &lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# pico app/controllers/posts_controller.rb&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

Add this line just after the class definition&lt;br /&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;layout &lt;span class='s'&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;span class='k'&gt;default&lt;/span&gt;&lt;span class='dl'&gt;'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;

Now we just have to make the default liquid template in our views/layout directory.&lt;br /&gt;

&lt;pre&gt;&lt;code&gt;server:/# pico app/views/layouts/default.liquid&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;

Here is what we're going to start with.&lt;br /&gt;

&lt;table class='CodeRay'&gt;&lt;tr&gt;
  &lt;td title='click to toggle' class='line_numbers'&gt;&lt;pre&gt;1&lt;tt&gt;
&lt;/tt&gt;2&lt;tt&gt;
&lt;/tt&gt;3&lt;tt&gt;
&lt;/tt&gt;4&lt;tt&gt;
&lt;/tt&gt;5&lt;tt&gt;
&lt;/tt&gt;6&lt;tt&gt;
&lt;/tt&gt;7&lt;tt&gt;
&lt;/tt&gt;8&lt;tt&gt;
&lt;/tt&gt;9&lt;tt&gt;
&lt;/tt&gt;&lt;strong&gt;10&lt;/strong&gt;&lt;tt&gt;
&lt;/tt&gt;11&lt;tt&gt;
&lt;/tt&gt;12&lt;tt&gt;
&lt;/tt&gt;&lt;/pre&gt;&lt;/td&gt;
  &lt;td class='code'&gt;&lt;pre&gt;&lt;span class='pp'&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot;&lt;tt&gt;
&lt;/tt&gt; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;html&lt;/span&gt; &lt;span class='an'&gt;xmlns&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;http://www.w3.org/1999/xhtml&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='an'&gt;xml:lang&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;en&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='an'&gt;lang&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;en&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;span class='ta'&gt;&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='ta'&gt;&amp;lt;meta&lt;/span&gt; &lt;span class='an'&gt;http-equiv&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;content-type&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='an'&gt;content&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;text/html;charset=UTF-8&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='ta'&gt;/&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='ta'&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My Liquid Enabled Site&lt;span class='ta'&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;  &lt;span class='ta'&gt;&amp;lt;link&lt;/span&gt; &lt;span class='an'&gt;rel&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;Stylesheet&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='an'&gt;href&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;/stylesheets/scaffold.css&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='an'&gt;type&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;text/css&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='an'&gt;media&lt;/span&gt;=&lt;span class='s'&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;span class='k'&gt;screen&lt;/span&gt;&lt;span class='dl'&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; &lt;span class='ta'&gt;/&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;{{ content_for_layout }}&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;tt&gt;
&lt;/tt&gt;&lt;span class='ta'&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;

Now your on your way to becoming a pro liquid user. &lt;span class='highlight'&gt;Stay tuned for our next installment, Liquid Drops&lt;/span&gt;.&lt;br /&gt;

For more information on liquid check out these resources
&lt;ul&gt;
  &lt;li&gt;&lt;a href='http://home.leetsoft.com/liquid/'&gt;http://home.leetsoft.com/liquid/&lt;/li&gt;
  &lt;li&gt;&lt;a href='http://mephistoblog.com/docs/templates/using-liquid-templates'&gt;http://mephistoblog.com/docs/templates/using-liquid-templates&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2006-11-28:87</id>
    <published>2006-11-28T23:39:00Z</published>
    <updated>2006-12-05T21:51:34Z</updated>
    <link href="http://blog.ericgoodwin.com/2006/11/28/hello-mephisto" rel="alternate" type="text/html"/>
    <title>Hello Mephisto</title>
<content type="html">
            &lt;p&gt;After putting it off for sometime now, I just switched over from &lt;a href='http://typosphere.org/'&gt;Typo&lt;/a&gt; to &lt;a href='http://mephistoblog.com/'&gt;Mephisto&lt;/a&gt;. There are going to be a couple of glitches in the changeover but hopefully everything should be up and running smoothly in the next week or so.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2006-09-21:33</id>
    <published>2006-09-21T19:02:00Z</published>
    <updated>2006-12-19T23:15:17Z</updated>
    <link href="http://blog.ericgoodwin.com/2006/9/21/debain-sarge-spam-killer-postfix-spam-assassin-razor-dcc-and-procmail" rel="alternate" type="text/html"/>
    <title>Debain Sarge Spam Killer - Postfix, Spam Assassin, Razor, DCC and Procmail</title>
<content type="html">
            &lt;p&gt;About three weeks after putting my email address on the main page of my blog I started to get spam, and a lot of it. That&#8217;s when I decided to install &lt;a href='http://spamassassin.apache.org/'&gt;Spamassassin&lt;/a&gt;. To help Spamassassin to detect spam I also installed &lt;a href='http://www.dcc-servers.net/dcc/' title='Distributed Checksum Clearinghouse'&gt;&lt;span class='caps'&gt;DCC&lt;/span&gt;&lt;/a&gt; and &lt;a href='http://razor.sourceforge.net/'&gt;Razor&lt;/a&gt;, two anti-spam filters. Here&#8217;s what I did and how I did it.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;This tutorial assumes that you have postfix up and running already.&lt;/strong&gt;&lt;/p&gt;


	&lt;p&gt;First lets walk through the steps that postfix goes through when you receive an incoming email.&lt;/p&gt;


	&lt;p&gt;When receiving an email postfix looks for .forward in your home directory and executes any commands that you have in this file. If postfix doesn&#8217;t find a .forward file then it will execute /etc/procmailrc with no options and afterwards execure ~/.procmailrc if it can find that file.&lt;/p&gt;


	&lt;p&gt;Ok, let&#8217;s get started.&lt;/p&gt;


	&lt;h3&gt;Spamassassin&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;server:/# apt-get install spamassassin
server:/# adduser --system --home /var/lib/spam --shell /bin/false --disabled-password --disabled-login spamd
server:/# pico /etc/default/spamassassin&lt;/code&gt;&lt;/pre&gt;
Change &lt;span class='caps'&gt;ENABLED&lt;/span&gt;=0 to &lt;span class='caps'&gt;ENABLED&lt;/span&gt;=1
&lt;pre&gt;&lt;code&gt;server:/# pico /etc/postfix/master.cf&lt;/code&gt;&lt;/pre&gt;
Look for a line like this:
&lt;pre&gt;
smtp      inet  n       -       -       -       -       smtpd 
&lt;/pre&gt;
and on the following line add:
&lt;pre&gt;&lt;code&gt;-o content_filter=spamassassin&lt;/code&gt;&lt;/pre&gt;
And at the end of the file add this line
&lt;pre&gt;&lt;code&gt;spamassassin unix - n n - - pipe flags=Rq user=spamd argv=/usr/local/bin/sa-filter.sh -f ${sender} ${recipient}&lt;/code&gt;&lt;/pre&gt;
Now let&#8217;s create the file we just refered to in the previous line of code.
&lt;pre&gt;&lt;code&gt;server:/# pico /usr/local/bin/sa-filter.sh&lt;/code&gt;&lt;/pre&gt;
And let&#8217;s add this into it
&lt;pre&gt;&lt;code&gt;#!/bin/bash
/usr/bin/spamc | /usr/sbin/sendmail -i &quot;$@&quot; 
exit $?&lt;/code&gt;&lt;/pre&gt;
Now that that&#8217;s done, make sure that spamd is the owner and then restart everything.
&lt;pre&gt;&lt;code&gt;server:/# chown spamd:spamd /usr/local/bin/sa-filter.sh
server:/# chmod 755 /usr/local/bin/sa-filter.sh
server:/# /etc/init.d/spamassassin restart
server:/# /etc/init.d/postfixreload&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Razor &#38; &lt;span class='caps'&gt;DCC&lt;/span&gt;&lt;/h3&gt;


&lt;pre&gt;&lt;code&gt;server:/# cd ~/
server:/# apt-get install razor
server:/# wget http://www.dcc-servers.net/dcc/source/dcc-dccproc.tar.Z 
server:/# tar xfvz dcc-dccproc.tar.Z 
server:/# cd dcc-dccproc-* 
server:/# ./configure
server:/# make
server:/# make install 
server:/# rm dcc-dccproc.tar.Z
server:/# rm -Rf dcc-dccproc-*&lt;/code&gt;&lt;/pre&gt;

First lets make sure that &lt;span class='caps'&gt;DCC&lt;/span&gt; is working.
&lt;pre&gt;&lt;code&gt;server:/# cdcc info&lt;/code&gt;&lt;/pre&gt;
You should get a big long list of servers.
Next let&#8217;s get Razor all set up.
&lt;pre&gt;&lt;code&gt;server:/# cd /etc/mail/spamassassin 
server:/# mkdir .razor 
server:/# razor-admin -home=/etc/mail/spamassassin/.razor -register 
server:/# razor-admin -home=/etc/mail/spamassassin/.razor -create 
server:/# razor-admin -home=/etc/mail/spamassassin/.razor -discover
server:/# pico /etc/mail/spamassassin/.razor/razor-agent.conf&lt;/code&gt;&lt;/pre&gt;
We have to add one line to this file
&lt;pre&gt;&lt;code&gt;razorhome = /etc/mail/spamassassin/.razor/&lt;/code&gt;&lt;/pre&gt;
It will most likly be the only line in the file.
Now let&#8217;s open up the spamassassin local config file
&lt;pre&gt;&lt;code&gt;server:/# pico /etc/mail/spamassassin/local.cf&lt;/code&gt;&lt;/pre&gt;
We want to add two lines at the end of the file
&lt;pre&gt;&lt;code&gt;/etc/mail/spamassassin/.razor/razor-agent.conf
use_dcc 1 dcc_path /usr/local/bin/dccproc dcc_add_header 1&lt;/code&gt;&lt;/pre&gt;
One last thing we need to do is add &lt;span class='caps'&gt;DCC&lt;/span&gt; to your spamassassin init file.
&lt;pre&gt;&lt;code&gt;server:/# pico /etc/mail/spamassassin/init.pre&lt;/code&gt;&lt;/pre&gt;
Add this to the end of the file
&lt;pre&gt;&lt;code&gt;loadplugin Mail::SpamAssassin::Plugin::DCC&lt;/code&gt;&lt;/pre&gt;
Now restart Spamassassin and reload Postfix.
&lt;pre&gt;&lt;code&gt;server:/# /etc/init.d/spamassassin restart
server:/# /etc/init.d/postfix reload&lt;/code&gt;&lt;/pre&gt;

	&lt;h3&gt;Procmail&lt;/h3&gt;


Ok, we have to decide what to do once an email gets labeled as spam. First off let&#8217;s make sure that all email goes through procmail.
&lt;pre&gt;&lt;code&gt;server:/# pico ~/.forward&lt;/code&gt;&lt;/pre&gt;
Now lets add a line. Make sure to keep the quotes.
&lt;pre&gt;&lt;code&gt;&quot;|exec /usr/bin/procmail || exit 75&quot;&lt;/code&gt;&lt;/pre&gt;
Before we create our procmail instructions we need to do a couple things. First we want to create a new folder in our mail dir called &#8220;Spam&#8221; which we&#8217;ll forward all our spam to. Next we have to take note to where our shell is located.
&lt;pre&gt;&lt;code&gt;server:/# touch ~/mail/Spam
server:/# which sh
/bin/sh &lt;/code&gt;&lt;/pre&gt;

Now let&#8217;s tell Procmail what to do.
&lt;pre&gt;&lt;code&gt;server:/# pico ~/.procmailrc&lt;/code&gt;&lt;/pre&gt;
Make sure bash is set to the value you got before. Also change the &lt;span class='caps'&gt;MAILDIR&lt;/span&gt; to wherever your mail directory is. I&#8217;ve asumed it&#8217;s in ~/home/mail.
&lt;pre&gt;&lt;code&gt;#Preliminaries
SHELL=bin/sh
MAILDIR=${HOME}/mail
DEFAULT=$MAILDIR/ 
:0:
* ^X-Spam-Flag: YES
$MAILDIR/Spam&lt;/code&gt;&lt;/pre&gt;
Now if anything is flaged as spam it will automatically be moved into the spam folder.
Let&#8217;s restart spamassassin and postfix one last time, for good luck.

&lt;pre&gt;&lt;code&gt;server:/# /etc/init.d/spamassassin start
server:/# /etc/init.d/postfix restart&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now sit back, relax and reminisce about the days when you used to get spam.&lt;/p&gt;


	&lt;h3&gt;Resources&lt;/h3&gt;


&lt;pre&gt;
http://blog.psuter.ch/index.php?/archives/29-installing-spamassassin-on-debian-with-postfix.html
http://aaron.birenboim.com/unix/postfix+spamassassin.htm
http://linux.duke.edu/~mstenner/docs/sa-docs/advanced.html
http://www.cs.rutgers.edu/~watrous/procmail-spam.html
&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://blog.ericgoodwin.com/">
    <author>
      <name>eric</name>
    </author>
    <id>tag:blog.ericgoodwin.com,2006-08-29:32</id>
    <published>2006-08-29T22:15:00Z</published>
    <updated>2006-12-05T21:50:05Z</updated>
    <link href="http://blog.ericgoodwin.com/2006/8/29/using-ruby-on-rails-actionmailer-on-its-own" rel="alternate" type="text/html"/>
    <title>Using Ruby on Rails' ActionMailer on its own</title>
<content type="html">
            &lt;p&gt;If you ever need to create and send a bunch of dynamically created emails, here&#8217;s a nice little script to help you out. It should work on any server that has Ruby on Rails installed.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;#
# my_mailer.rb
#
require 'rubygems'
require_gem 'actionmailer'

ActionMailer::Base.server_settings = {
  :address =&gt; 'mail.myserver.com',
  :port =&gt; 25,
  :domain=&gt; 'myserver.com',
  :user_name=&gt; 'admin',
  :password=&gt; 'mypassword',
  :authentication=&gt; :login
}
ActionMailer::Base.template_root = 'templates'
ActionMailer::Base.delivery_method = :smtp

class MyMailer &amp;lt; ActionMailer::Base

  def database ( email_address )
    date         = Time.new.strftime('%m%d%Y')
    @recipients  = email_address
    @subject     = &quot;[myserver.com] Database Dump : #{date}&quot; 
    @from        = &quot;admin@myserver.com&quot; 
    attachment &quot;plain/text&quot; do |a|
      a.body = File.read('/path/to/database_dump.sql')
      a.filename = &quot;database_dump_#{date}.sql&quot; 
    end
  end
end

MyMailer.deliver_database ('someone@example.com')&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You will also have to make sure that you have the proper directory structure set up for this to work.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;./my_mailer.rb
./templates/my_mailer/database.rhtml&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The body of your email will be created from the database.rhtml file. You can use any instance variables that you create in you database method just as in any Rails project.&lt;/p&gt;
          </content>  </entry>
</feed>
