<?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>Postpostmodern &#187; Ruby</title>
	<atom:link href="http://postpostmodern.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://postpostmodern.com</link>
	<description>Speaking of web development.</description>
	<lastBuildDate>Wed, 11 Jan 2012 00:21:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gitup!</title>
		<link>http://postpostmodern.com/downloadable/gitup/</link>
		<comments>http://postpostmodern.com/downloadable/gitup/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 18:49:34 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
				<category><![CDATA[Downloadable]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Transmit]]></category>

		<guid isPermaLink="false">http://postpostmodern.com/?p=296</guid>
		<description><![CDATA[Gitup + Transmit = Really Simple Publishing]]></description>
			<content:encoded><![CDATA[<p>Gitup + Transmit = Really Simple Publishing</p>

<h2>Deploy vs Publish</h2>

<p>There are many ways to deploy a new version of a web site. If it&#8217;s a web app, you normally want to use a complete deployment solution like <a href="http://www.capify.org/">Capistrano</a> or <a href="http://blog.railsmachine.com/articles/2009/01/16/moonshine-configuration-management-and-deployment/">Moonshine</a>. But if you need to update a static HTML site or a simple PHP site, you usually just need to upload the changed files. This is often referred to as <em>publishing</em> as opposed to <em>deployment</em>. There are obviously several ways of doing this. Many file transfer apps have synchronization features. Publishing features can also be found in many editors/IDEs.</p>

<h2>The Pain of Publishing</h2>

<p>I&#8217;m a simple man. All those fancy publish/sync features always seem to be a hassle or else they&#8217;re built-in to a less-than-ideal coding environment (I&#8217;m looking at you, <a href="http://www.panic.com/coda/">Coda</a> and <a href="http://macrabbit.com/espresso/features/publish/">Espresso</a>). Editing in Textmate and dock-sending to Transmit is about as fancy as I get. No sync. Just uploading files. The problem is, it&#8217;s hard sometimes to keep track of all the updated files that need to be uploaded once a new page is added, feature is complete, etc. Git knows what&#8217;s changed (if you&#8217;re not using <a href="http://git-scm.com/">Git</a> or some other SCM, you should be), but going through the logs is a pain.</p>

<h2>Gitup and Go</h2>

<p>So, yesterday, I wrote a Ruby script to do simple publishing. It&#8217;s called <a href="http://github.com/postpostmodern/gitup/tree/master">Gitup</a>. You tell Gitup which Git commits you want to publish, and it finds all of the changed files and sends them to Transmit. If you have Transmit&#8217;s dock send feature set up, Transmit will upload the files to the appropriate server and directory. Gitup will even let you preview the list of files that it plans on uploading.</p>

<p>It&#8217;s super-simple and quick. Much quicker than any &#8216;publish&#8217; feature I&#8217;ve seen.</p>

<h2>Examples</h2>

<p>Send files modified in the last commit to Transmit (Gitup will let you know how many files will be sent and offer you the option to view a list of the files or abort.):</p>

<p><kbd class="block">gitup</kbd></p>

<p>Send files modified in the last 3 commits to Transmit:</p>

<p><kbd class="block">gitup -3</kbd></p>

<p>Send files modified in the last 3 commits to Transmit immediately (no prompting or anything):</p>

<p><kbd class="block">gitup -s -3</kbd></p>

<p>Send files modified since yesterday to Transmit:</p>

<p><kbd class="block">gitup --since=yesterday</kbd></p>

<p>Send files modified since Monday to Transmit (quotes are required):</p>

<p><kbd class="block">gitup --since="last monday"</kbd></p>

<p>Send files since the specified commit to Transmit:</p>

<p><kbd class="block">gitup dcd2c68..</kbd></p>

<p>Open files added/updated between the two specified commits in Textmate:</p>

<p><kbd class="block">gitup --application=Textmate dcd2c68..bf75dd6</kbd></p>

<h2>Disclaimer</h2>

<p><em>Please note that Gitup is brand new. It could be buggy. I&#8217;m just sayin&#8217;.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/downloadable/gitup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Email Aliases on Media Temple</title>
		<link>http://postpostmodern.com/downloadable/quick-email-aliases-on-media-temple/</link>
		<comments>http://postpostmodern.com/downloadable/quick-email-aliases-on-media-temple/#comments</comments>
		<pubDate>Wed, 29 Nov 2006 05:17:41 +0000</pubDate>
		<dc:creator>Jason Johnson</dc:creator>
				<category><![CDATA[Downloadable]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[Media Temple]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://blog.postpostmodern.com/2006/11/29/adding-email-aliases-on-a-media-temple-dv-server/</guid>
		<description><![CDATA[A script to create instant email aliases on a MT (dv) account]]></description>
			<content:encoded><![CDATA[<h2>The Short Story:</h2>

<p>If you have a Media Temple (dv) vps server account with Ruby<sup><a href="#footnote-1-41" id="footnote-link-1-41" title="See the footnote.">1</a></sup> installed and root/sudo access, you can use my <a title="gist" href="http://gist.github.com/60650">handy-dandy script to create instant email aliases</a> for any of your hosted domains.</p>

<p>Usage<sup><a href="#footnote-2-41" id="footnote-link-2-41" title="See the footnote.">2</a></sup>:</p>

<p><kbd class="block">sudo ./alias.rb email_alias@hosted-domain.com recipient@anydomain.com</kbd></p>

<p>That&#8217;s it. 5 seconds and you have a new email alias. No Plesky mess involved.</p>

<p>I even aliased my alias script in my .bashrc file:</p>

<p><code>alias ealias='sudo ~/alias.rb'</code></p>

<h2>The Backstory (and how the script works):</h2>

<p>I use a lot of email aliases. I rarely give out my real email address. I usually create an alias that forwards to my real address. For example, if Amazon.com thinks my email address is amazon (@ my domain.com). That way, if I ever start getting spam, I know who gave away my address, and I can just delete the alias.</p>

<p>I use Media Temple&#8217;s Dedicated Virtual (dv) hosting plan. The Plesk control panel is kinda limited (and a pain) when it comes to creating lots of email aliases. I&#8217;ve yet to find a way to create an alias that forwards to an external email address, and any alias creation takes a crapload of mouse clicks. So, I decided to figure out a simpler way. After looking under hood, I discovered qmail. I didn&#8217;t know a thing about qmail, but I was willing to do some research to get to a solution for my alias thing. It turns out, qmail has kind of a neat way of dealing with aliases: for each domain, there is a directory. Each file in this directory represents an email alias<sup><a href="#footnote-3-41" id="footnote-link-3-41" title="See the footnote.">3</a></sup>. The files are named thusly: &#8216;.qmail-<em>alias</em>&#8217; where <em>alias</em> is the actual <em>name</em> part of the alias address. The contents of the file consist of the actual recipient addresses (prefixed by &#038; and separated by newlines). So, a file called .qmail-amazon in /var/qmail/mailnames/postpostmodern.com that contains my real email address, prefixed by an ampersand, would be all that is needed for a functioning alias. All my script does is parse the input to figure out the name of the file, the contents of the file and where to put the file. Then, of course, it just creates the file.</p>

<p>The nice thing about qmail&#8217;s system is that the files are utilized instantly. There is no <em>reloading</em> of alias info or anything. It just works.</p>

<p>Oh, and adding a bash alias like this:</p>

<p><code>alias emails='sudo ls -a /var/qmail/mailnames/hosteddomain.com/'</code></p>

<p>will give you a list of existing aliases.<br /></p>

<ol class="footnotes"><li id="footnote-1-41">Yes, I could have used Bash or something, but I&#8217;m more comfortable with Ruby, okay?  <a href="#footnote-link-1-41">&#8593; back up there</a></li><li id="footnote-2-41">Please adjust the shebang line for your ruby installation. And don&#8217;t forget to chmod the script so it&#8217;s executable (755)!  <a href="#footnote-link-2-41">&#8593; back up there</a></li><li id="footnote-3-41">There are also subdirectories for each real email account.  <a href="#footnote-link-3-41">&#8593; back up there</a></li></ol>
]]></content:encoded>
			<wfw:commentRss>http://postpostmodern.com/downloadable/quick-email-aliases-on-media-temple/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

