<?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>Schadenfreude &#187; rails</title>
	<atom:link href="http://www.ralree.com/tag/rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Sun, 28 Feb 2010 04:18:37 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OSCON Sessions, Day 1</title>
		<link>http://www.ralree.com/2008/07/24/oscon-sessions-day-1/</link>
		<comments>http://www.ralree.com/2008/07/24/oscon-sessions-day-1/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 08:08:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[africa]]></category>
		<category><![CDATA[chisimba]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[databases]]></category>
		<category><![CDATA[ejabberd]]></category>
		<category><![CDATA[erlang]]></category>
		<category><![CDATA[foscon]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[oscon]]></category>
		<category><![CDATA[oscon08]]></category>
		<category><![CDATA[philanthropy]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2008/07/24/oscon-sessions-day-1</guid>
		<description><![CDATA[I went to 5 sessions today, and I was pleasantly surprised by most of them.  
CouchDB
CouchDB is a distributed non-relational database written in Erlang.  It is unique in that its main query interface is simply HTTP REST, and for every UPDATE, it simply creates a new version of the row.  Additionally, you [...]]]></description>
			<content:encoded><![CDATA[<p>I went to 5 sessions today, and I was pleasantly surprised by most of them.  </p>
<h2><a href="http://github.com/hank/life/tree/master/oscon/2008/sessions/CouchDB.rdoc">CouchDB</a></h2>
<p>CouchDB is a distributed non-relational database written in Erlang.  It is unique in that its main query interface is simply HTTP REST, and for every UPDATE, it simply creates a new version of the row.  Additionally, you can request the entire history of a row very simply.</p>
<h2><a href="http://github.com/hank/life/tree/master/oscon/2008/sessions/Hypertable.rdoc">Hypertable</a></h2>
<p>An open-source implementation of Google&#8217;s bigtable.  Hypertable uses novel methods such as Bloom filters to significantly decrease query times, as well as smart messaging to distribute a database across many nodes.  It is also non-relational.</p>
<h2><a href="http://github.com/hank/life/tree/master/oscon/2008/sessions/Africa.rdoc">Creating and supporting Free Software in Africa</a></h2>
<p>A group of CS professors hailing from Africa have gotten together to create a community that fosters creativity and innovation from people in Africa.  People in first-world countries can participate by acting as mentors, or directly contribute to the projects involved.  <a href="http://en.wikipedia.org/wiki/Chisimba">Chisimba</a> is an open-source MVC framework for rapid application development.  I am very interested in contributing to this project.</p>
<h2><a href="http://github.com/hank/life/tree/master/oscon/2008/sessions/LucidDB.rdoc">LucidDB</a></h2>
<p>I thought going in that this would be somehow in the same ballpark as Hypertable and CouchDB, but I was disappointed.  Basically, they are using compression and some fairly neat indexing to speed up traditional database queries.  The main problem is that they only have a Java API, which completely turned me off after 30 minutes.  Before that, it seemed like they were getting some pretty promising results.  If they add some more APIs in the future, this may be another one to take a look at.</p>
<h2><a href="http://github.com/hank/life/tree/master/oscon/2008/sessions/History.of.Failure.rdoc">A History of Failure</a></h2>
<p>An awesome talk by Paul Fenwick from Australia, generally detailing failures in computer science and engineering going back into the 20th century and even back to Roman times.  This was a wonderful presentation &#8211; he&#8217;s a really good speaker &#8211; and it poked a <em>lot</em> of fun at New Zealand.</p>
<p>All in all, I must say that this OSCON is much better than last year&#8217;s at least according to what I was looking for in the sessions.  The exhibit hall is also very good this year &#8211; I&#8217;m pretty loaded down with swag at the moment.  </p>
<p>I know someone who would have gotten a kick out of <a href="http://en.oreilly.com/oscon2008/public/schedule/detail/4549">Temporally Quaquaversal Virtual Nanomachine Programming In Multiple Topologically Connected Quantum-Relativistic Parallel Timespaces&#8230;Made Easy!</a> had they been here.  He needs to come next year (you know who you are..)</p>
<p>Tonight, I also attended <a href="http://pdxfoscon.org/">FOSCON 4: Cooking with Ruby</a>.  This was a spectacular event hosted by Cubespace.  I have to say that the live coding competition was a great spectacle, and held everyone&#8217;s attention for hours.  It was an epic battle between Symfony, Rails, Smalltalk/Seaside, and Drupal.  The rankings ended up being the following:</p>
<ol>
<li>Rails</li>
<li>Drupal</li>
<li>Symfony</li>
<li>Smalltalk/Seaside</li>
</ol>
<p>The presentations were good as well for the most part (notes <a href="http://github.com/hank/life/tree/master/oscon/2008/foscon/Notes.rdoc">here</a>).  <strong>AND THEY HAD BEER!</strong> I had some of the best keg beer imaginable &#8211; I thought it would be crap like you usually get out of a keg, but this was real quality Northwestern hopped pale ale.  My cup says Bridgeport Ales, so I&#8217;ll have to investigate.  If anyone knows the exact beer that was available in the left-side keg tonight, I&#8217;d appreciate a comment.  I also met some cool people, some of which are all into XMPP and ejabberd.  I may have to check all of that out now&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/07/24/oscon-sessions-day-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pradipta&#8217;s Rolodex Epic Conclusion</title>
		<link>http://www.ralree.com/2008/07/18/pradipta-s-rolodex-epic-conclusion/</link>
		<comments>http://www.ralree.com/2008/07/18/pradipta-s-rolodex-epic-conclusion/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 23:05:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[funny]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[recruiting]]></category>
		<category><![CDATA[rolodex]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2008/07/18/pradipta-s-rolodex-epic-conclusion</guid>
		<description><![CDATA[If you don&#8217;t already know about Pradipta&#8217;s Rolodex, read up here
Here&#8217;s the epic apology email from THE MAN HIMSELF!:

Hi All,
First of all I just wanted to say I apologize for the emails I sent. As of today I promise to stop the Email marketing campaigns. And I do believe it was a very&#8230;very..stupid mistake, this [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t already know about Pradipta&#8217;s Rolodex, read up <a href="http://groups.google.com/group/pradiptas-rolodex">here</a></p>
<p>Here&#8217;s the epic apology email from <strong>THE MAN HIMSELF!</strong>:</p>
<blockquote><p>
Hi All,</p>
<p>First of all I just wanted to say I apologize for the emails I sent. As of today I promise to stop the Email marketing campaigns. And I do believe it was a very&#8230;very..stupid mistake, this is the result of working late.</p>
<p>Also, I am deeply amazed of how talented you guys are. I mean seriously all this happened in less than 24 hours.  I hope this mishap would create a benefit for all of us.</p>
<p>I understand this is fun for a lot of you, however, people are getting angry so if we could keep everything under the google groups that would be most appreciated.</p>
<p>http://groups.google.com/group/pradiptas-rolodex?hl=en</p>
<p>If anyone wants to contact me feel free to contact this new email<br />
pradipta416@gmail.com.</p>
<p>Humbly Sorry,<br />
Pradipta (Max) Archiputra</p>
<p>P.S: this time I used BCC. :)
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/07/18/pradipta-s-rolodex-epic-conclusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a Flash Line Chart in Rails using Ziya</title>
		<link>http://www.ralree.com/2008/02/16/how-to-make-a-flash-line-chart-in-rails-using-ziya/</link>
		<comments>http://www.ralree.com/2008/02/16/how-to-make-a-flash-line-chart-in-rails-using-ziya/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 22:58:15 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ziya]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/how-to-make-a-flash-line-chart-in-rails-using-ziya</guid>
		<description><![CDATA[Ziya is pretty cool, and the documentation is slowly starting to surface.  I was annoyed that I couldn’t find a good example paste of how to make a line chart.  Then I watched the screencast.  It’s the first example he does, so I’m posting it here so those who can’t watch it [...]]]></description>
			<content:encoded><![CDATA[<p>Ziya is pretty cool, and the documentation is slowly starting to surface.  I was annoyed that I couldn’t find a good example paste of how to make a line chart.  Then I watched the <a href="http://www.youtube.com/watch?v=axIMmMHdXzo">screencast</a>.  It’s the first example he does, so I’m posting it here so those who can’t watch it can actually find out how to do it.</p>
<p>I’m going to operate on the precondition that you’ve installed Ziya and included it in your controller properly.  Do the bar chart example before going any further.</p>
<p>Now, make this function in your controller:</p>
<pre><code>
def refresh_chart
  chart = ZIya::Charts::Line.new
  render :text =&gt; chart
end
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/02/16/how-to-make-a-flash-line-chart-in-rails-using-ziya/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Photoslice in Bluecloth and Mephisto</title>
		<link>http://www.ralree.com/2008/01/05/photoslice-in-bluecloth-and-mephisto/</link>
		<comments>http://www.ralree.com/2008/01/05/photoslice-in-bluecloth-and-mephisto/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 21:49:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bluecloth]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[lightbox]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[mephisto]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2008/01/06/photoslice-in-bluecloth-and-mephisto</guid>
		<description><![CDATA[So, I found this today, and it is awesome.  I wanted it in Bluecloth so I could use it in Mephisto.  Here&#8217;s how.
First, I needed to make it so I could still do normal images, but turn on coolness if I want.  Here&#8217;s the goal I came up with for the grammar:

[![](thumburl.jpg)](imageurl.jpg [...]]]></description>
			<content:encoded><![CDATA[<p>So, I found <a href="http://www.photoslice.net/guide/">this</a> today, and it is awesome.  I wanted it in Bluecloth so I could use it in Mephisto.  Here&#8217;s how.</p>
<p>First, I needed to make it so I could still do normal images, but turn on coolness if I want.  Here&#8217;s the goal I came up with for the grammar:</p>
<pre><code>
[![](thumburl.jpg)](imageurl.jpg "Scrolly Text at top" "photoslice")
</code></pre>
<p>Here&#8217;s the first test, with a single image:</p>
<p><a href="http://ralree.com/assets/2008/1/5/foshizzlepowell.jpg" title="Colin Powell Loves you" rel="photoslice"><img src="http://ralree.com/assets/2008/1/5/foshizzlepowell_thumb.jpg" alt=""/></a></p>
<p>And now a set with a namespace:</p>
<p><a href="http://ralree.com/assets/2008/1/5/ninjabeg.jpg" title="Ninjas killed his family.  Poor guy..." rel="photoslice.bluecloth"><img src="http://ralree.com/assets/2008/1/5/ninjabeg_thumb.jpg" alt=""/></a><br />
<a href="http://ralree.com/assets/2008/1/5/South_Park_Zach.jpg" title="Zach used to look like this." rel="photoslice.bluecloth"><img src="http://ralree.com/assets/2008/1/5/South_Park_Zach_thumb.jpg" alt=""/></a><br />
<a href="http://ralree.com/assets/2008/1/5/South_Park_Hank.jpg" title="I used to look like this." rel="photoslice.bluecloth"><img src="http://ralree.com/assets/2008/1/5/South_Park_Hank_thumb.jpg" alt=""/></a></p>
<p>I did it by simply modifying the regex and image url parsing function in BlueCloth like so:</p>
<div class="CodeRay">
<div class="code">
<pre>
  <span class="co">InlineLinkRegex</span> = <span class="rx"><span class="dl">%r{</span><span class="k">
    </span><span class="ch">\(</span><span class="k">            # Literal paren
      [ ]*        # Zero or more spaces
      &lt;?(.+?)&gt;?     # URI = $1
      [ ]*        # Zero or more spaces

      (?:         # title
        ([</span><span class="ch">\&quot;</span><span class="ch">\'</span><span class="k">])    # Opening quote char = $2
        (.*?)     # Title = $3
        </span><span class="ch">\2</span><span class="k">        # Matching quote char
      )?          # Title is optional
      [ ]*        # Zero or more spaces
      (?:         # rel
        ([</span><span class="ch">\&quot;</span><span class="ch">\'</span><span class="k">])    # Opening quote char = $2
        (.*?)     # rel = $5
        </span><span class="ch">\4</span><span class="k">        # Matching quote char
      )?          # rel is optional
    </span><span class="ch">\)</span><span class="k">
    </span><span class="dl">}</span><span class="mod">x</span></span>

    <span class="c"># and later...</span>

        <span class="c"># ...or for an inline style second part</span>
        <span class="r">elsif</span> <span class="iv">@scanner</span>.scan( <span class="co">InlineLinkRegex</span> )
          url = <span class="iv">@scanner</span>[<span class="i">1</span>]
          title = <span class="iv">@scanner</span>[<span class="i">3</span>]
          rel = <span class="iv">@scanner</span>[<span class="i">5</span>]
          <span class="iv">@log</span>.debug <span class="s"><span class="dl">&quot;</span><span class="k">  Found an inline link to %p</span><span class="dl">&quot;</span></span> % url

          text += <span class="s"><span class="dl">%{</span><span class="k">&lt;a href=&quot;%s&quot;</span><span class="dl">}</span></span> % escape_md( url )
          <span class="r">if</span> title
            title.gsub!( <span class="rx"><span class="dl">/</span><span class="k">&quot;</span><span class="dl">/</span></span>, <span class="s"><span class="dl">&quot;</span><span class="k">&amp;quot;</span><span class="dl">&quot;</span></span> )
            text += <span class="s"><span class="dl">%{</span><span class="k"> title=&quot;%s&quot;</span><span class="dl">}</span></span> % escape_md( title )
          <span class="r">end</span>
          <span class="r">if</span> rel
            rel.gsub!( <span class="rx"><span class="dl">/</span><span class="k">&quot;</span><span class="dl">/</span></span>, <span class="s"><span class="dl">&quot;</span><span class="k">&amp;quot;</span><span class="dl">&quot;</span></span> )
            text += <span class="s"><span class="dl">%{</span><span class="k"> rel=&quot;%s&quot;</span><span class="dl">}</span></span> % escape_md( rel )
          <span class="r">end</span>
</pre>
</div>
</div>
<p>I also added the following to my Mephisto theme layout, in the head section:</p>
<pre><code>
   &lt;!-- Photoslice --&gt;
   &lt;link rel="stylesheet" type="text/css" href="/javascripts/photoslice/style.css" /&gt;
   {{ "photoslice/functions.js" | javascript }}
</code></pre>
<p>Once again, Ruby is awesome.  And so is Markdown.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/01/05/photoslice-in-bluecloth-and-mephisto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site5 promo code for October</title>
		<link>http://www.ralree.com/2007/10/20/site5-promo-code-for-october/</link>
		<comments>http://www.ralree.com/2007/10/20/site5-promo-code-for-october/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 04:05:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/20/site5-promo-code-for-october</guid>
		<description><![CDATA[You can still get 13% off a new Site5 7.5TB/750GB/$7.50 Plan until November!  These guys are a great rails host.  Get this deal while it&#8217;s hot!
Code: HALLOWEEN2007

]]></description>
			<content:encoded><![CDATA[<h2>You can still get <strong>13%</strong> off a new Site5 <strong>7.5TB/750GB/$7.50</strong> Plan until November!  These guys are a great rails host.  Get this deal while it&#8217;s hot!</h2>
<h1>Code: <strong>HALLOWEEN2007</strong></h1>
<p><a href="http://www.site5.com/affiliates/idevaffiliate.php?id=1570"><img src="http://ralree.info/assets/2007/10/20/theplan_medium.png" alt="Go Now!"/></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/10/20/site5-promo-code-for-october/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site5&#8217;s 5 dollar hosting deal gets better again</title>
		<link>http://www.ralree.com/2007/09/02/site5-s-5-dollar-hosting-deal-gets-better-again/</link>
		<comments>http://www.ralree.com/2007/09/02/site5-s-5-dollar-hosting-deal-gets-better-again/#comments</comments>
		<pubDate>Sun, 02 Sep 2007 05:02:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[site5]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/site5-s-5-dollar-hosting-deal-gets-better-again</guid>
		<description><![CDATA[
OK &#8211; I&#8217;m usually pretty critical in general, but this is the best hosting I&#8217;ve ever found, and it&#8217;s 3 times better than when I bought it, and it&#8217;s still the same price!  So, you should click the image above and go sign up.  These guys give you great support &#8211; I&#8217;ve contacted [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.site5.com/affiliates/idevaffiliate.php?id=1570"><img src="http://ralree.info/assets/2007/9/2/fivedollar-X3-blue.png" alt="5 Dollar Deal X3!"/></a></p>
<p>OK &#8211; I&#8217;m usually pretty critical in general, but this is the best hosting I&#8217;ve ever found, and it&#8217;s 3 times better than when I bought it, and it&#8217;s <strong>still the same price!</strong>  So, you should click the image above and go sign up.  These guys give you great support &#8211; I&#8217;ve contacted them numerous times and always had my problem solved within just a few minutes.  I&#8217;ve noticed my site down once, and as soon as I emailed them, it was back up again.  This blog is running Mephisto, a Ruby on Rails application, and it&#8217;s FAST!  I barely ever see the kind of quick response from websites like I see from mine.</p>
<h2>Features</h2>
<ul>
<li>Full Ruby on Rails support.  They have updated gems for you to use, but also allow you to keep your own gem repository in your home directory.</li>
<li>Ready-to-go web applications with one-click installs</li>
<li>Awesome tech support</li>
<li><strong>Very</strong> extensive wiki and forum where you can find out how to do <strong><em>anything</strong></em> you want with your account</li>
<li><strong>165GB of storage!</strong></li>
<li><strong>5TB of bandwidth per month</strong> &#8211; which is great for transferring large files.  I&#8217;ve never had a problem with the transfer speed, either.</li>
<li><strong>165 domain pointers</strong> &#8211; This allows me to host all my domains with them.  They have a great system for buying domains that I&#8217;ve used quite a bit too.  </li>
<li>Shell access</li>
<li>Free setup!</li>
<li>60-day money back guarantee &#8211; If you don&#8217;t like it, you get all your bones back.  How cool is that?</li>
</ul>
<h2>Benchmark</h2>
<p>I have 16Mbit internet at home, and I decided just now to test the bandwidth of my site.  Here are the results:</p>
<pre><code>
hank@rofl:/tmp$ wget -O /dev/null http://ralree.info/videos/grad.mp4
--00:50:57--  http://ralree.info/videos/grad.mp4
           =&gt; `/dev/null'
Resolving ralree.info... 70.47.124.108
Connecting to ralree.info|70.47.124.108|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 63,744,460 (61M) [audio/mp4]

100%[====================================&gt;] 63,744,460     1.92M/s    ETA 00:00

00:51:30 (1.86 MB/s) - `/dev/null' saved [63744460/63744460]
</code></pre>
<h2>Yes, folks, thats <strong><em>1.86 MEGABYTES</strong></em> per second.</h2>
<h3>My Maximum at 16Mbit is <strong>2 Megabytes/second</strong>, meaning this completely maxed out my connection.</h3>
<p></p>
<p>I used to be a Dreamhost customer, and it sucked.  It sucked really bad.  I&#8217;m so glad I switched.  Compare the features to any other plan you can find for $5/month.  This is as good as it gets.</p>
<p><center><span style="font-size: 50px;"><a href="http://www.site5.com/affiliates/idevaffiliate.php?id=1570"><strong>Sign up now!</strong></a></span></center><br />
<br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/09/02/site5-s-5-dollar-hosting-deal-gets-better-again/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flash Video Player for Mephisto</title>
		<link>http://www.ralree.com/2007/08/13/flash-video-player-for-mephisto/</link>
		<comments>http://www.ralree.com/2007/08/13/flash-video-player-for-mephisto/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 02:50:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[alex]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mephisto]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/flash-video-player-for-mephisto</guid>
		<description><![CDATA[So I made this awesome filter for Mephisto that allows you to easily embed flash videos in your post.  May require tweaking if using a non-standard URL root.

It&#8217;s as simple as this:

&#60;macro:flash&#62;/assets/2007/8/13/party.flv&#60;/macro:flash&#62;

Or, you can make it complicated:

&#60;macro:flash width="640" height="480"&#62;/assets/2007/8/13/party.flv&#60;/macro:flash&#62;

Which ends up like this:

Installation
Install it from your mephisto directory:

./script/plugin install -x https://modzer0.cs.uaf.edu/repos/hank/code/rails/mephisto/filtered_column_flash_video

Voila! Firebreathing!
]]></description>
			<content:encoded><![CDATA[<p>So I made this awesome filter for Mephisto that allows you to easily embed flash videos in your post.  May require tweaking if using a non-standard URL root.</p>
<p><embed src="/flash_player/flvplayer.swf" width="400" height="400" type="application/x-shockwave-flash"    pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=/assets/2007/8/13/party.flv&#038;displayheight=400&#038;displaywidth=400"/></p>
<p>It&#8217;s as simple as this:</p>
<pre><code>
&lt;macro:flash&gt;/assets/2007/8/13/party.flv&lt;/macro:flash&gt;
</code></pre>
<p>Or, you can make it complicated:</p>
<pre><code>
&lt;macro:flash width="640" height="480"&gt;/assets/2007/8/13/party.flv&lt;/macro:flash&gt;
</code></pre>
<p>Which ends up like this:<br />
<embed src="/flash_player/flvplayer.swf" width="640" height="480" type="application/x-shockwave-flash"    pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="file=/assets/2007/8/13/party.flv&#038;displayheight=480&#038;displaywidth=640"/></p>
<h1>Installation</h1>
<p>Install it from your mephisto directory:</p>
<pre><code>
./script/plugin install -x https://modzer0.cs.uaf.edu/repos/hank/code/rails/mephisto/filtered_column_flash_video
</code></pre>
<p><strong>Voila!</strong> Firebreathing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/08/13/flash-video-player-for-mephisto/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>KLone &#8211; C on Rails!</title>
		<link>http://www.ralree.com/2007/06/10/klone-c-on-rails/</link>
		<comments>http://www.ralree.com/2007/06/10/klone-c-on-rails/#comments</comments>
		<pubDate>Sun, 10 Jun 2007 17:13:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[klone]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/klone-c-on-rails</guid>
		<description><![CDATA[Well, I was over at Debian Package of the Day when I noticed an article on KLone.  It&#8217;s a little application framework that allows you to do XHTML templating in C!  Then, you can compile it and send it off to any Linux machine (with a few dependencies of course) to run it. [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I was over at <a href="http://debaday.debian.net">Debian Package of the Day</a> when I noticed <a href="http://debaday.debian.net/2007/06/03/klone-c-web-programming-framework/">an article</a> on <a href="http://www.koanlogic.com/kl/cont/gb/html/klone.html">KLone</a>.  It&#8217;s a little application framework that allows you to do XHTML templating in C!  Then, you can compile it and send it off to any Linux machine (with a few dependencies of course) to run it.  I got it, and it didn&#8217;t work for me at first.  Then, for some reason, it started working.  Here&#8217;s what I think did it:</p>
<p>In Ubuntu, I did this:</p>
<pre><code>
sudo apt-get install build-essential libssl-dev quilt klone klone-package
</code></pre>
<p>Then, I made a new test project:</p>
<pre><code>
make-klone-project create -p myhello
</code></pre>
<p>This creates a new project directory.  Now, go into it and make it your new home:</p>
<pre><code>
cd myhello-0.1/
cd userdata/
mkdir www etc
vim etc/kloned.conf
</code></pre>
<p>I&#8217;m just going to assume you&#8217;re using <em>vim</em> because, well, you should be.  Make the config file look something like this:</p>
<pre><code>
server_list my_http
allow_root yes

my_http
{
    type      http
    addr.type IPv4
    addr.port 8880
    dir_root  /www
}
</code></pre>
<p>Now lets give it something to work with (note we&#8217;re still in userdata):</p>
<pre><code>
vim www/index.klone
</code></pre>
<div class="CodeRay">
<div class="code">
<pre>
<span class="ta">&lt;html&gt;</span>
<span class="ta">&lt;head&gt;</span><span class="ta">&lt;title&gt;</span>Hello Lady!<span class="ta">&lt;/title&gt;</span><span class="ta">&lt;/head&gt;</span>
<span class="ta">&lt;body&gt;</span>
  <span class="c">&lt;%  io_printf(out, &quot;Hey, Lady!  You call him Dr. Jones!&quot;);  %&gt;</span>
<span class="ta">&lt;/body&gt;</span>
<span class="ta">&lt;/html&gt;</span>
</pre>
</div>
</div>
<p>Now add your precious files to the sauce:</p>
<pre><code>
cd ../../site/
klone -c import ../userdata/
# 2 dirs and 2 files imported
cd ..
</code></pre>
<p>Now, compile and run it:</p>
<pre><code>
kloned-build -o myapp userdata
./myapp -F  # This runs it in non-daemonized mode
</code></pre>
<p>If you don&#8217;t get any errors, congratulations.  That means I did something right.</p>
<p>Now, just hop over to <a href="http://localhost:8880">here</a> or wherever you specified it to run, and it will magically appear.</p>
<p>Now you can do this:</p>
<div class="CodeRay">
<div class="code">
<pre><code>
<span class="ta">&lt;html&gt;</span>
<span class="ta">&lt;head&gt;</span><span class="ta">&lt;title&gt;</span>Hello World<span class="ta">&lt;/title&gt;</span><span class="ta">&lt;/head&gt;</span>
<span class="ta">&lt;body&gt;</span>
<span class="c">&lt;%
int i;
for(i=0; i &lt; 10; ++i) {
    io_printf(out, &quot;Hello Lady! %d&lt;br /&gt;&quot;, i);
}
%&gt;</span>
<span class="ta">&lt;/body&gt;</span>
<span class="ta">&lt;/html&gt;</span>
</code></pre>
</div>
</div>
<p>Then run this to rebuild and re-run the server:</p>
<pre><code>
kloned-build -o myapp userdata &#038;&#038; ./myapp -F
</code></pre>
<h2>Update</h2>
<p>So, I ran some tests, and I have to say, the speed increase from C might be really awesome every now and again.  Here&#8217;s the code:</p>
<div class="CodeRay">
<div class="code">
<pre><code>
   clock_t curtime = clock();
   <span class="pp">#define</span> SEED <span class="i">35791246</span>
   <span class="pt">int</span> niter=<span class="i">10000000</span>;
   <span class="pt">double</span> x,y;
   <span class="pt">int</span> count=<span class="i">0</span>; <span class="c">/* # of points in the 1st quadrant of unit circle */</span>
   <span class="pt">double</span> z;
   <span class="pt">double</span> pi;

   <span class="c">/* initialize random numbers */</span>
   srand(SEED);
   count=<span class="i">0</span>;
   <span class="r">for</span> ( i=<span class="i">0</span>; i&lt;niter; i++) {
      x = (<span class="pt">double</span>)rand()/RAND_MAX;
      y = (<span class="pt">double</span>)rand()/RAND_MAX;
      z = x*x+y*y;
      <span class="r">if</span> (z&lt;=<span class="i">1</span>) count++;
      }
   pi=(<span class="pt">double</span>)count/niter*<span class="i">4</span>;
   io_printf(out, <span class="s"><span class="dl">&quot;</span><span class="k"># of trials= %d , estimate of pi is %g </span><span class="ch">\n</span><span class="dl">&quot;</span></span>,niter,pi);
   io_printf(out, <span class="s"><span class="dl">&quot;</span><span class="k">%f</span><span class="dl">&quot;</span></span>, (<span class="pt">double</span>)(clock() - curtime)/(<span class="pt">double</span>)CLOCKS_PER_SEC);
</code></pre>
</div>
</div>
<p>All this is is a Monte Carlo method of calculating pi that I stole from <a href="http://www.dartmouth.edu/~rc/classes/soft_dev/C_simple_ex.html">here</a>.  It takes <strong>0.56 seconds</strong> of CPU time on my Core 2 Duo @ 3.3Ghz.  Now for the Ruby on Rails test:</p>
<div class="CodeRay">
<div class="code">
<pre><code>
<span class="c"># Controller</span>
    <span class="iv">@start</span> = <span class="co">Time</span>.now
    srand(<span class="i">35791246</span>)
    iter = <span class="i">10000000</span>
    count = <span class="i">0</span>
    <span class="i">0</span>.upto(iter) <span class="r">do</span> |i|
      x = rand().to_f
      y = rand().to_f
      z = x*x+y*y
      count += <span class="i">1</span> <span class="r">if</span> z &lt;= <span class="i">1</span>
    <span class="r">end</span>
    <span class="iv">@pi</span> = count.to_f / iter * <span class="i">4</span>
    <span class="iv">@end</span> = <span class="co">Time</span>.now
</code></pre>
</div>
</div>
<p>This finishes in <strong>20.75 seconds</strong> (about 40x slower).  C is great for things like this.  I hope to use KLone in the future for these kinds of tasks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/06/10/klone-c-on-rails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Site5 Doubles $5 Deal!</title>
		<link>http://www.ralree.com/2007/05/16/site5-doubles-5-deal/</link>
		<comments>http://www.ralree.com/2007/05/16/site5-doubles-5-deal/#comments</comments>
		<pubDate>Wed, 16 May 2007 05:44:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[site5]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/site5-doubles-5-deal</guid>
		<description><![CDATA[I noticed today that Site5 has doubled their $5 deal!  Now you get the following for only $5/month:
110 GB Storage
5 TB of bandwidth allowance per month
110 Domain Pointers
Free Setup
Ruby on Rails Friendly
I am currently using this plan for this blog, and am extremely happy with it after coming over from Dreamhost.
Sign up now!
]]></description>
			<content:encoded><![CDATA[<p>I noticed today that <a href="http://www.site5.com/affiliates/idevaffiliate.php?id=1570">Site5</a> has doubled their $5 deal!  Now you get the following for only $5/month:</p>
<h1>110 GB Storage</h1>
<h1>5 TB of bandwidth allowance per month</h1>
<h1>110 Domain Pointers</h1>
<h1>Free Setup</h1>
<h1>Ruby on Rails Friendly</h1>
<p>I am currently using this plan for this blog, and am <em>extremely happy</em> with it after coming over from Dreamhost.</p>
<h1><a href="http://www.site5.com/affiliates/idevaffiliate.php?id=1570">Sign up now!</a></h1>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/05/16/site5-doubles-5-deal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mephisto Comment Notification Mod</title>
		<link>http://www.ralree.com/2007/03/19/mephisto-comment-notification-mod/</link>
		<comments>http://www.ralree.com/2007/03/19/mephisto-comment-notification-mod/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 19:35:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mephisto]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/mephisto-comment-notification-mod</guid>
		<description><![CDATA[I wanted to be able to click a link in my email to see the comment it talked about.  So, I modified Luke Redpath&#8217;s Comment Notification Plugin to give that to me.  First, I had to do some script/console action:

&#62;&#62; s = Site.find_first
=&#62; #&#60;Site:0xb747e014 @attributes={"current_theme_path"=&#62;"wibbish-mephisto",#...
#...
&#62;&#62; s.host='www.ralree.info'
=&#62; "www.ralree.info"
&#62;&#62; s.save
=&#62; true
&#62;&#62; quit

Next, I did a [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to be able to click a link in my email to see the comment it talked about.  So, I modified <a href="http://hasno.info/2006/11/11/mephisto-plugins">Luke Redpath&#8217;s Comment Notification Plugin</a> to give that to me.  First, I had to do some <code>script/console</code> action:</p>
<pre><code>
&gt;&gt; s = Site.find_first
=&gt; #&lt;Site:0xb747e014 @attributes={"current_theme_path"=&gt;"wibbish-mephisto",#...
#...
&gt;&gt; s.host='www.ralree.info'
=&gt; "www.ralree.info"
&gt;&gt; s.save
=&gt; true
&gt;&gt; quit
</code></pre>
<p>Next, I did a small model modification:</p>
<pre><code>
# app/models/article.rb, in the public section
  def full_external_link
    ["http://", site.host, full_permalink].join("")
  end
</code></pre>
<p>And a slight test:</p>
<pre><code>
Loading production environment.
&gt;&gt; Article.find_first.full_external_link
=&gt; "http://www.ralree.info/2006/5/21/first-post-what-to-say"
</code></pre>
<p><strong>Perfect!</strong></p>
<p>Then, I just modified the view for the email a bit:</p>
<pre><code>
# vendor/plugins/mephisto_comment_notification/lib/views/
# comment_notifier/comment_notification.rhtml
A new comment has been posted on your blog for the article '&lt;%= @comment.article.title %&gt;' by &lt;%= @comment.author %&gt; (&lt;%= @comment.author_email %&gt;):
&lt;%= @comment.article.full_external_link %&gt;

The commenter IP address is &lt;%= @comment.author_ip %&gt;.

Here is the comment that was posted:

"&lt;%= @comment.body %&gt;"

This notification was sent using the Mephisto Comment notification plugin by Luke Redpath.

http://opensource.agileevolved.com/svn/root/rails_plugins/mephisto_comment_notification/trunk

Modified awesomely by Erik Gregg (http://www.ralree.info)
</code></pre>
<p>And it&#8217;s magic!  It totally works!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2007/03/19/mephisto-comment-notification-mod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.473 seconds -->
