<?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; camping</title>
	<atom:link href="http://www.ralree.com/tag/camping/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>Thu, 09 Feb 2012 01:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Quick Markaby note about conditional attributes</title>
		<link>http://www.ralree.com/2010/08/26/quick-markaby-not-about-conditional-attributes/</link>
		<comments>http://www.ralree.com/2010/08/26/quick-markaby-not-about-conditional-attributes/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 03:24:23 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[awesome]]></category>
		<category><![CDATA[camping]]></category>
		<category><![CDATA[markaby]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.ralree.com/?p=22844</guid>
		<description><![CDATA[Say you want to set an option tag to selected only under certain conditions without the code getting really ugly. Do this!: I was messing around with the ternary operator in other ways inside the element, but none of them actually interpreted properly. I hope this helps someone else struggling with this issue&#8230;]]></description>
			<content:encoded><![CDATA[<p>Say you want to set an option tag to selected only under certain conditions without the code getting really ugly.  Do this!:<br />
<script src="http://gist.github.com/552731.js"></script><br />
I was messing around with the ternary operator in other ways inside the element, but none of them actually interpreted properly.  I hope this helps someone else struggling with this issue&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2010/08/26/quick-markaby-not-about-conditional-attributes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DNS for bash</title>
		<link>http://www.ralree.com/2008/03/31/dns-for-bash/</link>
		<comments>http://www.ralree.com/2008/03/31/dns-for-bash/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 01:16:00 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[camping]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[_why]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2008/03/31/dns-for-bash</guid>
		<description><![CDATA[Today, I decided I wanted a network service that propagated variables and aliases to every login shell that subscribed to it. This is dangerous on a large scale, but perfectly acceptable on my small home network where everyone trusts everyone else. First, I got Camping installed, bringing back fond memories of Ruby development. I then copied off the blog example, and created TreeHugger, a 427 line script that provides a web interface to edit the variables, and a plain text [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I decided I wanted a network service that propagated variables and aliases to every login shell that subscribed to it.  This is dangerous on a large scale, but perfectly acceptable on my small home network where everyone trusts everyone else.</p>
<p>First, I got <a href="http://code.whytheluckystiff.net/camping">Camping</a> installed, bringing back fond memories of Ruby development.  I then copied off the blog example, and created TreeHugger, a 427 line script that provides a web interface to edit the variables, and a plain text output for the shells to source.  </p>
<p><a href="http://modzer0.cs.uaf.edu/repos/hank/code/ruby/treehugger.rb">This script</a>, when run, allows some simple MVC actions to an sqlite3 database.</p>
<p><img src="http://ralree.com/assets/2008/3/31/screenshot2.png" alt="Example Screenshot"/></p>
<p>As you can see, I have some aliases here I want to send to all the subscribing hosts.  Eventually, I want to add some detection functionality to the database (mostly reverse DNS lookups for host rule referencing).  I just have to access <code>/out</code> to get my desired output:</p>
<pre><code>
# Treehugger Configuration
# Aliases
alias ai='sudo apt-get install'
alias aup='sudo apt-get update'
alias aug='sudo apt-get upgrade'

# Environment Variables
</code></pre>
<p>Now, to get this into bash.  I looked into making the <code>date</code> command spit out pretty unique timestamps.  Turns out you can do this with the nanoseconds format:</p>
<pre><code>
$ date +%s%N
1206926780157462141
</code></pre>
<p>I made it so <code>wget</code> saves the treehugger config to a tempfile using the somewhat random seed above as a filename suffix, and then I have my shell source it:</p>
<pre><code>
FILENAME=/tmp/treehugger-`date +%s%N`; 2&gt;/dev/null wget -O $FILENAME  http://rofl.who/treehugger/out &#038;&#038; source $FILENAME &#038;&#038; rm $FILENAME
</code></pre>
<p>And now I have nice aliases on my laptop served up from my desktop as fresh as the shell:</p>
<pre><code>
hank@davros:~$ alias
alias ai='sudo apt-get install'
alias aug='sudo apt-get upgrade'
alias aup='sudo apt-get update'
alias ls='ls --color=auto'
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2008/03/31/dns-for-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>_why thinks I&#8217;m a bike</title>
		<link>http://www.ralree.com/2006/10/06/_why-thinks-im-a-bike/</link>
		<comments>http://www.ralree.com/2006/10/06/_why-thinks-im-a-bike/#comments</comments>
		<pubDate>Fri, 06 Oct 2006 17:59:34 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[camping]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[_why]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/_why-thinks-im-a-bike</guid>
		<description><![CDATA[I got featured on Redhanded. Apparently, I&#8217;m a bike. Probably because of my behavior under the name o`o in IRC. Sigh, it&#8217;s my only claim to fame. :(]]></description>
			<content:encoded><![CDATA[<p>I got featured on<br />
<a href="http://redhanded.hobix.com/inspect/evanSCampingSlides.html">Redhanded</a>.<br />
Apparently, I&#8217;m a bike.  Probably because of my behavior under the name<br />
<strong>o`o</strong> in IRC.  Sigh, it&#8217;s my only claim to fame. :(</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2006/10/06/_why-thinks-im-a-bike/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DNS Mania</title>
		<link>http://www.ralree.com/2006/09/02/dns-mania/</link>
		<comments>http://www.ralree.com/2006/09/02/dns-mania/#comments</comments>
		<pubDate>Sat, 02 Sep 2006 15:26:02 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[camping]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[_why]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/dns-mania</guid>
		<description><![CDATA[Well, I was stumbling today and found OpenDNS. I was excited to find that I could make it coexist with OpenNIC in my dhclient configuration. Here&#8217;s the resultant line that makes all this magic happen: prepend domain-name-servers 63.226.12.96, 208.67.222.222, 208.67.220.220; So now, when I use dhcp to grab an IP, I end up prepending these nameservers onto my resolv.conf. OpenDNS makes spam sites and domain squatters disappear. And it makes the average request a lot faster. Yesterday, bish0p and I [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I was stumbling today and found <a href="http://www.opendns.com/">OpenDNS</a>. I<br />
was excited to find that I could make it coexist with OpenNIC in my dhclient<br />
configuration.  Here&#8217;s the resultant line that makes all this magic happen:</p>
<pre><code>
prepend domain-name-servers 63.226.12.96, 208.67.222.222, 208.67.220.220;
</code></pre>
<p>So now, when I use dhcp to grab an IP, I end up prepending these nameservers<br />
onto my resolv.conf.  OpenDNS makes spam sites and domain squatters disappear.<br />
And it makes the average request a lot faster.</p>
<p>Yesterday, <a href="http://dayne.broderson.org">bish0p</a> and I sat down and started<br />
work on <a href="http://mydns.bboy.net/">MyDNS</a>.  It turns out that the db structure<br />
isn&#8217;t all that bad, so it will be fairly straightforward to build a<br />
Rails/Camping interface for it.  I already started one in Camping called<br />
Beacon.  I was going to name it ChunkyBeacon, but <strong>#camping</strong> decided<br />
against that.</p>
<p>In other news, I&#8217;m going to leave Fairbanks for a while soon.  It will be<br />
exciting to go on this adventure into the <em>real</em> world for four months.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2006/09/02/dns-mania/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sanitizing Input in Camping</title>
		<link>http://www.ralree.com/2006/07/11/sanitizing-input-in-camping/</link>
		<comments>http://www.ralree.com/2006/07/11/sanitizing-input-in-camping/#comments</comments>
		<pubDate>Tue, 11 Jul 2006 16:39:37 +0000</pubDate>
		<dc:creator>Erik</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[camping]]></category>

		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/sanitizing-input-in-camping</guid>
		<description><![CDATA[So, I fixed up my RubySig Camping app today, and decided I should sanitize the input. Here&#8217;s how: require 'action_view' class Sig &#60; R '/sig' include ActionView::Helpers::TextHelper def post ... ... So, it was as simple as including the TextHelper in the Sig class. Including it inside post didnt work since that would be ludicrous. I thought about it a bit more, and figured it out. I love Ruby.]]></description>
			<content:encoded><![CDATA[<p>So, I fixed up my <a href="http://modzer0.cs.uaf.edu/rubysig">RubySig</a> Camping app today, and decided I should sanitize the input.  Here&#8217;s how:</p>
<div class="CodeRay">
<div class="code">
<pre></code>
  require <span class="s"><span class="dl">'</span><span class="k">action_view</span><span class="dl">'</span></span>

    <span class="r">class</span> <span class="cl">Sig</span> &lt; <span class="co">R</span> <span class="s"><span class="dl">'</span><span class="k">/sig</span><span class="dl">'</span></span>
      include <span class="co">ActionView</span>::<span class="co">Helpers</span>::<span class="co">TextHelper</span>
      <span class="r">def</span> <span class="fu">post</span>
        ...
        ...
</code></pre>
</div>
</div>
<p>So, it was as simple as including the TextHelper in the Sig class.  Including it inside post didnt work since that would be ludicrous.  I thought about it a bit more, and figured it out.  I love Ruby.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ralree.com/2006/07/11/sanitizing-input-in-camping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

