<?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>Erik A. Hanson &#187; Mac OS X</title>
	<atom:link href="http://www.eahanson.com/category/mac-os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eahanson.com</link>
	<description>My weblog</description>
	<lastBuildDate>Thu, 06 Jan 2011 02:27:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>An AppleScript to Clean Up My Downloads Folder</title>
		<link>http://www.eahanson.com/2007/08/11/an-applescript-to-clean-up-my-downloads-folder/</link>
		<comments>http://www.eahanson.com/2007/08/11/an-applescript-to-clean-up-my-downloads-folder/#comments</comments>
		<pubDate>Sat, 11 Aug 2007 18:55:02 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://www.eahanson.com/2007/08/11/an-applescript-to-clean-up-my-downloads-folder/</guid>
		<description><![CDATA[My downloads folder always gets so full after a while that I have a hard time finding things. I like to keep stuff around for a little while in case I need it again, and if I have the space, I like to keep things around for a long time, just in case. So I wrote a simple AppleScript to move old files to an "Old" subdirectory.]]></description>
			<content:encoded><![CDATA[<p>My downloads folder always gets so full after a while that I have a hard time finding things. I like to keep stuff around for a little while in case I need it again, and if I have the space, I like to keep things around for a long time, just in case.</p>
<p>So I wrote a simple AppleScript to move old files to an &#8220;Old&#8221; subdirectory. I thought I&#8217;d post it here in case anyone else needed something similar. It&#8217;s a simple script, but AppleScript is hard for me because I write scripts so rarely that I forget everything about it before I need to write another script.</p>
<p>(Many years ago, I actually got paid to write a few AppleScripts.)</p>
<pre>
set folderName to "Macintosh HD:Users:<em>your-user-name</em>:Temp:"

repeat with fileName in list folder folderName
  set tempFile to (folderName as string) &amp; contents of fileName
  set modificationDate to modification date of (info for alias tempFile)
  set age to ((current date) - modificationDate) / days

  if age &gt; 7 and fileName is not " Clean Up Temp Dir" then
    tell application "Finder"
      move alias tempFile to alias (folderName &amp; " Old")
    end tell
  end if
end repeat
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eahanson.com/2007/08/11/an-applescript-to-clean-up-my-downloads-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing termios gem on Mac OS X</title>
		<link>http://www.eahanson.com/2007/02/03/installing-termios-gem-on-mac-os-x/</link>
		<comments>http://www.eahanson.com/2007/02/03/installing-termios-gem-on-mac-os-x/#comments</comments>
		<pubDate>Sun, 04 Feb 2007 03:13:54 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web development]]></category>

		<guid isPermaLink="false">http://www.eahanson.com/weblog/?p=13</guid>
		<description><![CDATA[When installing Capistrano, you should install the termios gem so that your password isn't echoed when you type it. Easier said than done.]]></description>
			<content:encoded><![CDATA[<p>When installing <a href="http://manuals.rubyonrails.com/read/chapter/97">Capistrano</a>, you should install the <strong>termios</strong> gem so that your password isn&#8217;t echoed when you type it.</p>
<h4>Easier said than done</h4>
<p>Here&#8217;s the error I got:</p>
<div class="code">$<span style="color: darkgreen">sudo gem install termios</span><br />
Attempting local installation of &#8216;termios&#8217;<br />
Local gem file not found: termios*.gem<br />
Attempting remote installation of &#8216;termios&#8217;<br />
Updating Gem source index for: http://gems.rubyforge.org<br />
Building native extensions.  This could take a while&#8230;<br />
can&#8217;t find header files for ruby.<br />
ERROR:  While executing gem &#8230; (RuntimeError)<br />
ERROR: Failed to build gem native extension.<br />
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/termios-0.9.4 for inspection.<br />
ruby extconf.rb install termios\n
</div>
<p>It was looking for header files in <tt>/usr/lib/ruby/1.8/powerpc-darwin8.0</tt>, but they weren&#8217;t there; they were in <tt>/usr/lib/ruby/1.8/universal-darwin8.0</tt>.</p>
<h4>The Solution</h4>
<p>The solution was simple enough: create symlinks to the header files:</p>
<pre>$<span style="color: darkgreen">sudo ln -s ../universal-darwin8.0/*.h ./</span>
$<span style="color: darkgreen">sudo gem install termios</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.eahanson.com/2007/02/03/installing-termios-gem-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

