<?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>Excursus &#187; Ruby</title>
	<atom:link href="http://markelikalderon.com/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://markelikalderon.com</link>
	<description>Philosophy and Text</description>
	<lastBuildDate>Sat, 04 Sep 2010 13:22:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ruby Gems and Google Charts</title>
		<link>http://markelikalderon.com/2008/06/28/ruby-gems-and-google-charts/</link>
		<comments>http://markelikalderon.com/2008/06/28/ruby-gems-and-google-charts/#comments</comments>
		<pubDate>Sat, 28 Jun 2008 01:43:16 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/06/28/ruby-gems-and-google-charts/</guid>
		<description><![CDATA[As any occasional reader of Edward Tufte will know, sometimes a well designed graphic can simply and effectively convey complex information. The need for graphics may be greater in the sciences than in philosophy, but even here, it can sometimes help. For example, I had a hard time explaining to my students the difference between [...]]]></description>
			<content:encoded><![CDATA[<p>As any occasional reader of <a href="http://www.edwardtufte.com/" title="The Work of Edward Tufte and Graphics Press">Edward Tufte</a> will know, sometimes a well designed graphic can simply and effectively convey complex information. The need for graphics may be greater in the sciences than in philosophy, but even here, it can sometimes help. For example, I had a hard time explaining to my students the difference between the intrapersonal principle of the association of impressions and the interpersonal principle of sympathy until I quite literally drew them a <a href="http://markelikalderon.com/teaching/humes-ethics/the-passions/#sympathy">picture</a>. <a href="http://www.ruby-lang.org/" title="Ruby Programming Language">Ruby</a> enthusiasts, now have at their disposable an easy means of producing simple yet attractive charts from quantitative data. <a href="http://googlecharts.rubyforge.org/">Googlecharts</a> is a ruby wrapper for the <a href="http://code.google.com/apis/chart/">Google Chart API</a> available at <a href="http://github.com/" title="Secure Git hosting and collaborative development &mdash; GitHub">GitHub</a>. To install:</p>

<pre class="textmate-source"><span class="source source_shell">$ sudo gem install googlecharts -s http://gems.github.com</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/06/28/ruby-gems-and-google-charts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cheat Sheets</title>
		<link>http://markelikalderon.com/2008/05/28/cheat-sheets/</link>
		<comments>http://markelikalderon.com/2008/05/28/cheat-sheets/#comments</comments>
		<pubDate>Tue, 27 May 2008 23:48:09 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/?p=403</guid>
		<description><![CDATA[Earlier I posted about a ruby gem for a git cheat sheet. What I didn&#8217;t realize that it was so much more and way cool to boot. Basically, the ruby gem, cheat, is a command line driven wiki for cheat sheets. The inaugural blog post is here, and the online version of the wiki is [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier I <a href="http://markelikalderon.com/blog/2008/04/08/cheating-git/">posted</a> about a ruby gem for a git cheat sheet. What I didn&#8217;t realize that it was so much more and way cool to boot. Basically, the ruby gem, cheat, is a command line driven wiki for cheat sheets. The inaugural blog post is <a href="http://errtheblog.com/posts/21-cheat">here</a>, and the online version of the wiki is <a href="http://cheat.errtheblog.com/">here</a>. To install:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ sudo gem install</span></pre>
</code>
To see a list of available cheat sheets:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ cheat sheets</span></pre>
</code>
To view one of the cheat sheets:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ cheat <span class="keyword keyword_operator keyword_operator_redirect keyword_operator_redirect_shell">&lt;</span>sheet name<span class="keyword keyword_operator keyword_operator_redirect keyword_operator_redirect_shell">&gt;</span></span></pre>
</code>
To edit a cheat sheet:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ cheat --edit <span class="keyword keyword_operator keyword_operator_redirect keyword_operator_redirect_shell">&lt;</span>sheet name<span class="keyword keyword_operator keyword_operator_redirect keyword_operator_redirect_shell">&gt;</span></span></pre>
</code>
To add a cheat sheet:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ cheat --add <span class="keyword keyword_operator keyword_operator_redirect keyword_operator_redirect_shell">&lt;</span>sheet name<span class="keyword keyword_operator keyword_operator_redirect keyword_operator_redirect_shell">&gt;</span></span></pre>
</code>
To update the cheat sheets:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ cheat --new</span></pre>
</code>
More info is available with:
<code>
    <pre class="textmate-source"><span class="source source_shell">$ cheat cheat</span></pre>
</code>
I just added a cheat sheet of useful <a href="http://cheat.errtheblog.com/s/remind_commands/">remind commands</a>. w00t!</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/05/28/cheat-sheets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cheating Git</title>
		<link>http://markelikalderon.com/2008/04/08/cheating-git/</link>
		<comments>http://markelikalderon.com/2008/04/08/cheating-git/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 23:02:47 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/04/08/cheating-git/</guid>
		<description><![CDATA[I would like to post more about Git, but, alas, at this I point, I am still too much of a n00b. I will be moving over to Git entirely this summer and will post more on this topic then. But for now, let me pass on this useful tidbit for fellow n00bs. If you [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to post more about <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a>, but, alas, at this I point, I am still too much of a n00b. I will be moving over to Git entirely this summer and will post more on this topic then. But for now, let me pass on this useful tidbit for fellow n00bs. If you have <a href="http://www.ruby-lang.org/" title="Ruby Programming Language">ruby</a> installed on your machine (ruby comes preinstalled with Leaopard&#8212;OS X users, you are running Leopard, right?) there is a ruby gem for a git cheat sheet. To install run:</p>

<pre><code>sudo gem install cheat
</code></pre>

<p>After the git cheat sheet gem is installed, simply run:</p>

<pre><code>cheat git
</code></pre>

<p>(or better still pipe it through your favorite pager&#8212;mine is <a href="http://www.jedsoft.org/most/">most</a>&#8212;why settle for less?). It&#8217;s a useful addition to:</p>

<pre><code>git help
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/04/08/cheating-git/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Instiki and SmartyPants</title>
		<link>http://markelikalderon.com/2006/10/26/instiki-and-smartypants/</link>
		<comments>http://markelikalderon.com/2006/10/26/instiki-and-smartypants/#comments</comments>
		<pubDate>Thu, 26 Oct 2006 15:00:06 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Instiki]]></category>
		<category><![CDATA[Markdown]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SmartyPants]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2006/10/26/instiki-and-smartypants/</guid>
		<description><![CDATA[Dr. Drang recently posted about adding SmartyPants to Instiki. I like both these tools, but I ran into a few snags, so I thought I would post some updated instructions. For those who don&#8217;t know, Instiki is a wiki clone based on Ruby on Rails. Very easy to install and use. One virtue of Instiki [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.leancrew.com/all-this/">Dr. Drang</a> recently <a href="http://www.leancrew.com/all-this/2006/10/adding_smartypants_to_instiki.html">posted</a> about adding SmartyPants to Instiki. I like both these tools, but I ran into a few snags, so I thought I would post some updated instructions.</p>

<p>For those who don&#8217;t know, Instiki is a wiki clone based on Ruby on Rails. Very easy to install and use. One virtue of Instiki is that it has the option of using <a href="http://daringfireball.net/projects/markdown/">Markdown</a>, a lightweight markup language. (<a href="http://markelikalderon.com/blog/2006/10/10/whats-the-opposite-of-markup/">Or is it?</a>). It can be used locally and is a handy way to organize notes.</p>

<p><a href="http://daringfireball.net/projects/smartypants/">Smartypants</a> is a companion project to Markdown. It translates ASCII punctuation characters into &#8216;smart&#8217; typographic punctuation. (After all, you want to be typographically correct, don&#8217;t you?)</p>

<p>The first problem is that the Instiki.org site seems no longer to exist. I was worried that Instiki was no more. Fortunately, after some searching, I found that Instiki can be downloaded <a href="http://rubyforge.org/frs/?group_id=186">here</a>. There are a number of download options. The easiest for OS X users is instiki-0.10.2.dmg. Mount the dmg and drag Instiki.app to your Applications folder and your done.</p>

<p>You don&#8217;t need Ruby or Rails installed to run Instiki.app, all these files are contained locally. But that means you need to access the contents of Instiki.app to make Dr. Drang&#8217;s modifications. The file bluecloth_tweaked.rb can be found in the following directory:</p>

<pre><code>/Applications/Instiki.app/Contents/Resources/rb_src/lib
</code></pre>

<p>Open that file in your favorite text editor and add</p>

<pre><code>require 'rubypants'
</code></pre>

<p>near the top of the file with the other require lines. Towards the bottom of the to_html method add either:</p>

<pre><code>text = RubyPants.new( text, 1).to_html()   
</code></pre>

<p>or:</p>

<pre><code>text = RubyPants.new( text ).to_html()   
</code></pre>

<p>The former will give you em dashes with two hyphens. The latter will give you em dashes with three hyphens. I prefer the latter convention to the former and not just because it is the TeX convention. On the latter convention two hyphens gives you en dashes, whereas the former convention cannot represent these. And since hyphens, en dashes, and em dashes are progressively longer, it makes sense that they be represented by one, two, and three consecutive hypens respectively</p>

<p>One more modification is necessary. You need to install RubyPants in the the same directory as bluecloth_tweaked.rb. RubyPants is the Ruby implementation of SmartyPants. It can be downloaded <a href="http://chneukirchen.org/blog/static/projects/rubypants.html">here</a>. Untar the file by double clicking it, and move the file rubypants.rb to:</p>

<pre><code>/Applications/Instiki.app/Contents/Resources/rb_src/lib
</code></pre>

<p>Restart Instiki.app and now all your notes will be typographically correct. Thanks Dr. Drang!</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2006/10/26/instiki-and-smartypants/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
