<?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>powdahound.com</title>
	<atom:link href="http://powdahound.com/feed" rel="self" type="application/rss+xml" />
	<link>http://powdahound.com</link>
	<description>Dreaming of snow.</description>
	<lastBuildDate>Wed, 03 Apr 2013 15:25:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Steve Jobs on the bottom line</title>
		<link>http://powdahound.com/2012/10/steve-jobs-on-the-bottom-line</link>
		<comments>http://powdahound.com/2012/10/steve-jobs-on-the-bottom-line#comments</comments>
		<pubDate>Thu, 11 Oct 2012 16:07:21 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367216</guid>
		<description><![CDATA[Jobs: We’ve been having record quarter after record quarter, so we’re very pleased with how the company’s doing. And, uh, you know, Wall Street, I’ve never been able to figure out Wall Street. But someone once told me manage the top line, which is, your strategy, your talented people, and your execution, and the bottom [...]]]></description>
				<content:encoded><![CDATA[<blockquote><p>Jobs: We’ve been having record quarter after record quarter, so we’re very pleased with how the company’s doing. And, uh, you know, Wall Street, I’ve never been able to figure out Wall Street. <strong>But someone once told me manage the top line, which is, your strategy, your talented people, and your execution, and the bottom line will take care of itself. And I’ve always found that to be the case.</strong> So, we’re turning in record quarter after record quarter, and Wall Street eventually comes out in the right place.</p></blockquote>
<div style="text-align: center;">
  <iframe src="http://www.youtube.com/embed/RSSLbpyhMFg?feature=player_detailpage#t=165s" frameborder="0" width="640" height="360"></iframe>
</div>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2012/10/steve-jobs-on-the-bottom-line/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formatting JSON on the command line</title>
		<link>http://powdahound.com/2011/03/formatting-json-on-the-command-line</link>
		<comments>http://powdahound.com/2011/03/formatting-json-on-the-command-line#comments</comments>
		<pubDate>Tue, 15 Mar 2011 01:54:49 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[yajl]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367156</guid>
		<description><![CDATA[If you ever work with JSON on the command line, try out the json_reformat tool included in yajl-tools package (or install from source). Without json_reformat $ curl http://github.com/api/v2/json/user/show/powdahound {"user":{"gravatar_id":"d5894734b9f67c07b276319fdc2e5d88","company":"HipChat", "name":"Garret Heaton","created_at":"2009/04/04 08:36:09 -0700", "location":"Sunnyvale, CA","public_repo_count":18,"public_gist_count":67, "blog":"http://powdahound.com","following_count":8,"id":70472,"type":"User", "permission":null,"followers_count":7,"login":"powdahound", "email":"powdahound@gmail.com"}} With json_reformat $ curl -s http://github.com/api/v2/json/user/show/powdahound &#124; json_reformat { "user": { "gravatar_id": "d5894734b9f67c07b276319fdc2e5d88", "company": "HipChat", "name": "Garret [...]]]></description>
				<content:encoded><![CDATA[<p>If you ever work with JSON on the command line, try out the json_reformat tool included in <a href="http://packages.ubuntu.com/lucid/yajl-tools" target="_blank">yajl-tools</a> package (or install from <a href="http://lloyd.github.com/yajl/" target="_blank">source</a>).</p>
<p style="margin: 0;"><strong>Without json_reformat</strong></p>
<pre>$ curl http://github.com/api/v2/json/user/show/powdahound
{"user":{"gravatar_id":"d5894734b9f67c07b276319fdc2e5d88","company":"HipChat",
"name":"Garret Heaton","created_at":"2009/04/04 08:36:09 -0700",
"location":"Sunnyvale, CA","public_repo_count":18,"public_gist_count":67,
"blog":"http://powdahound.com","following_count":8,"id":70472,"type":"User",
"permission":null,"followers_count":7,"login":"powdahound",
"email":"powdahound@gmail.com"}}</pre>
<p style="margin: 20px 0 0 0;"><strong>With json_reformat</strong></p>
<pre>$ curl -s http://github.com/api/v2/json/user/show/powdahound | json_reformat
{
  "user": {
    "gravatar_id": "d5894734b9f67c07b276319fdc2e5d88",
    "company": "HipChat",
    "name": "Garret Heaton",
    "created_at": "2009/04/04 08:36:09 -0700",
    "location": "Sunnyvale, CA",
    "public_repo_count": 18,
    "public_gist_count": 67,
    "blog": "http://powdahound.com",
    "following_count": 8,
    "id": 70472,
    "type": "User",
    "permission": null,
    "followers_count": 7,
    "login": "powdahound",
    "email": "powdahound@gmail.com"
  }
}</pre>
<p>So much nicer!</p>
<p>It will even tell you if there are syntax syntax errors (as will json_verify).</p>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2011/03/formatting-json-on-the-command-line/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting a static site on Amazon S3: ec2instances.info</title>
		<link>http://powdahound.com/2011/03/hosting-a-static-site-on-amazon-s3-ec2instances-info</link>
		<comments>http://powdahound.com/2011/03/hosting-a-static-site-on-amazon-s3-ec2instances-info#comments</comments>
		<pubDate>Thu, 10 Mar 2011 05:22:54 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367165</guid>
		<description><![CDATA[Amazon added the ability to host static sites on S3 recently so to try it out I made a small site comparing the different types of EC2 instances: www.ec2instances.info. It&#8217;s not much of a site but it was the only thing in my ideas list that didn&#8217;t require some sort of database backend. The setup [...]]]></description>
				<content:encoded><![CDATA[<p><img class="alignright" title="AWS" src="http://powdahound.com/wp-content/uploads/2011/03/awslogo-500x250.png" alt="" width="240" height="120" />Amazon added the ability to <a href="http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html" target="_blank">host static sites on S3</a> recently so to try it out I made a small site comparing the different types of EC2 instances: <a href="http://www.ec2instances.info" target="_blank">www.ec2instances.info</a>. It&#8217;s not much of a site but it was the only thing in my ideas list that didn&#8217;t require some sort of database backend.</p>
<p>The setup was very simple:</p>
<ol>
<li>Buy the domain (<a href="http://name.com/" target="_blank">name.com</a> is so much nicer than GoDaddy by the way).</li>
<li>Point domain&#8217;s nameservers at my <a href="http://slicehost.com/" target="_blank">slicehost</a> account.</li>
<li>Add a new DNS domain in slicehost and add a single CNAME record with a name of &#8216;www&#8217; and data of &#8216;s3-website-us-east-1.amazonaws.com.&#8217;</li>
<li>Install the latest <a href="http://cyberduck.ch" target="_blank">Cyberduck</a> (Mac). Windows users can use one of the tools <a href="http://aws.typepad.com/aws/2011/02/host-your-static-website-on-amazon-s3.html" target="_blank">here</a>.</li>
<li>Create a new S3 bucket called &#8216;www.ec2instances.info&#8217; and <a href="http://trac.cyberduck.ch/wiki/help/en/howto/s3#WebsiteConfiguration" target="_blank">configure it for static site hosting</a>.</li>
<li>Upload all my files and <a href="http://trac.cyberduck.ch/wiki/help/en/howto/s3#AccessControlACL" target="_blank">change their permissions</a> to make them readable by everyone.</li>
<li>Done!</li>
</ol>
<p>Updating the site is easy &#8211; just select the file in Cyberduck and click the &#8216;Edit&#8217; icon in the toolbar (or hit ⌘K) and it will automatically upload the file whenever you save. If I needed a real deploy system it&#8217;d be pretty easy to whip up something with <a href="http://docs.fabfile.org/en/1.0.0/index.html" target="_blank">Fabric</a> and <a href="http://code.google.com/p/boto/" target="_blank">Boto</a>.</p>
<p>Overall it seems like a great way to host a static site on the cheap (~$1.50/year for this). The only real downside is that you can&#8217;t have your root domain hit the bucket because a CNAME must be used. This means that <a rel="nofollow" href="http://ec2instances.info" target="_blank">ec2instances.info</a> does not resolve properly. More details <a href="https://forums.aws.amazon.com/thread.jspa?messageID=228100" target="_blank">here</a>.</p>
<p>Note: I tried to use Amazon&#8217;s new <a href="http://aws.amazon.com/route53/" target="_blank">Route 53</a> DNS service instead of my slicehost account but <a href="http://dmz.us/2010/12/amazon-route-53-dns/" target="_blank">the configuration</a> is still a bit more involved than I&#8217;d like. Hopefully they&#8217;ll add it to the AWS web console soon.</p>
<div><span style="font-size: 16px; line-height: 24px;"><br />
</span></div>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2011/03/hosting-a-static-site-on-amazon-s3-ec2instances-info/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Use git-hooks to make sure you never check in ugly code again</title>
		<link>http://powdahound.com/2010/08/use-git-hooks-to-make-sure-you-never-check-in-ugly-code-again</link>
		<comments>http://powdahound.com/2010/08/use-git-hooks-to-make-sure-you-never-check-in-ugly-code-again#comments</comments>
		<pubDate>Sun, 08 Aug 2010 00:00:28 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367096</guid>
		<description><![CDATA[The git-hooks project provides a way to run git hooks locally before you check in your code. This is especially useful if your code is hosted on GitHub because you don&#8217;t have access to install server side hooks. From the README: Hooks can be very powerful and useful. Some common hooks include: - Spell check the [...]]]></description>
				<content:encoded><![CDATA[<p>The <a title="icefox's git-hooks on github" href="http://github.com/icefox/git-hooks" target="_blank">git-hooks</a> project provides a way to run git hooks locally before you check in your code. This is especially useful if your code is hosted on <a href="http://github.com" target="_blank">GitHub</a> because you don&#8217;t have access to install server side hooks.</p>
<p>From the README:</p>
<blockquote><p>Hooks can be very powerful and useful.  Some common hooks include:</p>
<p>- Spell check the commit message.<br />
- Check that the code builds.<br />
- Verify that any new files contain a copyright with the current year in it.</p>
<p>Hooks can be very project specific such as:</p>
<p>- Verify that the project still builds<br />
- Verify that autotests matching the modified files still pass with no errors.<br />
- Pre-populate the commit message with the &#8216;standard&#8217; format.<br />
- Verify that any new code follows the &#8216;standard&#8217; coding style.</p>
<p>or very specific to one person such as:</p>
<p>- Don&#8217;t allow a push to a remote repository after 1am in case I break something and will be asleep.<br />
- Don&#8217;t let me commit between 9-5 for projects in ~/personal/ as I shouldn&#8217;t be working on them during work hours.
</p></blockquote>
<p>I wrote some hooks for <a href="http://github.com/powdahound/git-hooks/blob/master/contrib/pre-commit/php_syntax" target="_blank">checking PHP syntax</a> and checking Python files using <a href="http://github.com/powdahound/git-hooks/blob/master/contrib/pre-commit/python_pep8" target="_blank">PEP-8</a> and <a href="http://github.com/powdahound/git-hooks/blob/master/contrib/pre-commit/python_pyflakes" target="_blank">PyFlakes</a>.</p>
<p>Hopefully they&#8217;ll integrate this functionality into the git core at some point.</p>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2010/08/use-git-hooks-to-make-sure-you-never-check-in-ugly-code-again/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Perform a command serially in Capistrano</title>
		<link>http://powdahound.com/2010/07/perform-a-command-serially-in-capistrano</link>
		<comments>http://powdahound.com/2010/07/perform-a-command-serially-in-capistrano#comments</comments>
		<pubDate>Sat, 31 Jul 2010 18:14:23 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367104</guid>
		<description><![CDATA[Capistrano is a great tool for doing software deployments and other system maintenance tasks (although for anything larger, I&#8217;d recommend Chef).  One small Capistrano issue I ran into this week is that there&#8217;s no way to run a command in serial across multiple machines (commands are always run in parallel). You might want to do [...]]]></description>
				<content:encoded><![CDATA[<p><a title="capify.org" href="http://www.capify.org" target="_blank">Capistrano</a> is a great tool for doing software deployments and other system maintenance tasks (although for anything larger, I&#8217;d recommend <a title="Opscode Chef" href="http://wiki.opscode.com/display/chef/Home" target="_blank">Chef</a>).  One small Capistrano issue I ran into this week is that there&#8217;s no way to run a command in serial across multiple machines (commands are always <a title="Capistrano's run command" href="http://www.capify.org/index.php/Run" target="_blank">run</a> in parallel). You might want to do this if you need to make sure that at least one service in a group is available at all times, or if the service restarting is going to put some load on another resource such as a database.</p>
<p>Here&#8217;s the solution I came up with:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;">desc <span style="color:#996600;">&quot;Do a rolling restart of &lt;service&gt;&quot;</span>
deploy.<span style="color:#9900CC;">task</span> <span style="color:#ff3333; font-weight:bold;">:restart</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  hosts = <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">roles</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:server</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_ary</span> <span style="color:#008000; font-style:italic;"># change :server to your role</span>
  num_hosts = hosts.<span style="color:#9900CC;">size</span>
  hosts.<span style="color:#9900CC;">each_with_index</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>host, i<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Restarting &lt;service&gt; on #{host} (#{i+1} of #{num_hosts})&quot;</span>
    sudo <span style="color:#996600;">&quot;/etc/init.d/&lt;sevice&gt; restart&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:hosts</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> host
    <span style="color:#9966CC; font-weight:bold;">if</span> i <span style="color:#006600; font-weight:bold;">&lt;</span> num_hosts<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">1</span>
      <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Waiting 3s before next host.&quot;</span>
      <span style="color:#CC0066; font-weight:bold;">sleep</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2010/07/perform-a-command-serially-in-capistrano/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Email alerts for PHP errors via SEC</title>
		<link>http://powdahound.com/2010/07/email-alerts-for-php-errors-via-sec</link>
		<comments>http://powdahound.com/2010/07/email-alerts-for-php-errors-via-sec#comments</comments>
		<pubDate>Fri, 23 Jul 2010 14:19:52 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[hipchat]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sec]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367102</guid>
		<description><![CDATA[Production systems should always have PHP&#8217;s display_errors disabled and log_errors enabled so errors are logged instead of displayed to users. Of course, you&#8217;ll want a to be notified when errors happen and that&#8217;s where a nifty tool called SEC (Simple Event Correlator) comes in. It&#8217;s not very sexy, but its incredibly powerful and can be used [...]]]></description>
				<content:encoded><![CDATA[<p>Production systems should always have PHP&#8217;s <a title="PHP display_errors" href="http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors" target="_blank">display_errors</a> disabled and <a title="PHP log_errors" href="http://www.php.net/manual/en/errorfunc.configuration.php#ini.log-errors" target="_blank">log_errors</a> enabled so errors are logged instead of displayed to users. Of course, you&#8217;ll want a to be notified when errors happen and that&#8217;s where a nifty tool called <a title="SEC" href="http://simple-evcorr.sourceforge.net/" target="_blank">SEC</a> (Simple Event Correlator) comes in. It&#8217;s not very sexy, but its incredibly powerful and can be used for all sorts of log watching tasks.</p>
<p>Here are some helpful guides for getting started:</p>
<ul>
<li><a href="http://sixshooter.v6.thrupoint.net/SEC-examples/article.html" target="_blank">Working with SEC- the Simple Event Correlator</a></li>
<li><a href="http://arstechnica.com/open-source/news/2005/05/linux-20050519.ars" target="_blank"></a><a href="http://arstechnica.com/open-source/news/2005/05/linux-20050519.ars" target="_blank">Monitoring with Simple Event Correlator</a></li>
<li><a href="http://www.estpak.ee/~risto/sec/sec.pl.html" target="_blank">sec man page</a></li>
</ul>
<p>At <a href="http://www.hipchat.com" target="_blank">HipChat</a> we use a config like the following to to monitor Apache&#8217;s error_log for PHP errors and send us emails:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="text" style="font-family:monospace;"># Capture error lines and store them in apache-php-errors
type=Single
ptype=RegExp
pattern=^\[.+\] \[error\] \[client .+\] PHP .+$
desc=PHP error or warning
action=add apache-php-errors $0
&nbsp;
# Report errors every minute if apache-php-errors is set
type=Calendar
time=* * * * *
desc=Mail web errors
context=apache-php-errors
action=report apache-php-errors /usr/bin/mail -s &quot;PHP errors&quot; alerts@company.com; delete apache-php-errors;</pre></td></tr></table></div>

<p>Assuming you put this config in /etc/sec/apache.conf you&#8217;d run:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666;">$ </span>sec <span style="color: #660033;">--conf</span>=<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>sec<span style="color: #000000; font-weight: bold;">/</span>apache.conf <span style="color: #660033;">--input</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>error_log</pre></td></tr></table></div>

<p>Try writing a few of your own rules (the &#8211;debug flag is very helpful) or the examples in the tutorials above. SEC is incredibly powerful and can make complex monitoring tasks very simple.</p>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2010/07/email-alerts-for-php-errors-via-sec/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>2010 ski movie trailers</title>
		<link>http://powdahound.com/2010/07/2010-ski-movie-trailers</link>
		<comments>http://powdahound.com/2010/07/2010-ski-movie-trailers#comments</comments>
		<pubDate>Tue, 20 Jul 2010 04:15:24 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Skiing]]></category>
		<category><![CDATA[skiing]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=157</guid>
		<description><![CDATA[Trailers for the 2010 ski movies are starting to land! Here&#8217;s what I&#8217;ve found so far: Level 1 Productions &#8211; Eye Trip Matchstick Productions &#8211; The Way I See It Poor Boyz Productions &#8211; Revolver. Teton Gravity Research &#8211; Light the Wick Warren Miller &#8211; Session #61]]></description>
				<content:encoded><![CDATA[<p>Trailers for the 2010 ski movies are starting to land! Here&#8217;s what I&#8217;ve found so far:</p>
<p><strong><a href="http://level1productions.com/" target="_blank">Level 1 Productions</a> &#8211; Eye Trip</strong><br />
<object width="601" height="338"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=12966778&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=c9ff23&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=12966778&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=c9ff23&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="601" height="338"></embed></object></p>
<p><strong><a href="http://www.skimovie.com/ target=">Matchstick Productions</a> &#8211; The Way I See It</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/KZDbhH8Cw0o&amp;hl=en_US&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="385" src="http://www.youtube.com/v/KZDbhH8Cw0o&amp;hl=en_US&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong><a href="http://www.poorboyz.com/" target="_blank">Poor Boyz Productions</a> &#8211; Revolver</strong>.</p>
<p><object width="640" height="385"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13841780&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13841780&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="385"></embed></object></p>
<p><strong><a href="http://www.tetongravity.com/" target="_blank">Teton Gravity Research</a> &#8211; Light the Wick</strong><br />
 <embed src="http://www.tetongravity.com/jw/embedplayer.swf" width="460" height="279" allowscriptaccess="always" allowfullscreen="true" flashvars="file=http://media2.kickapps.com/videos/1153476.mp4&#038;image=http://media.kickstatic.com/kickapps/images/75233/photos/VIDEO_1153476_75233_4385701_ap.jpg&#038;plugins=embed-1&#038;embed.code=+%3cembed+src%3d%22http%3a%2f%2fwww.tetongravity.com%2fjw%2fembedplayer.swf%22+width%3d%22460%22+height%3d%22279%22+allowscriptaccess%3d%22always%22+allowfullscreen%3d%22true%22+flashvars%3d%22file%3dhttp%3a%2f%2fmedia2.kickapps.com%2fvideos%2f1153476.mp4%26image%3dhttp%3a%2f%2fmedia.kickstatic.com%2fkickapps%2fimages%2f75233%2fphotos%2fVIDEO_1153476_75233_4385701_ap.jpg%26plugins%3dembed-1%22%2f%3e"/></p>
<p><strong><a href="http://www.skinet.com/warrenmiller/" target="_blank">Warren Miller</a> &#8211; Session #61</strong><script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script><object id="myExperience77703970001" class="BrightcoveExperience"><param name="bgcolor" value="#FFFFFF" /><param name="width" value="640" /><param name="height" value="380" /><param name="playerID" value="37654312001" /><param name="publisherID" value="1276222402"/><param name="isVid" value="true" /><param name="isUI" value="true" /><param name="dynamicStreaming" value="true" /><param name="@videoPlayer" value="77703970001" /><param name="autoStart" value="false" /></object><br />
          <script type="text/javascript">brightcove.createExperiences();</script> </p>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2010/07/2010-ski-movie-trailers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic hosts file using Chef</title>
		<link>http://powdahound.com/2010/07/dynamic-hosts-file-using-chef</link>
		<comments>http://powdahound.com/2010/07/dynamic-hosts-file-using-chef#comments</comments>
		<pubDate>Sun, 18 Jul 2010 16:39:11 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[chef]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[network]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537367053</guid>
		<description><![CDATA[There are a number of ways to setup your infrastructure so that you can refer to machines by hostname. I currently prefer the &#8220;dynamically generated hosts file&#8221; approach because it&#8217;s simple to understand and setting up a DNS server is intimidating (as well as a single point of failure). Shlomo Swidler has a great article [...]]]></description>
				<content:encoded><![CDATA[<p>There are a number of ways to setup your infrastructure so that you can refer to machines by hostname. I currently prefer the &#8220;dynamically generated <a href="http://en.wikipedia.org/wiki/Hosts_(file)" target="_blank">hosts file</a>&#8221; approach because it&#8217;s simple to understand and setting up a DNS server is intimidating (as well as a single point of failure).</p>
<p>Shlomo Swidler has <a href="http://www.shlomoswidler.com/2010/06/track-changes-to-your-dynamic-cloud-services-automatically.html" target="_blank">a great article</a> comparing different DNS configurations as well as some sample code for dynamically updating hosts files. However, if you&#8217;re already using <a href="http://wiki.opscode.com/display/chef/Home" target="_blank">Chef</a> you can achieve the same thing with a very simple cookbook.</p>
<p>First, create a new cookbook:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> chef-repo<span style="color: #000000; font-weight: bold;">/</span>
$ rake new_cookbook <span style="color: #007800;">COOKBOOK</span>=hosts <span style="color: #007800;">CB_PREFIX</span>=site-</pre></td></tr></table></div>

<p>Place the following in site-cookbooks/hosts/recipes/default.rb:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;"># Find all nodes, sorting by Chef ID so their</span>
<span style="color:#008000; font-style:italic;"># order doesn't change between runs.</span>
hosts = search<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:node</span>, <span style="color:#996600;">&quot;*:*&quot;</span>, <span style="color:#996600;">&quot;X_CHEF_id_CHEF_X asc&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
template <span style="color:#996600;">&quot;/etc/hosts&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  source <span style="color:#996600;">&quot;hosts.erb&quot;</span>
  owner <span style="color:#996600;">&quot;root&quot;</span>
  group <span style="color:#996600;">&quot;root&quot;</span>
  mode 0644
  variables<span style="color:#006600; font-weight:bold;">&#40;</span>
    <span style="color:#ff3333; font-weight:bold;">:hosts</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> hosts,
    <span style="color:#ff3333; font-weight:bold;">:fqdn</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> node<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:fqdn</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
    <span style="color:#ff3333; font-weight:bold;">:hostname</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> node<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:hostname</span><span style="color:#006600; font-weight:bold;">&#93;</span>
  <span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Then create the template, site-cookbooks/hosts/templates/default/hosts.erb:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;">127.0.0.1   localhost
&nbsp;
<span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#0066ff; font-weight:bold;">@hosts</span>.<span style="color:#9900CC;">keys</span>.<span style="color:#9900CC;">sort</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>fqdn<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#0066ff; font-weight:bold;">@hosts</span><span style="color:#006600; font-weight:bold;">&#91;</span>fqdn<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:ipaddress</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span> <span style="color:#006600; font-weight:bold;">&lt;%</span>= fqdn <span style="color:#006600; font-weight:bold;">%&gt;</span> <span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#0066ff; font-weight:bold;">@hosts</span><span style="color:#006600; font-weight:bold;">&#91;</span>fqdn<span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:hostname</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
<span style="color:#006600; font-weight:bold;">&lt;%</span> <span style="color:#9966CC; font-weight:bold;">end</span> <span style="color:#006600; font-weight:bold;">%&gt;</span>
&nbsp;
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts</pre></td></tr></table></div>

<p>Add the recipe to your node&#8217;s run_list and run chef-client and your /etc/hosts should contain all the Chef nodes on your network. Note that one downside to this approach is that updates will be slow (since chef-client only runs every 30 minutes by default).</p>
<p>Now what if you wanted to point at a specific service, like having chef.example.com point at your Chef master? Just search for it in your recipe (and add it to the variables list):</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;">chef_server = search<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:node</span>, <span style="color:#996600;">'run_list:recipe<span style="color:#000099;">\[</span>chef<span style="color:#000099;">\:</span><span style="color:#000099;">\:</span>server<span style="color:#000099;">\]</span>'</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></td></tr></table></div>

<p>And add a line to the template:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;"># Chef master server
<span style="color:#006600; font-weight:bold;">&lt;%</span>= <span style="color:#0066ff; font-weight:bold;">@chef_server</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:ipaddress</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span> chef.example.com</pre></td></tr></table></div>

<p>Sure beats <a href="http://elwoodicious.com/2009/08/12/ec2-bind9-dns-pancakes-and-you/" target="_blank">setting up a DNS server</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2010/07/dynamic-hosts-file-using-chef/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Redis plugin for collectd</title>
		<link>http://powdahound.com/2010/06/redis-plugin-for-collectd</link>
		<comments>http://powdahound.com/2010/06/redis-plugin-for-collectd#comments</comments>
		<pubDate>Mon, 28 Jun 2010 02:33:57 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[collectd]]></category>
		<category><![CDATA[drraw]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[redis]]></category>
		<category><![CDATA[rrdtool]]></category>

		<guid isPermaLink="false">http://powdahound.com/?p=537366920</guid>
		<description><![CDATA[Last weekend I wrote a small collectd plugin for monitoring Redis and put it on GitHub: http://github.com/powdahound/redis-collectd-plugin. If you haven&#8217;t heard of Redis before, it&#8217;s a key-value store similar to memcached with support for more complex data types like lists, sets, and hashes. collectd is a stats collection daemon which recently added support for plugins [...]]]></description>
				<content:encoded><![CDATA[<p>Last weekend I wrote a small <a title="collectd.org" href="http://collectd.org/" target="_blank">collectd</a> plugin for monitoring <a title="Redis on Google Code" href="http://code.google.com/p/redis/" target="_blank">Redis</a> and put it on GitHub: <a href="http://github.com/powdahound/redis-collectd-plugin" target="_blank">http://github.com/powdahound/redis-collectd-plugin</a>.</p>
<p>If you haven&#8217;t heard of Redis before, it&#8217;s a key-value store similar to <a title="memcached.org" href="http://memcached.org/" target="_blank">memcached</a> with support for more complex <a title="Redis data types" href="http://code.google.com/p/redis/wiki/IntroductionToRedisDataTypes" target="_blank">data types</a> like lists, sets, and hashes. collectd is a stats collection daemon which recently added support for <a title="collectd Python plugin" href="http://collectd.org/wiki/index.php/Plugin:Python" target="_blank">plugins written in Python</a>. This is great because there&#8217;s no way I&#8217;d write a plugin in C! Anyway, you can use this plugin to collect data about your Redis server like number of active connections, database size, commands processed per second, and memory usage. You can then use a tool like <a title="drraw - rrdtool graphing utility" href="http://web.taranis.org/drraw/" target="_blank">drraw</a> to generate nice graphs:</p>
<p><img src="http://github.com/powdahound/redis-collectd-plugin/raw/master/screenshots/graph_memory_used.png" alt="" /></p>
<p><img src="http://github.com/powdahound/redis-collectd-plugin/raw/master/screenshots/graph_commands_per_sec.png" alt="" /></p>
<p>More info and installation instructions on the <a href="http://github.com/powdahound/redis-collectd-plugin" target="_blank">GitHub page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2010/06/redis-plugin-for-collectd/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tricky Apache configuration bug</title>
		<link>http://powdahound.com/2009/11/tricky-apache-configuration-bug</link>
		<comments>http://powdahound.com/2009/11/tricky-apache-configuration-bug#comments</comments>
		<pubDate>Wed, 11 Nov 2009 07:01:29 +0000</pubDate>
		<dc:creator>garret</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://blog.powdahound.com/post/239555172</guid>
		<description><![CDATA[When using Apache’s DirectoryIndex directive make sure you don’t separate the values with commas. If you do, Apache will be looking for filenames ending in commas! # Incorrect DirectoryIndex index.html, index.php, index.cgi &#160; # Correct DirectoryIndex index.html index.php index.cgi]]></description>
				<content:encoded><![CDATA[<p>When using Apache’s <a href="http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex" target="_blank">DirectoryIndex</a> directive make sure you don’t separate the values with commas. If you do, Apache will be looking for filenames ending in commas!</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Incorrect</span>
<span style="color: #00007f;">DirectoryIndex</span> index.html, index.php, index.cgi
&nbsp;
<span style="color: #adadad; font-style: italic;"># Correct</span>
<span style="color: #00007f;">DirectoryIndex</span> index.html index.php index.cgi</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://powdahound.com/2009/11/tricky-apache-configuration-bug/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using n/a
Object Caching 751/820 objects using disk: basic

 Served from: powdahound.com @ 2013-05-21 19:05:23 by W3 Total Cache -->