<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<feed xmlns="http://www.w3.org/2005/Atom">

	<title>Planet GSLUG</title>
	<link rel="self" href="atom.xml"/>
	<link href="default"/>
	<id>atom.xml</id>
	<updated>2012-04-22T21:00:05+00:00</updated>
	<generator uri="http://www.planetplanet.org/">Planet/2.0 +http://www.planetplanet.org</generator>

	<entry xml:lang="en">
		<title type="html">Save power: sleep your Ubuntu home server</title>
		<link href="http://adammonsen.com/post/829?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=save-power-sleep-your-ubuntu-server"/>
		<id>http://adammonsen.com/?p=829</id>
		<updated>2012-03-19T05:30:59+00:00</updated>
		<content type="html">&lt;p&gt;I don&amp;#8217;t need my server on while I&amp;#8217;m sleeping. Turns out Ubuntu servers love to sleep, too.&lt;/p&gt;&lt;p&gt;The first hurdle was nontechnical. I had to decide that I was ok not being on IRC while asleep. Once I made this decision, I realized it was the right decision anyway.&lt;/p&gt;&lt;p&gt;The next hurdle was scheduled late-night backups. They&amp;#8217;re important. What if the server is powered down when a job is scheduled to run? Anacron to the rescue! When you install it on Ubuntu it transparently takes over daily, monthly, and weekly cron jobs. I installed anacron with&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;span&gt;sudo&lt;/span&gt; &lt;span&gt;apt-get&lt;/span&gt; &lt;span&gt;install&lt;/span&gt; anacron&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now, to install a new daily backup job managed by anacron, the easiest thing to do is just add an executable script to &lt;code&gt;/etc/cron.daily&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;I also have a bunch of @daily stuff in my personal crontab. There are a couple more steps to &lt;a href=&quot;http://serverfault.com/questions/172989/user-specific-anacrontab&quot;&gt;get it working as a non-root user&lt;/a&gt;, but it&amp;#8217;s doable.&lt;/p&gt;&lt;p&gt;To actually put the computer to sleep I use&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;span&gt;sudo&lt;/span&gt; pm-suspend&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;over an SSH connection (since the server is normally headless). The first time I tried this &lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=1550096&quot;&gt;the box just froze&lt;/a&gt;, but I haven&amp;#8217;t been able to repro that since I unplugged the VGA monitor and created swap space. Not sure which of those changes, if either, allowed suspend to work.&lt;/p&gt;&lt;p&gt;I&amp;#8217;d also like to resume the box with &lt;code&gt;wakeonlan&lt;/code&gt;, but it doesn&amp;#8217;t work. Both machines are on the same switch, but the BIOS or ethernet card may not support wake-on-lan.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">tmux, .bashrc, .bash_profile, and you</title>
		<link href="http://blog.trevorbramble.com/past/2012/3/12/tmux_bashrc_bash_profile_and_you/"/>
		<id>http://blog.trevorbramble.com/past/2012/3/12/tmux_bashrc_bash_profile_and_you/</id>
		<updated>2012-03-12T17:24:27+00:00</updated>
		<content type="html">&lt;p&gt;You may be surprised to find, upon first trying tmux, that it doesn&amp;#8217;t execute your .bashrc file when loading shells. That is, &lt;em&gt;I&lt;/em&gt; was confused.&lt;/p&gt;

&lt;p&gt;You may also wonder what the difference between .bashrc and .bash_profile is, as you&amp;#8217;ll often see .bash_profile on Apple systems and .bashrc everywhere else. That is, &lt;em&gt;I&lt;/em&gt; wondered.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;When started as an interactive login shell:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bash reads and executes the /etc/profile (if it exists).&lt;/li&gt;

&lt;li&gt;After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile in that order, and reads and executes the first one (that exists and is readable).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When a login shell exits:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bash reads and executes ~/.bash_logout (if it exists).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;When started as an interactive shell (but not a login shell):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bash reads and executes ~/.bashrc (if it exists). This may be inhibited by using the &amp;#8211;norc option. The &amp;#8211;rcfile file option will force Bash to read and execute commands from file instead of ~/.bashrc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Thank you, Wikipedia!&lt;/p&gt;

&lt;p&gt;So, tmux is confused about which scripts to run. Temporarily, I just added a ~/.bash_profile file with the simple contents of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;. ~/.bashrc&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And now tmux runs my .bashrc file. It&amp;#8217;s not the real fix, but it works for the moment.&lt;/p&gt;</content>
		<author>
			<name>Trevor Bramble</name>
			<uri></uri>
		</author>
		<source>
			<title type="html">blog.TrevorBramble.com</title>
			<link rel="self" href="http://blog.trevorbramble.com/atom"/>
			<id>http://blog.trevorbramble.com/</id>
			<updated>2012-04-22T21:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Squelch Doctrine/MongoDB logging in Symfony2</title>
		<link href="http://adammonsen.com/post/827?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=squelch-doctrinemongodb-logging-in-symfony2"/>
		<id>http://adammonsen.com/?p=827</id>
		<updated>2012-03-06T03:30:46+00:00</updated>
		<content type="html">&lt;p&gt;If you use Doctrine+MongoDB in Symfony2, you may have flood of mongodb queries in your dev environment log. Here&amp;#8217;s a snippet of code for &lt;code&gt;app/config/config.yml&lt;/code&gt; that will squelch them:&lt;/p&gt;&lt;pre&gt;
doctrine_mongodb:
  document_managers:
    default:
      logging: false
&lt;/pre&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">SSH connections hanging: fixed by disabling TCP window scaling</title>
		<link href="http://adammonsen.com/post/820?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=ssh-connections-hanging-fixed-by-disabling-tcp-window-scaling"/>
		<id>http://adammonsen.com/?p=820</id>
		<updated>2012-02-29T00:25:03+00:00</updated>
		<content type="html">&lt;p&gt;This is mainly just for my own future reference, but you may end up here via a web search if you ran into the same problem.&lt;/p&gt;&lt;p&gt;I use &lt;a href=&quot;http://symfony.com/&quot;&gt;Symfony2&lt;/a&gt;, which leverages Git to manage bundles (a.k.a. libraries). There&amp;#8217;s a script called &amp;#8220;vendors&amp;#8221; which can (&lt;a href=&quot;https://github.com/symfony/symfony-standard/commit/bd6c85e86e1ec71cdb67f47022db9f4e5571454a&quot;&gt;currently&lt;/a&gt;) be used to update bundles. Running &lt;code&gt;bin/vendors install&lt;/code&gt; is a common operation: this descends into every bundle directory and pulls down the latest code. All of my own bundles are reached via git+ssh.&lt;/p&gt;&lt;p&gt;The git+ssh connections to update my bundles were hanging. There are many layers that could be malfunctioning, but I first suspected my failing Netgear wireless access point / router. Lately, weekly reboots have been necessary to even be able to associate with the thing.  I also &lt;a href=&quot;http://serverfault.com/questions/364708/can-a-very-large-etc-hosts-deny-slow-down-ssh-connections&quot;&gt;suspected my &lt;code&gt;/etc/hosts.deny&lt;/code&gt; was too big&lt;/a&gt;, but these connections were &lt;strong&gt;&lt;em&gt;really&lt;/em&gt;&lt;/strong&gt; slow, hanging for minutes at a time (where they were usually instant).&lt;/p&gt;&lt;p&gt;I happened upon &lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=133884&quot;&gt;this old bug&lt;/a&gt;, and decided it might indeed be my router. I ultimately have no idea why, but here&amp;#8217;s what fixed the hanging connections for me:&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;span&gt;echo&lt;/span&gt; &lt;span&gt;0&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;sudo&lt;/span&gt; &lt;span&gt;tee&lt;/span&gt; &lt;span&gt;/&lt;/span&gt;proc&lt;span&gt;/&lt;/span&gt;sys&lt;span&gt;/&lt;/span&gt;net&lt;span&gt;/&lt;/span&gt;ipv4&lt;span&gt;/&lt;/span&gt;tcp_window_scaling&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;I imagine this should be a temporary change, since it sounds like &lt;a href=&quot;http://en.wikipedia.org/wiki/TCP_window_scale_option&quot;&gt;TCP window scaling&lt;/a&gt; generally results in more efficient data transfer.&lt;/p&gt;&lt;p&gt;I&amp;#8217;m going to &lt;a href=&quot;http://www.urbandictionary.com/define.php?term=round%20file&quot;&gt;round file&lt;/a&gt; the netgear tonight, hopefully that&amp;#8217;s the problem.&lt;/p&gt;&lt;p&gt;Other ideas:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=838873&quot;&gt;http://ubuntuforums.org/showthread.php?t=838873&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://ubuntuforums.org/showthread.php?t=1748580&quot;&gt;http://ubuntuforums.org/showthread.php?t=1748580&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://nowhere.dk/articles/natty-narwhal-problems-connecting-to-servers-behind-cisco-firewalls-using-ssh&quot;&gt;https://nowhere.dk/articles/natty-narwhal-problems-connecting-to-servers-behind-cisco-firewalls-using-ssh&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Bufferbloat&quot;&gt;https://en.wikipedia.org/wiki/Bufferbloat&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Reading Webpages. Like, actually reading!</title>
		<link href="http://adammonsen.com/post/805?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=reading-webpages-like-actually-reading"/>
		<id>http://adammonsen.com/?p=805</id>
		<updated>2012-02-05T17:05:57+00:00</updated>
		<content type="html">&lt;p&gt;Forget surfing. Clicking from page to page, skimming paragraphs, forgetting it immediately. Someone spent quality time writing, I want to spend quality time reading. Like the good old days. Reading beautiful print on paper, understanding, thinking about what I&amp;#8217;m reading.&lt;/p&gt;&lt;p&gt;Along these lines, I totally heart that &amp;#8220;READER&amp;#8221; trick iOS 5 Mobile Safari does with some webpages. Anyone know how to teach Chrome or Firefox to do the same?&lt;/p&gt;&lt;p&gt;If you haven&amp;#8217;t heard of it, see &lt;a href=&quot;http://www.apple.com/ios/features.html#gallery-safari-reader&quot;&gt;http://www.apple.com/ios/features.html#gallery-safari-reader&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This is an absolute revolution in &lt;strong&gt;actually reading&lt;/strong&gt; overstyled, ad-riddled online content. I even find myself hitting the READER button for fairly clean content because it always produces a consistent result.&lt;/p&gt;&lt;p&gt;&lt;em&gt;This really shouldn&amp;#8217;t be a revolution&lt;/em&gt;. We know people can read/concentrate/comprehend better without distraction!&lt;/p&gt;&lt;p&gt;Crosspost: &lt;a href=&quot;https://plus.google.com/109728769351141658237/posts/TCsVTGf5jeM&quot;&gt;https://plus.google.com/109728769351141658237/posts/TCsVTGf5jeM&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Update: &lt;a href=&quot;https://plus.google.com/100678727802291315527&quot; rel=&quot;nofollow&quot;&gt;Krzysiek G&amp;#322;&amp;#281;bowicz&lt;/a&gt; mentioned &lt;a href=&quot;https://addons.mozilla.org/pl/firefox/addon/readability/&quot;&gt;Readability&lt;/a&gt; and I found &lt;a href=&quot;http://dotepub.com/&quot;&gt;dotEPUB&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Auto-update bind 9 zone database serial numbers</title>
		<link href="http://adammonsen.com/post/796?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=auto-update-bind-9-zone-database-serial-numbers"/>
		<id>http://adammonsen.com/?p=796</id>
		<updated>2012-01-31T23:45:46+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://www.debian-administration.org/articles/381&quot;&gt;This post&lt;/a&gt; is helpful for configuring emacs to automatically update the &amp;#8220;Serial&amp;#8221; in bind zone databases. I wanted to do the same in Vim, but the solutions in the comments of that post didn&amp;#8217;t work for me. Here&amp;#8217;s a version that does. It&amp;#8217;s yours for free under the Affero GPL v3 (or any later version, at your preference):&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;vim&quot;&gt;&lt;span&gt;function&lt;/span&gt; s&lt;span&gt;:&lt;/span&gt;BindZoneSettings&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
    &lt;span&gt;function&lt;/span&gt; s&lt;span&gt;:&lt;/span&gt;UpdateBindZoneSerial&lt;span&gt;&amp;#40;&lt;/span&gt;date, num&lt;span&gt;&amp;#41;&lt;/span&gt;
        &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;strftime&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;quot;%Y%m%d&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; == a&lt;span&gt;:&lt;/span&gt;date&lt;span&gt;&amp;#41;&lt;/span&gt;
            &lt;span&gt;return&lt;/span&gt; a&lt;span&gt;:&lt;/span&gt;date &lt;span&gt;.&lt;/span&gt; a&lt;span&gt;:&lt;/span&gt;num&lt;span&gt;+&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;
        &lt;span&gt;endif&lt;/span&gt;
        &lt;span&gt;return&lt;/span&gt; &lt;span&gt;strftime&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;quot;%Y%m%d&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;.&lt;/span&gt; &lt;span&gt;'01'&lt;/span&gt;
    endfunction
&amp;nbsp;
    &lt;span&gt;function&lt;/span&gt; s&lt;span&gt;:&lt;/span&gt;ReplaceBindZoneSerialLine&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
        &lt;span&gt;:%&lt;/span&gt;s&lt;span&gt;/&lt;/span&gt;\&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;\&lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;7&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;\&lt;span&gt;&amp;#41;&lt;/span&gt;\&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt;9&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;\&lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;\&lt;span&gt;&amp;#41;&lt;/span&gt;\&lt;span&gt;&amp;#40;&lt;/span&gt;\s&lt;span&gt;*&lt;/span&gt;;\s&lt;span&gt;*&lt;/span&gt;Serial\&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;\=UpdateBindZoneSerial&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;submatch&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;, &lt;span&gt;submatch&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;.&lt;/span&gt; &lt;span&gt;submatch&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;3&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;/&lt;/span&gt;g
    endfunction
&amp;nbsp;
    &lt;span&gt;autocmd&lt;/span&gt; &lt;span&gt;BufWritePre&lt;/span&gt; &lt;span&gt;/&lt;/span&gt;etc&lt;span&gt;/&lt;/span&gt;bind&lt;span&gt;/&lt;/span&gt;db&lt;span&gt;.*&lt;/span&gt; &lt;span&gt;call&lt;/span&gt; ReplaceBindZoneSerialLine&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;
endfunction&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Stubbing class constants with rspec and Ruby</title>
		<link href="http://blog.loftninjas.org/2012/01/23/stubbing-class-constants-with-rspec/"/>
		<id>http://blog.loftninjas.org/?p=748</id>
		<updated>2012-01-23T23:12:39+00:00</updated>
		<content type="html">&lt;p&gt;I had some Ruby code that utilized File::SEPARATOR and File::PATH_SEPARATOR to run on both unix and windows, so I wanted to stub these values to test for both platforms. There are couple examples out there, building on each other. This &lt;a href=&quot;http://digitaldumptruck.jotabout.com/?p=551&quot;&gt;example&lt;/a&gt; adds a feature that saves and recalls the former value and this &lt;a href=&quot;http://missingbit.blogspot.com/2011/07/stubbing-constants-in-rspec_20.html&quot;&gt;example&lt;/a&gt; builds on that to support class constants. Both expect Activerecord, so there&amp;#8217;s a little working around that added here. I&amp;#8217;m ripping this directly from my spec_helper.rb before I throw it away because it feels over-engineered and complicated.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
def with_warnings(flag)
  old_verbose, $VERBOSE = $VERBOSE, flag
  yield
ensure
  $VERBOSE = old_verbose
end

# http://missingbit.blogspot.com/2011/07/stubbing-constants-in-rspec_20.html
def parse_constant(constant)
  source, _, constant_name = constant.to_s.rpartition('::')

  [constantize(source), constant_name]
end

def with_constants(constants, &amp;amp;block)
  saved_constants = {}
  constants.each do |constant, val|
    source_object, const_name = parse_constant(constant)

    saved_constants[constant] = source_object.const_get(const_name)
    with_warnings(nil) {source_object.const_set(const_name, val) }
  end

  begin
    block.call
  ensure
    constants.each do |constant, val|
      source_object, const_name = parse_constant(constant)

      with_warnings(nil) { source_object.const_set(const_name, saved_constants[constant]) }
    end
  end
end
####################

# File activesupport/lib/active_support/inflector/methods.rb, line 209
def constantize(camel_cased_word)
  names = camel_cased_word.split('::')
  names.shift if names.empty? || names.first.empty?

  constant = Object
  names.each do |name|
    constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name)
  end
  constant
end
&lt;/pre&gt;
&lt;p&gt;Then you can perform:&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
  it &amp;quot;does something when running on Windows&amp;quot; do
    with_constants &amp;quot;::File::PATH_SEPARATOR&amp;quot; =&amp;gt; &amp;quot;;&amp;quot; do
      # code
    end
  end
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Downloading All The Github Repositories</title>
		<link href="http://blog.loftninjas.org/2012/01/12/downloading-all-the-github-repositories/"/>
		<id>http://blog.loftninjas.org/?p=745</id>
		<updated>2012-01-12T16:00:31+00:00</updated>
		<content type="html">&lt;p&gt;I had a need to grab all of the &lt;a href=&quot;https://github.com/cookbooks&quot;&gt;Github repositories for Cookbooks&lt;/a&gt;, which is a Github user maintained by the Chef community for collecting many cookbooks in one place for development. All of these cookbooks should be on the &lt;a href=&quot;http://community.opscode.com/&quot;&gt;Opscode Community&lt;/a&gt; site, which is where you should go if you&amp;#8217;re browsing for cookbooks to use yourself. But I needed to grep through a large number of cookbooks to develop statistics on Chef Cookbook usage patterns, so I needed &lt;a href=&quot;http://knowyourmeme.com/memes/x-all-the-y&quot;&gt;All The Things&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
#!/usr/bin/env ruby
# 2012-01-11 Bryan McLellan &amp;lt;btm@loftninjas.org&amp;gt;
# Fetch the list of repositories from a Github user and 'git clone' them all

require 'rubygems'
require 'json'
require 'net/http'

url = &amp;quot;http://github.com/api/v2/json/repos/show/cookbooks&amp;quot;
dir = &amp;quot;cookbooks&amp;quot;

if File.basename(Dir.getwd) != dir
 if File.exists?(dir)
   puts &amp;quot;Target directory of '#{dir}' already exists.&amp;quot;
   exit 1
 end

 Dir.mkdir(dir)
 Dir.chdir(dir)
end

resp = Net::HTTP.get_response(URI.parse(url))
data = resp.body

result = JSON.parse(data)

result['repositories'].each { |repo|
 puts &amp;quot;Fetching #{repo['url']}&amp;quot;
 system &amp;quot;git clone #{repo['url']}&amp;quot;
}
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Get Back at those Fat Cats!</title>
		<link href="http://adammonsen.com/post/790?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=get-back-at-those-fat-cats"/>
		<id>http://adammonsen.com/?p=790</id>
		<updated>2012-01-05T22:15:51+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://itunes.apple.com/us/app/fat-cats/id492003403&quot;&gt;&lt;img src=&quot;http://adammonsen.com/wp-content/uploads/2012/01/fat_cats.jpg&quot; alt=&quot;Fat Cats logo: purple cat in a business suit smoking a cigar&quot; title=&quot;Fat Cats&quot; width=&quot;175&quot; height=&quot;175&quot; class=&quot;alignright size-full wp-image-791&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you have an iPhone or iPad, check out the game &lt;a href=&quot;http://itunes.apple.com/us/app/fat-cats/id492003403&quot;&gt;Fat Cats&lt;/a&gt;!&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Browser Pause</title>
		<link href="http://adammonsen.com/post/785?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=browser-pause"/>
		<id>http://adammonsen.com/?p=785</id>
		<updated>2012-01-01T06:08:45+00:00</updated>
		<content type="html">&lt;p&gt;Here&amp;#8217;s an idea for Web browsers. When the browser window loses focus, stop everything. Freeze all threads, animated images, scripts, plugins&amp;#8230; everything. This would be most useful as a setting that could be enabled and disabled at will. Sometimes I&amp;#8217;d just like the browser to just simmer down while my attention is elsewhere. No need to be AJAXing around and stuff.&lt;/p&gt;&lt;p&gt;Thoughts?&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Don’t Get Locked In</title>
		<link href="http://adammonsen.com/post/778?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=dont-get-locked-in"/>
		<id>http://adammonsen.com/?p=778</id>
		<updated>2011-12-22T23:55:20+00:00</updated>
		<content type="html">&lt;p&gt;Here&amp;#8217;s a Public Service Announcement for those of you who wish to buy an iPhone and might want to use it for a different carrier than the one the phone is locked with.&lt;/p&gt;&lt;h1&gt;You can&amp;#8217;t.*&lt;/h1&gt;&lt;p&gt;If you buy an At&amp;amp;t iPhone, Apple says Thou Shalt Only Use Thy iPhone with At&amp;amp;t, and makes it &lt;em&gt;very&lt;/em&gt; difficult to use the phone with, say, T-Mobile. You&amp;#8217;ll get to use the phone, but At&amp;amp;t and Apple really still own part of it, the part that says how the phone can be used.&lt;/p&gt;&lt;p&gt;Strange, isn&amp;#8217;t it? It&amp;#8217;s like you bought a roll of duct tape, but it only works on ducts.&lt;/p&gt;&lt;p&gt;Other ideas:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;buy an unlocked iPhone instead. iPhones hold their value well, especially unlocked ones. They cost a lot more so the upfront cash required is high, but an unlocked phone gives you the freedom to change carriers anytime for any reason. When you figure out the price of the phone, don&amp;#8217;t just look at the initial price, look at the cost of the contract over the life of the contract and check prices on similar used unlocked phones on eBay.&lt;/li&gt;&lt;li&gt;don&amp;#8217;t buy an iPhone. By purchasing an iPhone you&amp;#8217;re telling Apple that you&amp;#8217;re willing to pay the price of your freedom. Apple pushes hard on its customers, saying what they can and can&amp;#8217;t do. They sure do make awesome technology, but at the cost of personal freedom.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Learn more about freedom at &lt;a href=&quot;https://www.eff.org&quot;&gt;https://www.eff.org&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;* &lt;em&gt;If you are brave, patient, lucky, and desperate, you &lt;/em&gt;may&lt;em&gt; be able to bypass the electronic measures in place which lock the phone to At&amp;amp;t.&lt;/em&gt;&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Dear WordPress</title>
		<link href="http://aendruk.wordpress.com/2011/01/08/dear-wordpress/"/>
		<id>http://aendruk.wordpress.com/?p=1243</id>
		<updated>2011-12-05T03:45:59+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://www.merriam-webster.com/dictionary/spam?show=1&quot;&gt;Spam&lt;/a&gt; comment ≠ Mark comment as spam&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aendruk.files.wordpress.com/2011/05/workspace-1_009.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1244&quot; title=&quot;Spam Comment&quot; src=&quot;http://aendruk.files.wordpress.com/2011/05/workspace-1_009.png?w=450&amp;h=336&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;336&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I do &lt;em&gt;not&lt;/em&gt; want to spam this comment. That work has already been done.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1243/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1243/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1243&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Moodbar previews on the command line</title>
		<link href="http://aendruk.wordpress.com/2011/02/13/moodbar-previews-on-the-command-line/"/>
		<id>http://aendruk.wordpress.com/?p=1188</id>
		<updated>2011-12-05T03:45:50+00:00</updated>
		<content type="html">&lt;p&gt;Visual feedback for your moodbar scanner:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aendruk.files.wordpress.com/2011/02/selection_011.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1190&quot; title=&quot;moodbar-preview-cli&quot; src=&quot;http://aendruk.files.wordpress.com/2011/02/selection_011.png?w=450&amp;h=303&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;303&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/aendruk/moodbar-preview-cli&quot;&gt;Try it out.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And yes, this is a pseudo-graphical application of &lt;a href=&quot;http://en.wikipedia.org/wiki/AWK&quot;&gt;AWK&lt;/a&gt;. I know it&amp;#8217;s weird.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1188/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1188/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1188&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Visualization of an audio codec driver</title>
		<link href="http://aendruk.wordpress.com/2011/02/25/visualization-of-an-audio-codec-driver/"/>
		<id>http://aendruk.wordpress.com/?p=1196</id>
		<updated>2011-12-05T03:45:45+00:00</updated>
		<content type="html">&lt;p&gt;A recent &lt;a href=&quot;http://askubuntu.com/questions/27804/using-microphone-input-port-as-headphone-output&quot;&gt;question&lt;/a&gt; on Ask Ubuntu has prompted me to try to better understand how my sound card works. I don&amp;#8217;t really know where to begin, but a little poking around the ALSA ﻿Intel HDA driver in use on my ThinkPad X60 has revealed a fascinating presentation of how the laptop&amp;#8217;s audio codec is represented by the driver (click to expand):&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: plain; collapse: true; light: false; toolbar: true; wrap-lines: false;&quot;&gt;$ cat /proc/asound/Intel/codec#0
Codec: Analog Devices AD1981
Address: 0
Function Id: 0x1
Vendor Id: 0x11d41981
Subsystem Id: 0x17aa2025
Revision Id: 0x100200
No Modem Function Group found
Default PCM:
    rates [0x7f]: 8000 11025 16000 22050 32000 44100 48000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
Default Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=1, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[3]: enable=0, dir=0, wake=0, sticky=0, data=1, unsol=0
Node 0x02 [Audio Output] wcaps 0x30311: Stereo Digital
  Control: name=&amp;quot;IEC958 Playback Con Mask&amp;quot;, index=0, device=0
  Control: name=&amp;quot;IEC958 Playback Pro Mask&amp;quot;, index=0, device=0
  Control: name=&amp;quot;IEC958 Playback Default&amp;quot;, index=0, device=0
  Control: name=&amp;quot;IEC958 Playback Switch&amp;quot;, index=0, device=0
  Control: name=&amp;quot;IEC958 Default PCM Playback Switch&amp;quot;, index=0, device=0
  Control: name=&amp;quot;IEC958 Playback Source&amp;quot;, index=0, device=0
  Device: name=&amp;quot;AD198x Digital&amp;quot;, type=&amp;quot;SPDIF&amp;quot;, device=1
  Converter: stream=0, channel=0
  Digital: Enabled
  Digital category: 0x0
  PCM:
    rates [0x60]: 44100 48000
    bits [0x2]: 16
    formats [0x5]: PCM AC3
  Delay: 3 samples
  Connection: 2
     0x01* 0x04
Node 0x03 [Audio Output] wcaps 0x441: Stereo
  Device: name=&amp;quot;AD198x Analog&amp;quot;, type=&amp;quot;Audio&amp;quot;, device=0
  Converter: stream=0, channel=0
  Power states:  D0 D3
  Power: setting=D0, actual=D0
  Processing caps: benign=1, ncoeff=70
Node 0x04 [Audio Input] wcaps 0x100511: Stereo
  Device: name=&amp;quot;AD198x Analog&amp;quot;, type=&amp;quot;Audio&amp;quot;, device=0
  Converter: stream=0, channel=0
  SDI-Select: 0
  PCM:
    rates [0x7f]: 8000 11025 16000 22050 32000 44100 48000
    bits [0x6]: 16 20
    formats [0x1]: PCM
  Power states:  D0 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x15
Node 0x05 [Pin Complex] wcaps 0x400187: Stereo Amp-In Amp-Out
  Control: name=&amp;quot;Master Playback Volume&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;Master Playback Switch&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0xb4 0xb4]
  Pincap 0x0001173f: IN OUT HP EAPD Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  EAPD 0x0:
  Pin Default 0xc4014110: [Both] Line Out at Ext Right
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 2
     0x03 0x0e*
Node 0x06 [Pin Complex] wcaps 0x400185: Stereo Amp-Out
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0000001f: OUT HP Detect Trigger ImpSense
  Pin Default 0x422140f0: [N/A] HP Out at Ext Front
    Conn = 1/8, Color = Green
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=00, enabled=0
  Connection: 2
     0x03 0x0e*
Node 0x07 [Pin Complex] wcaps 0x400104: Mono Amp-Out
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80]
  Pincap 0x00000010: OUT
  Pin Default 0x591311f0: [N/A] Speaker at Int ATAPI
    Conn = ATAPI, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x0f
Node 0x08 [Pin Complex] wcaps 0x400083: Stereo Amp-In
  Control: name=&amp;quot;Mic Boost&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Pincap 0x00001727: IN Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0xc4a1502e: [Both] Mic at Ext Right
    Conn = 1/8, Color = Red
    DefAssociation = 0x2, Sequence = 0xe
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
Node 0x09 [Pin Complex] wcaps 0x400187: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0xbf 0xbf]
  Pincap 0x00001737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x418130f0: [N/A] Line In at Ext Rear
    Conn = 1/8, Color = Blue
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x20: IN VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Connection: 2
     0x03* 0x0e
Node 0x0a [Pin Complex] wcaps 0x400301: Stereo Digital
  Pincap 0x00000010: OUT
  Pin Default 0x414411f0: [N/A] SPDIF Out at Ext Rear
    Conn = RCA, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Connection: 1
     0x02
Node 0x0b [Audio Selector] wcaps 0x300101: Stereo
  Connection: 6
     0x03 0x0c 0x09 0x0e* 0x05 0x18
Node 0x0c [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 2
     0x1e 0x1f
Node 0x0d [Audio Selector] wcaps 0x30010c: Mono Amp-Out
  Control: name=&amp;quot;Beep Playback Volume&amp;quot;, index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;Beep Playback Switch&amp;quot;, index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x0f, nsteps=0x0f, stepsize=0x0b, mute=1
  Amp-Out vals:  [0x80]
  Connection: 2
     0x10* 0x16
Node 0x0e [Audio Mixer] wcaps 0x200101: Stereo
  Connection: 8
     0x0d 0x11 0x12 0x13 0x1a 0x1b 0x1c 0x1d
Node 0x0f [Audio Mixer] wcaps 0x200100: Mono
  Connection: 1
     0x0b
Node 0x10 [Beep Generator Widget] wcaps 0x700000: Mono
Node 0x11 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name=&amp;quot;PCM Playback Volume&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;PCM Playback Switch&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x97 0x97]
  Connection: 1
     0x03
Node 0x12 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name=&amp;quot;Mic Playback Volume&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;Mic Playback Switch&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x08
Node 0x13 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x09
Node 0x14 [Power Widget] wcaps 0x500500: Mono
  Power states:  D0 D3
  Power: setting=D0, actual=D0
  Connection: 13
     0x0d 0x0e 0x0f 0x10 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1d
Node 0x15 [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name=&amp;quot;Capture Volume&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;Capture Switch&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;Capture Source&amp;quot;, index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x0f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 8
     0x0c* 0x09 0x0e 0x0f 0x19 0x05 0x18 0x17
Node 0x16 [Pin Complex] wcaps 0x400000: Mono
  Pincap 0x00000020: IN
  Pin Default 0x59f311f0: [N/A] Other at Int ATAPI
    Conn = ATAPI, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
Node 0x17 [Pin Complex] wcaps 0x400081: Stereo
  Pincap 0x00000027: IN Detect Trigger ImpSense
  Pin Default 0x599311f0: [N/A] Aux at Int ATAPI
    Conn = ATAPI, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
  Unsolicited: tag=00, enabled=0
Node 0x18 [Pin Complex] wcaps 0x400187: Stereo Amp-In Amp-Out
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x3d, nsteps=0x3f, stepsize=0x05, mute=1
  Amp-Out vals:  [0xbf 0xbf]
  Pincap 0x00001737: IN OUT Detect Trigger ImpSense
    Vref caps: HIZ 50 GRD 80
  Pin Default 0x41a190f0: [N/A] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0xf, Sequence = 0x0
  Pin-ctls: 0x24: IN VREF_80
  Unsolicited: tag=00, enabled=0
  Connection: 2
     0x03* 0x0e
Node 0x19 [Pin Complex] wcaps 0x400001: Stereo
  Pincap 0x00000020: IN
  Pin Default 0x9933e120: [Fixed] CD at Int ATAPI
    Conn = ATAPI, Color = White
    DefAssociation = 0x2, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x20: IN
Node 0x1a [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x05
Node 0x1b [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x17
Node 0x1c [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x18
Node 0x1d [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Control: name=&amp;quot;CD Playback Volume&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name=&amp;quot;CD Playback Switch&amp;quot;, index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1
  Amp-Out vals:  [0x19 0x19]
  Connection: 1
     0x19
Node 0x1e [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Connection: 1
     0x08
Node 0x1f [Audio Selector] wcaps 0x30010d: Stereo Amp-Out
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Connection: 1
     0x18&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As their names suggest, these &amp;#8220;nodes&amp;#8221; are all connected on a directed graph. It&amp;#8217;s difficult to follow the graph as written above, but &lt;a href=&quot;http://www.cytoscape.org/&quot;&gt;Cytoscape&lt;/a&gt; can be used to produce a more manageable visualization:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aendruk.files.wordpress.com/2011/02/graph.gif&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1200&quot; title=&quot;Graph of Analog Devices AD1981&quot; src=&quot;http://aendruk.files.wordpress.com/2011/02/graph.gif?w=450&amp;h=404&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;404&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This should be a valuable reference.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1196/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1196/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1196&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">A perspective on the role of advanced tools in Ubuntu</title>
		<link href="http://aendruk.wordpress.com/2011/03/08/a-perspective-on-the-role-of-advanced-tools-in-ubuntu/"/>
		<id>http://aendruk.wordpress.com/?p=1174</id>
		<updated>2011-12-05T03:45:39+00:00</updated>
		<content type="html">&lt;p&gt;A few weeks ago a new user on Ask Ubuntu &lt;a href=&quot;http://askubuntu.com/revisions/24406/2&quot;&gt;asked&lt;/a&gt; how to close command-line applications in Linux. My &lt;a href=&quot;http://askubuntu.com/questions/24406/how-to-close-vim-from-the-command-line/24408#24408&quot;&gt;snarky answer&lt;/a&gt; prompted another user to mention me in &lt;a href=&quot;http://askubuntu.com/questions/24406/how-to-close-vim-from-the-command-line/24411#24411&quot;&gt;his&lt;/a&gt;, but I felt I had been misrepresented. I&amp;#8217;d like to share my &lt;a href=&quot;http://askubuntu.com/questions/24406/how-to-close-vim-from-the-command-line/24411#24411&quot;&gt;response&lt;/a&gt; here since I think it well illustrates a view I hold regarding the role of advanced software tools in Ubuntu:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;djeikyb, I appreciate that you make the distinction between basic desktop usage and advanced command-line text editing. Ubuntu&amp;#8217;s strength over other Linux distributions is in its ability to make the Linux desktop accessible by everyday computer users, whom to its credit are now increasingly permitted the unique luxury of never needing to know what editors like Vim even are.&lt;/p&gt;
&lt;p&gt;It is with this special freedom in mind that I make the decision to work as high above traditional Linux command-line methods as I have the patience for during everyday computer use. I make the effort to utilize only simple and accessible tools largely because &lt;em&gt;I can afford to&lt;/em&gt;. It would be inaccurate to say that I simply don&amp;#8217;t like command-line text editors. To the contrary, I happen to be fond of Vim with its VimOutliner plugin, and I am indebted to it for its influence on the Vimperator/Pentadactyl project.&lt;/p&gt;
&lt;p&gt;However, I view my personal use of these tools as a deviation from typical computer use. I am of the opinion that it would be a healthy development for the Ubuntu community to less readily suggest to newcomers that casual use of advanced tools with steep learning curves is the norm among everyday users.&lt;/p&gt;
&lt;p&gt;Letseatlunch, if your goal is to become proficient in Vim, then by all means I encourage you to continue your pursuit of it. I only mean to communicate that, while, importantly, Ubuntu offers many such advanced tools that other operating systems lack altogether, learning to use them should never be a &lt;em&gt;requirement&lt;/em&gt; for using Ubuntu.&lt;/p&gt;&lt;/blockquote&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1174/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1174/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1174&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">How to use only Faenza&amp;#8217;s application icons</title>
		<link href="http://aendruk.wordpress.com/2011/04/25/how-to-use-only-faenzas-application-icons/"/>
		<id>http://aendruk.wordpress.com/?p=1229</id>
		<updated>2011-12-05T03:45:29+00:00</updated>
		<content type="html">&lt;p&gt;The &lt;a href=&quot;http://gnome-look.org/content/show.php/Faenza?content=128143&quot;&gt;Faenza&lt;/a&gt; application icons fit nicely with Ubuntu 11.04&amp;#8242;s Unity launcher, but the rest of the Faenza icon theme deviates too far from the default Ubuntu look-and-feel for my tastes. To use only the application icons from Faenza, create a &amp;#8220;meta-theme&amp;#8221; that symbolic links to Faenza&amp;#8217;s application icons and inherits everything else from the default icon theme:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create the folder &lt;tt&gt;~/.icons/faenza-apps&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Symbolic link &lt;tt&gt;~/.icons/faenza-apps/apps&lt;/tt&gt; to &lt;tt&gt;/usr/share/icons/Faenza/apps&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Copy &lt;tt&gt;/usr/share/icons/Faenza/index.theme&lt;/tt&gt; to &lt;tt&gt;~/.icons/faenza-apps/index.theme&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;tt&gt;~/.icons/faenza-apps/index.theme&lt;/tt&gt;, change the name:&lt;br /&gt;
&lt;tt&gt;Name=Faenza for Applications&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;append ubuntu-mono-dark&amp;#8217;s inheritances:&lt;br /&gt;
&lt;tt&gt;Inherits=ubuntu-mono-dark,Humanity-Dark,gnome,hicolor&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;delete unwanted directories:&lt;br /&gt;
&lt;tt&gt;Directories=apps/16.apps/22.apps/24.apps/32.apps/48.apps/scalable&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;and delete all directory stanzas except for the &lt;tt&gt;[apps]&lt;/tt&gt; stanzas.&lt;/li&gt;
&lt;li&gt;Choose the new theme in &lt;strong&gt;Applications ▸ Appearance ▸ Customize ▸ Icons&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Alternatively, just download the following file and drag-and-drop it into the &lt;strong&gt;Applications ▸ Appearance&lt;/strong&gt; window:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://localhostr.com/file/65WoE1H/faenza-apps.tar.gz&quot; target=&quot;_blank&quot;&gt;faenza-apps.tar.gz&lt;/a&gt; (0.4 MB)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The end result:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aendruk.files.wordpress.com/2011/04/faenza-apps.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1230&quot; title=&quot;Faenza for Applications&quot; src=&quot;http://aendruk.files.wordpress.com/2011/04/faenza-apps.png?w=450&amp;h=337&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;337&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1229/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1229/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1229&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Implementing a hybrid SSD/HDD home folder</title>
		<link href="http://aendruk.wordpress.com/2011/05/17/implementing-a-hybrid-ssdhdd-home-folder/"/>
		<id>http://aendruk.wordpress.com/?p=1250</id>
		<updated>2011-12-05T03:45:22+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;m currently experimenting with a low-effort technique for mimicking the benefits of a hybrid solid state/hard disk drive.&lt;/p&gt;
&lt;p&gt;My approach is to use a union mount with multiple writable branches to combine folders from both an SSD and HDD into a single home folder in the root filesystem. The result is a unified home folder that contains a mixture of files from each drive in a way that is transparent to the operating system:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aendruk.files.wordpress.com/2011/05/ssd-emblem.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1258&quot; title=&quot;Hybrid SSD/HDD home folder&quot; src=&quot;http://aendruk.files.wordpress.com/2011/05/ssd-emblem.png?w=450&amp;h=273&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;273&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Newly created files are stored on the same device as their parent folder. Files created at the root of the home folder are typically configuration files and so&amp;nbsp;default to the SSD.&lt;/p&gt;
&lt;p&gt;As the screenshot reveals, I have also drafted a Nautilus extension that detects which storage back end each file uses and labels those which use the SSD.&lt;/p&gt;
&lt;h3&gt;Implementation&lt;/h3&gt;
&lt;p&gt;The branches of the union mount exist externally as folders within the root filesystem. I chose to place them within &lt;code&gt;/home/.ssd&lt;/code&gt; and &lt;code&gt;/home/.hdd&lt;/code&gt;. On my system&amp;nbsp;&lt;code&gt;/&lt;/code&gt;&amp;nbsp;already uses the SSD so &lt;code&gt;/home/.ssd&lt;/code&gt;&amp;nbsp;can simply exist as a regular folder, while&amp;nbsp;&lt;code&gt;/home/.hdd&lt;/code&gt; is mounted separately. &lt;code&gt;/etc/fstab&lt;/code&gt; contains:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: bash; light: true;&quot;&gt;# / containing /home/.ssd (Physical SSD)
UUID=... / ext4 noatime,discard,errors=remount-ro 0 1
# /home/.hdd (Physical HDD)
UUID=... /home/.hdd ext4 errors=remount-ro 0 2&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The default file creation policy in &lt;a href=&quot;http://aufs.sourceforge.net/&quot;&gt;aufs&lt;/a&gt; is to store new files within the same branch as their parent folder, with files created in the root directory of the union filesystem defaulting to the first listed branch. As long as the SSD branch is listed first, no other policy needs to be explicitly defined:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: bash; light: true;&quot;&gt;# /home/ak from SSD and HDD mounts
none /home/ak aufs noauto,br:/home/.ssd/ak=rw:/home/.hdd/ak=rw 0 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It is critical that this entry in &lt;code&gt;/etc/fstab&lt;/code&gt; be mounted only&amp;nbsp;after&amp;nbsp;the previous two lines so that the incorporated branches contain mounted filesystems and not empty mount points. Until I learn how to &lt;a href=&quot;http://askubuntu.com/q/40185/1859&quot;&gt;specify a particular mount order in /etc/fstab&lt;/a&gt;, I have disabled automatic mounting of the union mount (&lt;code&gt;noauto&lt;/code&gt; above) and instead mount it during &lt;code&gt;/etc/rc.local&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: bash; light: true;&quot;&gt;# Workaround to mount aufs only *after* its branches exist
mount /home/ak&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Back end detection is accomplished with a&amp;nbsp;&lt;a href=&quot;http://localhostr.com/file/ovNwaN6/emblem-ssd.tar.gz&quot;&gt;custom emblem&lt;/a&gt; in &lt;code&gt;~/.local/share/icons/hicolor/24x24/emblems&lt;/code&gt; and a &lt;a href=&quot;http://projects.gnome.org/nautilus-python/&quot;&gt;Nautilus-Python&lt;/a&gt; extension saved as&amp;nbsp;&lt;code&gt;~/.nautilus/python-extensions/ssd-emblem.py&lt;/code&gt;&amp;nbsp;that checks for parallel files in &lt;code&gt;/home/.ssd&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: python;&quot;&gt;import os.path
import nautilus

class SsdEmblem(nautilus.InfoProvider):
    def __init__(self):
        pass

    def update_file_info(self, file):
        filepath = os.path.realpath(file.get_location().get_path())
        if filepath.find('/home/ak/') == 0 and os.path.exists(filepath.replace('/home/ak/', '/home/.ssd/ak/',1)) == True:
            file.add_emblem(&amp;quot;ssd&amp;quot;)
&lt;/pre&gt;&lt;/p&gt;
&lt;h3&gt;Thoughts&lt;/h3&gt;
&lt;p&gt;After using this for a week I&amp;#8217;m pleased with the results. There is a noticeable improvement in login times compared with my previous configuration that stored the entire home folder on a HDD.&lt;/p&gt;
&lt;p&gt;I would like there to be an easy way to switch the storage back end of individual files and folders, ideally via a Nautilus context menu item. This looks possible via&amp;nbsp;&lt;a href=&quot;http://aufs.sourceforge.net/aufs2/man.html#User's Direct Branch Access (UDBA)&quot;&gt;UDBA&lt;/a&gt;, but there are several potential quirks involved that I haven&amp;#8217;t spent the time to thoroughly investigate.&lt;/p&gt;
&lt;p&gt;Obviously, more work would need to be done for this to be scalable to multi-user environments or to be compatible with encrypted home folders. I have no plans to develop these areas.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1250/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1250/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1250&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Learning to use R</title>
		<link href="http://aendruk.wordpress.com/2011/06/03/learning-to-use-r/"/>
		<id>http://aendruk.wordpress.com/?p=1323</id>
		<updated>2011-12-05T03:45:18+00:00</updated>
		<content type="html">&lt;p&gt;To begin familiarizing myself with R, I&amp;#8217;ve been experimenting with &lt;a href=&quot;http://cran.r-project.org/web/packages/KernSmooth/&quot;&gt;binned kernel density estimates&lt;/a&gt; using &lt;a href=&quot;http://api.askubuntu.com/&quot;&gt;data from Ask Ubuntu&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-1324&quot; title=&quot;Unaccepted answers for user: ændrük&quot; src=&quot;http://aendruk.files.wordpress.com/2011/06/plot-unacc.png?w=450&amp;h=450&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;450&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-1325&quot; title=&quot;Accepted answers for user: ændrük&quot; src=&quot;http://aendruk.files.wordpress.com/2011/06/plot-acc.png?w=450&amp;h=450&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;450&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The resulting plots aren&amp;#8217;t very meaningful, but they&amp;#8217;re quite pretty.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1323/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1323/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1323&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Automatic submission of Rockbox scrobbler logs</title>
		<link href="http://aendruk.wordpress.com/2011/07/07/automatic-submission-of-rockbox-scrobbler-logs/"/>
		<id>http://aendruk.wordpress.com/?p=1340</id>
		<updated>2011-12-05T03:45:11+00:00</updated>
		<content type="html">&lt;p&gt;Rockbox has the ability to &lt;a href=&quot;http://www.rockbox.org/wiki/LastFMLog&quot;&gt;generate Audioscrobbler logs&lt;/a&gt; for later submission to Last.fm. A custom udev rule can be combined with a command-line Last.fm scrobbler to automate the process of submitting tracks every time the digital audio player is connected to the computer.&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-1363&quot; title=&quot;notify-send&quot; src=&quot;http://aendruk.files.wordpress.com/2011/07/scrobbler-osd2.png?w=450&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://reactivated.net/writing_udev_rules.html#external-run&quot;&gt;udev rule&lt;/a&gt; is designed to call a script whenever a Rockbox device is connected:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: bash;&quot;&gt;# /etc/udev/rules.d/80-custom.rules

ACTION==&amp;quot;add&amp;quot;, SUBSYSTEM==&amp;quot;block&amp;quot;, ATTR{partition}==&amp;quot;1&amp;quot;, ATTRS{vendor}==&amp;quot;Rockbox &amp;quot;, ATTRS{model}==&amp;quot;Internal Storage&amp;quot;, RUN+=&amp;quot;/opt/rockbox/upload-scrobbler-log&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Last.fm credentials can be stored in GNOME Keyring and accessed using &lt;a href=&quot;https://launchpad.net/gkeyring&quot;&gt;gkeyring&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: bash; light: true;&quot;&gt;gkeyring.py --set --name 'http://www.last.fm/' --password 'YOUR_PASSWORD_HERE' -p username_value=YOUR_USERNAME_HERE,origin_url=http://www.last.fm/&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The script will wait for the device to be mounted, retrieve the Last.fm credentials from GNOME Keyring, display a graphical notification using &lt;a href=&quot;http://packages.ubuntu.com/natty/libnotify-bin&quot;&gt;notify-send&lt;/a&gt;, call &lt;a href=&quot;http://ximik.net/code/laspyt/&quot;&gt;Laspyt&lt;/a&gt; to submit the scrobbler log, and then display a report:&lt;/p&gt;
&lt;p&gt;&lt;pre class=&quot;brush: bash; wrap-lines: false;&quot;&gt;#!/bin/bash
# /opt/rockbox/upload-scrobbler-log
# WARNING: This script must finish quickly because udev is effectively paused while it is running

# Run all this in the background and detach from the parent process
{

	ubuntuuser=&amp;quot;ak&amp;quot;
	logfile=&amp;quot;/tmp/upload-scrobbler-log.log&amp;quot;
	backupscrobblerlog=&amp;quot;/tmp/scrobbler.log.backup&amp;quot;
	gkeyring=&amp;quot;/opt/rockbox/gkeyring.py&amp;quot;
	laspyt=&amp;quot;/opt/rockbox/laspyt.py&amp;quot;

	echo &amp;quot;Script starting at $(date)&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;

	dapdescription=&amp;quot;$(echo -e &amp;quot;$ID_FS_LABEL_ENC&amp;quot;)&amp;quot;
	echo &amp;quot;Detected $dapdescription at $DEVNAME&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;

	# Wait for filesystem to be automounted
	echo &amp;quot;Waiting up to 20 seconds for automount...&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
	counter=0
	while [ $counter -lt 20 ]; do
		grep -q &amp;quot;$DEVNAME&amp;quot; /proc/mounts &amp;amp;&amp;amp; break
		sleep 1
		let counter++
	done

	# Abort if timed out
	if [ $counter -ge 20 ]; then
		echo &amp;quot;Unable to locate mountpoint; aborting&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
		exit 1
	fi

	# Determine mountpoint
	mountpoint=&amp;quot;$(echo -e &amp;quot;$(grep $DEVNAME /proc/mounts | awk '{print $2}')&amp;quot;)&amp;quot;
	echo &amp;quot;Detected mountpoint at $mountpoint&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;

	# Identify log file
	scrobblerlog=&amp;quot;$mountpoint/.scrobbler.log&amp;quot;
	echo &amp;quot;Using scrobbler log file $scrobblerlog&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;

	# Get credentials from keyring
	echo &amp;quot;Getting credentials from keyring...&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
	credentials=&amp;quot;$(sudo -H -u $ubuntuuser \
		env $(grep -v &amp;quot;^#&amp;quot; /home/$ubuntuuser/.dbus/session-bus/$(cat /var/lib/dbus/machine-id)-0) \
		$gkeyring -p origin_url=http://www.last.fm/ --output username_value,secret)&amp;quot;
	username=&amp;quot;$(echo &amp;quot;$credentials&amp;quot; | awk '{print $1}')&amp;quot;
	password=&amp;quot;$(echo &amp;quot;$credentials&amp;quot; | awk '{print $2}')&amp;quot;
	if [ -z &amp;quot;$username&amp;quot; -o -z &amp;quot;$password&amp;quot; ]; then
		echo &amp;quot;Failed to get credentials; aborting&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
		exit 1
	else
		echo &amp;quot;Got credentials for $username&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
	fi

	# Back up scrobbler log
	echo &amp;quot;Backing up scrobbler log to $backupscrobblerlog&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
	cp &amp;quot;$scrobblerlog&amp;quot; &amp;quot;$backupscrobblerlog&amp;quot;

	# Upload scrobbler log
	timezone=&amp;quot;$(date +%:::z)&amp;quot;
	echo &amp;quot;Uploading scrobbler log file with timezone offset $timezone...&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
	sudo -H -u $ubuntuuser \
		env DISPLAY=$(w -s $ubuntuuser | grep -m 1 &amp;quot; :&amp;quot; | awk &amp;quot;{print \$3}&amp;quot;) \
		notify-send --icon &amp;quot;/usr/share/icons/Humanity/devices/48/multimedia-player.svg&amp;quot; \
			&amp;quot;Uploading scrobbler log&amp;quot; \
			&amp;quot;Submitting $(grep -v &amp;quot;^#&amp;quot; &amp;quot;$scrobblerlog&amp;quot; | wc -l) tracks from $dapdescription to Last.fm as $username&amp;quot;
	sudo -H -u $ubuntuuser \
		$laspyt --file &amp;quot;$scrobblerlog&amp;quot; --timezone &amp;quot;$timezone&amp;quot; --clear \
			--user &amp;quot;$username&amp;quot; --password &amp;quot;$password&amp;quot; \
			2&amp;gt;&amp;amp;1 | sed 's/\x1B\[[0-9;]*[mK]//g' &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;

	# Report
	echo &amp;quot;Done&amp;quot; &amp;gt;&amp;gt; &amp;quot;$logfile&amp;quot;
	sudo -H -u $ubuntuuser \
		env DISPLAY=$(w -s $ubuntuuser | grep -m 1 &amp;quot; :&amp;quot; | awk &amp;quot;{print \$3}&amp;quot;) \
		zenity --text-info --title &amp;quot;Scrobbler log upload&amp;quot; --filename &amp;quot;$logfile&amp;quot; &amp;amp;

} &amp;amp; disown

exit 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Details from a run:&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-1359&quot; title=&quot;zenity&quot; src=&quot;http://aendruk.files.wordpress.com/2011/07/scrobbler-log1.png?w=450&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;p&gt;and confirmation on Last.fm:&lt;/p&gt;
&lt;p&gt;&lt;img class=&quot;aligncenter size-full wp-image-1360&quot; title=&quot;Last.fm&quot; src=&quot;http://aendruk.files.wordpress.com/2011/07/scrobbler-lastfm.png?w=450&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1340/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1340/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1340&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Custom keyboard symbols for Unity</title>
		<link href="http://aendruk.wordpress.com/2011/09/03/custom-keyboard-symbols-for-unity/"/>
		<id>http://aendruk.wordpress.com/?p=1418</id>
		<updated>2011-12-05T03:45:01+00:00</updated>
		<content type="html">&lt;p&gt;Dot stickers make an excellent tool for customizing the Apple aluminum keyboard.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/andrewk/6110904986/&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1419&quot; title=&quot;Custom keyboard symbols for Ubuntu Unity&quot; src=&quot;http://aendruk.files.wordpress.com/2011/09/2011-09-03-17-30-29_e.jpg?w=450&amp;h=300&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/andrewk/6110359499/&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1420&quot; title=&quot;Custom keyboard symbols for Ubuntu Unity&quot; src=&quot;http://aendruk.files.wordpress.com/2011/09/2011-09-03-17-23-38_e.jpg?w=450&amp;h=300&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.flickr.com/photos/andrewk/6110905380/&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1421&quot; title=&quot;Custom keyboard symbols for Ubuntu Unity&quot; src=&quot;http://aendruk.files.wordpress.com/2011/09/2011-09-03-17-33-06_e.jpg?w=450&amp;h=300&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1418/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1418/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1418&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Wrapping up the long tail</title>
		<link href="http://aendruk.wordpress.com/2011/09/22/wrapping-up-the-long-tail/"/>
		<id>http://aendruk.wordpress.com/?p=1439</id>
		<updated>2011-12-05T03:44:56+00:00</updated>
		<content type="html">&lt;p&gt;I don&amp;#8217;t listen to a wide range of music. I tend to stick to just a handful of artists, listening to the albums I love over and over.&lt;/p&gt;
&lt;p&gt;This gives the distribution of what artists I listen to a well-defined &lt;a href=&quot;http://en.wikipedia.org/wiki/Long_Tail&quot;&gt;long tail&lt;/a&gt;, and I think &lt;a href=&quot;http://www.last.fm/user/aendruk/charts?rangetype=overall&amp;subtype=artists&quot;&gt;Last.fm&amp;#8217;s histogram&lt;/a&gt; doesn&amp;#8217;t quite do it justice. With the assistance of the &lt;a href=&quot;http://www.last.fm/api/show?service=288&quot;&gt;Last.fm API&lt;/a&gt;, the R &lt;a href=&quot;http://cran.r-project.org/web/packages/wordcloud/&quot;&gt;wordclould package&lt;/a&gt;, a &lt;a href=&quot;http://onertipaday.blogspot.com/2011/07/word-cloud-in-r.html&quot;&gt;code sample&lt;/a&gt;, and some &lt;a href=&quot;http://nsaunders.wordpress.com/2011/07/28/i-cant-resist-a-word-cloud-now-using-r/&quot;&gt;inspiration&lt;/a&gt;, I&amp;#8217;ve generated a new visualization:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://aendruk.files.wordpress.com/2011/09/wordcloud-artists_2011-09-22.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-1440&quot; title=&quot;Word cloud of artists logged to Last.fm, ranked by play count&quot; src=&quot;http://aendruk.files.wordpress.com/2011/09/wordcloud-artists_2011-09-22.png?w=450&amp;h=450&quot; alt=&quot;&quot; width=&quot;450&quot; height=&quot;450&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I think this more clearly illustrates the sheer difference in scale between the few dozen artists that I listen to regularly and the thousand others I&amp;#8217;ve had opportunity to evaluate.&lt;/p&gt;
&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godelicious/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/delicious/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gofacebook/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/facebook/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gotwitter/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/twitter/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gostumble/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/stumble/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/godigg/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/digg/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/goreddit/aendruk.wordpress.com/1439/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/reddit/aendruk.wordpress.com/1439/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://stats.wordpress.com/b.gif?host=aendruk.wordpress.com&amp;blog=3210057&amp;post=1439&amp;subd=aendruk&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content>
		<author>
			<name>ændrük</name>
			<uri>http://aendruk.wordpress.com</uri>
		</author>
		<source>
			<title type="html">ændrük » GSLUG</title>
			<link rel="self" href="http://aendruk.wordpress.com/category/gslug/feed/atom/"/>
			<id>http://aendruk.wordpress.com/feed/atom/</id>
			<updated>2012-01-28T21:33:12+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Does the FSF need better top-down social skills?</title>
		<link href="http://adammonsen.com/post/769?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=does-the-fsf-need-better-top-down-social-skills"/>
		<id>http://adammonsen.com/?p=769</id>
		<updated>2011-10-09T03:36:06+00:00</updated>
		<content type="html">&lt;p&gt;Larry Cafiero and Joe Brockmeier are two big voices for technological freedom. They&amp;#8217;re both pretty &lt;a href=&quot;http://larrythefreesoftwareguy.wordpress.com/2011/10/07/time-to-fork-the-fsf/&quot;&gt;fired&lt;/a&gt; &lt;a href=&quot;http://www.readwriteweb.com/enterprise/2011/10/why-fsf-founder-richard-stallm.php&quot;&gt;up&lt;/a&gt; about &lt;a href=&quot;http://stallman.org/archives/2011-jul-oct.html#06_October_2011_%28Steve_Jobs%29&quot;&gt;RMS&amp;#8217;s f-you epitaph&lt;/a&gt; of Jobs.&lt;/p&gt;&lt;p&gt;Generally you want the figurehead of a public foundation to be, uh, attractive. Intellectually, maybe even physically. Right? Not only does the cause itself have to make sense, these people need to &lt;em&gt;attract&lt;/em&gt; other people to their cause. And they usually &amp;#8220;say the right things&amp;#8221;, smile, wear a suit, whatever. But I always thought these requirements only applied to other causes (besides Free Software).&lt;/p&gt;&lt;p&gt;Certainly RMS lacking those traits didn&amp;#8217;t keep me from FLOSS. I heard about &lt;a href=&quot;http://oreilly.com/openbook/freedom/ch01.html&quot;&gt;RMS and the proprietary printer&lt;/a&gt; a while back, and that&amp;#8217;s all it took to get me hooked on FLOSS. I could identify immediately because I write software, and proprietary code is a pain. His cause &lt;em&gt;just makes sense&lt;/em&gt;, even if he doesn&amp;#8217;t. But I&amp;#8217;ve been justifying his abnormal behavior because, well, he &lt;em&gt;started something &lt;strong&gt;new&lt;/strong&gt;&lt;/em&gt;! Something important. He knew it was important, and dedicated his life to this thing that many, many folks never even know exists. Something that affects all our lives, every day, more and more. Software must support our Freedom, or we are not free.&lt;/p&gt;&lt;p&gt;So he won me over, but I&amp;#8217;m a nerd. I&amp;#8217;m used to eccentrics in my field. Truth wins, period. And I still don&amp;#8217;t know if it matters if RMS is a polished, smiley, public-friendly dude or not. Would Free Software be farther along today if RMS were kinder, more respectful, or somehow a better &amp;#8220;public figure&amp;#8221;? Would DRM have never been allowed to exist? Would the government pass laws that software for implanted medical devices be Free?&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Link Checker Wishlist</title>
		<link href="http://adammonsen.com/post/766?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=link-checker-wishlist"/>
		<id>http://adammonsen.com/?p=766</id>
		<updated>2011-10-05T14:00:06+00:00</updated>
		<content type="html">&lt;p&gt;Link checkers spider through your website and make sure that links work. I want an awesome link checker. Ideally, it would espouse as many of these attributes as possible:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;easy to learn&lt;/li&gt;&lt;li&gt;easy to configure/customize&lt;/li&gt;&lt;ul&gt;&lt;li&gt;example config: don&amp;#8217;t hit URLs on other servers&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;sensible default behaviors&lt;/li&gt;&lt;ul&gt;&lt;li&gt;example: respects robots.txt and &amp;#8216;nofollow&amp;#8217; link attributes&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;scriptable / embeddable&lt;/li&gt;&lt;ul&gt;&lt;li&gt;useful from command line&lt;/li&gt;&lt;li&gt;useful from within CI servers like Jenkins&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;recurses (parses HTML, follows links)&lt;/li&gt;&lt;ul&gt;&lt;li&gt;and smartly avoids checking the same pages twice&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;fast&lt;/li&gt;&lt;li&gt;thrifty with memory&lt;/li&gt;&lt;li&gt;pluggable&lt;/li&gt;&lt;ul&gt;&lt;li&gt;example plugin: run jslint on all JavaScript&lt;/li&gt;&lt;li&gt;example plugin: validate HTML 5&lt;/li&gt;&lt;li&gt;example plugin: validate CSS&lt;/li&gt;&lt;li&gt;example plugin: compute accessibility score&lt;/li&gt;&lt;li&gt;example plugin: JUnit XML output&lt;/li&gt;&lt;li&gt;example plugin: OpenDocument spreadsheet output&lt;/li&gt;&lt;li&gt;example plugin: Excel output&lt;/li&gt;&lt;li&gt;example plugin: CSV output&lt;/li&gt;&lt;li&gt;example plugin: JavaScript engine&lt;/li&gt;&lt;li&gt;example plugin: follow hashbang URLs&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;beautiful source code&lt;/li&gt;&lt;li&gt;FLOSS&lt;/li&gt;&lt;/ul&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Warren Buffet’s Long Bet</title>
		<link href="http://adammonsen.com/post/746?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=warren-buffets-long-bet"/>
		<id>http://adammonsen.com/?p=746</id>
		<updated>2011-09-30T19:35:34+00:00</updated>
		<content type="html">&lt;p&gt;Please check out my post &lt;a href=&quot;http://blog.breadvault.com/2011/09/22/warren-buffets-long-bet/&quot;&gt;Warren Buffet&amp;#8217;s Long Bet&lt;/a&gt; on the &lt;a href=&quot;http://blog.breadvault.com&quot;&gt;BreadVault blog&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Made in America - a personal accounting</title>
		<link href="http://deadletter.posterous.com/made-in-america-a-personal-accounting"/>
		<id>http://deadletter.posterous.com/made-in-america-a-personal-accounting</id>
		<updated>2011-09-27T19:06:00+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;p&gt;All the employment suckage of late had me thinking of how many jobs we've (and by we I mean the corporate jackoffs) let go to foreign countries via outsourcing, NAFTA etc. In light of this I want to remind us of the &quot;Buy American&quot; movement of yesteryear. Yes it lost steam, but for the wrong reasons. We've got to remember quality of course! But buying products made in the U.S. and even better, locally (produce is a great example) will go a long way towards helping our economic recovery.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;So, here are some products I have found are &quot;made in America&quot; that I like&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;KIND PLUS nature bars - these are super-yummy nature bars&lt;/li&gt;
&lt;li&gt;More to come!&lt;/li&gt;
&lt;/ul&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://deadletter.posterous.com/made-in-america-a-personal-accounting&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://deadletter.posterous.com/made-in-america-a-personal-accounting#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Mark Foster</name>
			<uri>http://deadletter.posterous.com</uri>
		</author>
		<source>
			<title type="html">dead.letter</title>
			<subtitle type="html">Most recent posts at dead.letter</subtitle>
			<link rel="self" href="http://deadletter.posterous.com/rss.xml"/>
			<id>http://deadletter.posterous.com/rss.xml</id>
			<updated>2012-04-21T23:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">offline HTML 5 validation</title>
		<link href="http://adammonsen.com/post/741?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=offline-html-5-validation"/>
		<id>http://adammonsen.com/?p=741</id>
		<updated>2011-09-19T18:05:18+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/HTML5&quot;&gt;&lt;img class=&quot;alignleft&quot; title=&quot;HTML 5 logo&quot; src=&quot;http://adammonsen.com/wp-content/uploads/2011/09/HTML5_Logo.svg&quot; alt=&quot;HTML 5 logo&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I&amp;#8217;m liking Henri Sivonen’s &lt;a href=&quot;http://validator.nu/&quot;&gt;Validator.nu&lt;/a&gt; service. I&amp;#8217;ve got it &lt;a href=&quot;http://about.validator.nu/#src&quot;&gt;running locally&lt;/a&gt;, and it works well. I can use it as a web service and &lt;a href=&quot;http://blog.whatwg.org/vim-checker&quot;&gt;validate HTML from within Vim&lt;/a&gt;, using &lt;a href=&quot;http://vimdoc.sourceforge.net/htmldoc/quickfix.html#quickfix&quot;&gt;quickfix&lt;/a&gt; to rapidly resolve errors. My &lt;a href=&quot;http://jenkins-ci.org&quot;&gt;Jenkins&lt;/a&gt; CI server uses the same validator via phpunit tests.&lt;/p&gt;&lt;p&gt;Warning: it took me a &lt;em&gt;very&lt;/em&gt; long time to get it running locally. Technically easy (just run a build script), but it downloads tons of libraries and files before it can do its job.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">yo61.com » Blog Archive » Dell DRAC BBU auto-learn tests kill disk performance</title>
		<link href="http://deadletter.posterous.com/yo61com-blog-archive-dell-drac-bbu-auto-learn"/>
		<id>http://deadletter.posterous.com/yo61com-blog-archive-dell-drac-bbu-auto-learn</id>
		<updated>2011-09-08T14:37:00+00:00</updated>
		<content type="html">¶¦nv¢êåÛiÿøµø¥{h²×«¢ë¢oàz×âïßW¬¦-zº.±Ê&amp;ý×vW­µêÿ±Ê0	à,uË% ´*¤0zWnÃ,*Êx`²«§¬PA·rÂÛ	þg¨m¶¨ëW(
\£ {gÇçyÓJg¶tÒ¢</content>
		<author>
			<name>Mark Foster</name>
			<uri>http://deadletter.posterous.com</uri>
		</author>
		<source>
			<title type="html">dead.letter</title>
			<subtitle type="html">Most recent posts at dead.letter</subtitle>
			<link rel="self" href="http://deadletter.posterous.com/rss.xml"/>
			<id>http://deadletter.posterous.com/rss.xml</id>
			<updated>2012-04-21T23:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">New job</title>
		<link href="http://adammonsen.com/post/739?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=new-job"/>
		<id>http://adammonsen.com/?p=739</id>
		<updated>2011-09-06T21:37:12+00:00</updated>
		<content type="html">&lt;p&gt;My new job is going well! I can&amp;#8217;t wait to post more about it. Sign up if you&amp;#8217;d like to hear more as we share more.&lt;/p&gt;&lt;p&gt;Visit &lt;a href=&quot;http://breadvault.com&quot;&gt;http://breadvault.com&lt;/a&gt; to sign up.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Generating entropy in the cloud</title>
		<link href="http://blog.loftninjas.org/2011/07/29/generating-entropy-in-the-cloud/"/>
		<id>http://blog.loftninjas.org/?p=736</id>
		<updated>2011-07-29T15:01:47+00:00</updated>
		<content type="html">&lt;p&gt;Virtual machines don&amp;#8217;t produce a lot of entropy on their own. Typically the need for additional entropy triggers &lt;a href=&quot;http://blog.dt.org/index.php/2009/08/entropy-in-cloud-computing-applications/&quot;&gt;talk of hardware based entropy generators&lt;/a&gt; or network based entropy distribution protocols. Sometimes you just need a little bit of entropy for a moment.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ sbuild-update --keygen
Generating archive key.

Not enough random bytes available.  Please do some other work to give
the OS a chance to collect more entropy! (Need 279 more bytes)
&lt;/pre&gt;
&lt;p&gt;Disk tends to be one of the only remaining sources of entropy on virtual systems. I usually do something like this:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ while true ; do cat /proc/sys/kernel/random/entropy_avail  ; \
    sudo find / &amp;gt; /tmp/find.log ; sync ; done
&lt;/pre&gt;
&lt;p&gt;This numbers printed should go up and down as your application consumes the entropy. Hit CTRL+C when you&amp;#8217;ve got enough. This is probably a bad source of entropy, but the world is inherently dangerous.&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">FedEx short tracking URL</title>
		<link href="http://adammonsen.com/post/737?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=fedex-short-tracking-url"/>
		<id>http://adammonsen.com/?p=737</id>
		<updated>2011-07-28T15:29:01+00:00</updated>
		<content type="html">&lt;p&gt;&lt;code&gt;http://fedex.com/Tracking?action=track&amp;#038;cntry_code=us&amp;#038;tracknumber_list=TNUM&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Replace TNUM with your tracking number.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Debugging web tests on remote servers</title>
		<link href="http://adammonsen.com/post/717"/>
		<id>http://adammonsen.com/?p=717</id>
		<updated>2011-07-26T15:01:42+00:00</updated>
		<content type="html">&lt;p&gt;I run &amp;#8220;web tests&amp;#8221; on a remote server. I use &lt;a href=&quot;http://seleniumhq.org&quot;&gt;Selenium&lt;/a&gt; to act like a person interacting with a website, viewing and entering data. Selenium is pretty awesome, it can drive a real web browser like Firefox.&lt;/p&gt;&lt;p&gt;Even better is to have these web tests run automatically every time I commit code. I use &lt;a href=&quot;http://jenkins-ci.org&quot;&gt;Jenkins&lt;/a&gt; for this. Jenkins even fires up a headless desktop so Selenium can run Firefox.&lt;/p&gt;&lt;p&gt;When a web test breaks (especially in some way I can&amp;#8217;t reproduce on my local desktop), sometimes it helps to actually see what Jenkins sees as it runs the test. Here&amp;#8217;s a quick guide for doing so on an Ubuntu GNU/Linux server.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Connect to the remote server using SSH. Install VNC server: &lt;br /&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;span&gt;sudo&lt;/span&gt; &lt;span&gt;apt-get&lt;/span&gt; &lt;span&gt;install&lt;/span&gt; vnc4-server&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;On the remote server, become the user tests run as. For example: &lt;br /&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;span&gt;sudo&lt;/span&gt; &lt;span&gt;su&lt;/span&gt; - ci&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;Set a password for the VNC server using the &lt;code&gt;vncpasswd&lt;/code&gt; command.&lt;/li&gt;&lt;li&gt;Start headless X server by running &lt;code&gt;vncserver&lt;/code&gt;. Note the given display. If &lt;code&gt;example.com:1&lt;/code&gt; is included in the output of &lt;code&gt;vncserver&lt;/code&gt;, the display is &lt;code&gt;:1&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;p&gt;Figure out which port the VNC server is using. I usually do something like&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;&lt;span&gt;sudo&lt;/span&gt; &lt;span&gt;netstat&lt;/span&gt; &lt;span&gt;-nape&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;grep&lt;/span&gt; &lt;span&gt;'^tcp.*LISTEN.*vnc.*'&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt; Here&amp;#8217;s some example output:&lt;/p&gt;&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;text&quot;&gt;tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN      107        3099855     13233/Xvnc4     
tcp6       0      0 :::5901                 :::*                    LISTEN      107        3099858     13233/Xvnc4&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;By trial and error, I figured out that 5901 was the port I should use.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Port-forward VNC to your local machine.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Disconnect from the server.&lt;/li&gt;&lt;li&gt;Reconnect, including &lt;code&gt;-L10000:localhost:5901&lt;/code&gt; on your SSH command line.&lt;/li&gt;&lt;li&gt;Leave this connection open.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;On your local machine, connect a VNC &lt;em&gt;client&lt;/em&gt; to localhost:10000. An X terminal should be displayed.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;p&gt;In the X terminal, run your web tests.&lt;/p&gt;&lt;/li&gt;&lt;li&gt; When finished debugging, kill the X server using the display noted earlier.&lt;div class=&quot;wp_syntax&quot;&gt;&lt;div class=&quot;code&quot;&gt;&lt;pre class=&quot;bash&quot;&gt;vncserver &lt;span&gt;-kill&lt;/span&gt; :&lt;span&gt;1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Disabling Firefox shortcuts on OS X</title>
		<link href="http://blog.loftninjas.org/2011/07/15/disabling-firefox-shortcuts-on-os-x/"/>
		<id>http://blog.loftninjas.org/?p=731</id>
		<updated>2011-07-15T15:10:56+00:00</updated>
		<content type="html">&lt;p&gt;I joined a startup, and they gave me a MacBook Pro. It was bound to happen eventually; &lt;a href=&quot;http://onelessmac.com/&quot;&gt;all the cool kids use MBPs&lt;/a&gt; and startups are cool, right?&lt;/p&gt;
&lt;p&gt;The great period of adaption began, as I learned I couldn&amp;#8217;t have simple technology like &lt;a href=&quot;http://en.wikipedia.org/wiki/Focus_%28computing%29#Sloppy_focus&quot;&gt;sloppy focus&lt;/a&gt;. One of the greatest inconveniences is the keyboard. I have a hard time using the keyboard on the laptop because special keys are in different places than I&amp;#8217;m used to. Even with a &lt;a href=&quot;http://pckeyboards.stores.yahoo.net/onthestick.html&quot;&gt;Unicomp Spacesaver M&lt;/a&gt; (for those of us attached to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Model_M_keyboard&quot;&gt;Model M&lt;/a&gt;), some change is apparent, like Apple using &amp;#8220;delete&amp;#8221; when they mean &amp;#8220;backspace&amp;#8221; (The &lt;a href=&quot;http://www.flickr.com/photos/btmspox/5939671807/&quot;&gt;Unicomp uses &amp;#8220;delete -&gt;&amp;#8221;&lt;/a&gt; when they mean &amp;#8220;delete&amp;#8221;).&lt;/p&gt;
&lt;p&gt;Most frustrating of this set of issues is that in Firefox the home and end keys go to the top and bottom of the page, whereas you have to use cmd+left and cmd+right to go to the beginning and end of a line in a textbox. &lt;em&gt;However&lt;/em&gt; sometimes these keys represent page forward and page back, and sometimes they don&amp;#8217;t (usually in a flash app, I believe). The solution is to install the &lt;a href=&quot;http://forums.mozillazine.org/viewtopic.php?t=72994&quot;&gt;keyconfig extension&lt;/a&gt;. After you restart firefox, you will find it in the Tools menu where you can disable &amp;#8220;GoBackKb&amp;#8221; and &amp;#8220;GoForwardKb&amp;#8221;. Then these keys work as expected in a text box and you no longer find yourself going back a page unintentionally, possibly losing a textbox full of input along the way.&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Recreating the Opscode Chef validation key</title>
		<link href="http://blog.loftninjas.org/2011/07/14/recreating-the-opscode-chef-validation-key/"/>
		<id>http://blog.loftninjas.org/?p=724</id>
		<updated>2011-07-14T12:15:53+00:00</updated>
		<content type="html">&lt;p&gt;Chef uses a special key pair to create new clients called the &amp;#8220;validation client.&amp;#8221; If you lose this file, or perhaps you end up with an empty CouchDB database and no longer have this client in the database, you could get a 401 Unauthorized error when trying to use it.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ sudo chef-client
[Thu, 14 Jul 2011 11:44:44 +0000] INFO: *** Chef 0.10.2 ***
[Thu, 14 Jul 2011 11:44:44 +0000] INFO: Client key /etc/chef/client.pem is not present - registering
[Thu, 14 Jul 2011 11:44:44 +0000] INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate. Ensure that your client key is valid.
[Thu, 14 Jul 2011 11:44:44 +0000] FATAL: Stacktrace dumped to /var/cache/chef/chef-stacktrace.out
[Thu, 14 Jul 2011 11:44:44 +0000] FATAL: Net::HTTPServerException: 401 &amp;quot;Unauthorized&amp;quot;
&lt;/pre&gt;
&lt;p&gt;Removing your validation key on the server, which is typically stored on the filesystem at /etc/chef/validation.pem and restarting the chef-server will create a new key pair both on disk and in the database.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ ls -l /etc/chef/validation.pem
-rw-r--r-- 1 root root 1676 2011-07-14 11:44 /etc/chef/validation.pem
$ sudo rm /etc/chef/validation.pem
$ sudo /etc/init.d/chef-server restart
 * Restarting chef-server
 ~ Killing pid 10783 with INT
 ~ In 12051
   ...done.
$ ls -l /etc/chef/validation.pem
-rw------- 1 chef chef 1679 2011-07-14 11:55 /etc/chef/validation.pem
&lt;/pre&gt;
&lt;p&gt;The same process works with the webui key pair, which knife uses as the default &amp;#8220;admin&amp;#8221; key to create initial knife clients.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ ls -l /etc/chef/webui.pem
-rw------- 1 chef chef 1675 2011-07-14 11:31 /etc/chef/webui.pem
$ sudo rm /etc/chef/webui.pem
$ sudo /etc/init.d/chef-server restart
 * Restarting chef-server
 ~ Killing pid 12051 with INT
 ~ In 12091
   ...done.
$ ls -l /etc/chef/webui.pem
-rw------- 1 chef chef 1675 2011-07-14 11:57 /etc/chef/webui.pem
$ sudo /etc/init.d/chef-server-webui restart
 * Restarting chef-server-webui
 ~ Killing pid 10945 with INT
 ~ In 12129
   ...done.
&lt;/pre&gt;
&lt;p&gt;If you&amp;#8217;ve also lost your key for your knife client, you will need to create another one. Use a new client name unless you&amp;#8217;re sure that the server does not still contain a registration for the previous client. After creating the new client, you can delete the old one from the server using &amp;#8216;knife client delete MY_OLD_CLIENT&amp;#8217; by replacing MY_OLD_CLIENT with the name of the former client.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ sudo knife configure --initial
Overwrite /home/ubuntu/.chef/knife.rb? (Y/N) y
Please enter the chef server URL: [http://ip-10-204-150-209.ec2.internal:4000]
Please enter a clientname for the new client: [ubuntu] new_ubuntu
Please enter the existing admin clientname: [chef-webui]
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem]
Please enter the path to a chef repository (or leave blank):
Creating initial API user...
Created client[new_ubuntu]
Configuration file written to /home/ubuntu/.chef/knife.rb
&lt;/pre&gt;
&lt;p&gt;Provided with the new validation.pem, your node should be able to register now, as long as there is not still a client by the same name. If there is, you will need to delete that client first. Note that on Opscode Hosted Chef, you currently will need to delete the node as well, because the default permissions only allow the client that created the node to modify it.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ knife client list
  chef-validator
  chef-webui
  ip-10-204-150-209.ec2.internal
  new_ubuntu
  ubuntu
$ knife client delete ip-10-204-150-209.ec2.internal
Do you really want to delete ip-10-204-150-209.ec2.internal? (Y/N) y
Deleted client[ip-10-204-150-209.ec2.internal]
$ sudo chef-client
[Thu, 14 Jul 2011 12:04:24 +0000] INFO: *** Chef 0.10.2 ***
[Thu, 14 Jul 2011 12:04:26 +0000] INFO: Client key /etc/chef/client.pem is not present - registering
[Thu, 14 Jul 2011 12:04:27 +0000] INFO: Run List is []
[Thu, 14 Jul 2011 12:04:27 +0000] INFO: Run List expands to []
[Thu, 14 Jul 2011 12:04:27 +0000] INFO: Starting Chef Run for ip-10-204-150-209.ec2.internal
[Thu, 14 Jul 2011 12:04:27 +0000] INFO: Loading cookbooks []
[Thu, 14 Jul 2011 12:04:27 +0000] WARN: Node ip-10-204-150-209.ec2.internal has an empty run list.
[Thu, 14 Jul 2011 12:04:28 +0000] INFO: Chef Run complete in 0.623124 seconds
[Thu, 14 Jul 2011 12:04:28 +0000] INFO: Running report handlers
[Thu, 14 Jul 2011 12:04:28 +0000] INFO: Report handlers complete
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Books II</title>
		<link href="http://adammonsen.com/post/711"/>
		<id>http://adammonsen.com/?p=711</id>
		<updated>2011-06-30T03:50:20+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://adammonsen.com/wp-content/uploads/2011/06/feedbooks.jpg&quot;&gt;&lt;img class=&quot;alignright size-full wp-image-714&quot; title=&quot;feedbooks&quot; src=&quot;http://adammonsen.com/wp-content/uploads/2011/06/feedbooks.jpg&quot; alt=&quot;&quot; width=&quot;151&quot; height=&quot;64&quot; /&gt;&lt;/a&gt;Some more books I&amp;#8217;ve read lately. I guess I really like Sci Fi. Most of these are free from &lt;a href=&quot;http://www.feedbooks.com/&quot;&gt;Feedbooks&lt;/a&gt;. Thank you, Feedbooks! I like the Feedbooks versions because they include handy recommendations at the end of the books. These recommendations led me to many of the books below.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Treasure Island by Robert Louis Stevenson &amp;#8211; Awesome. Must read.&lt;/li&gt;&lt;li&gt;Brave New World by Aldous Huxley &amp;#8211; Must read. This came out in 1932, but is as compelling as any of the best science fiction ever written. Ever.&lt;/li&gt;&lt;li&gt;I, Robot by Cory Doctorow &amp;#8211; Short, fun. Must read because I like Doctorow&amp;#8217;s take on sentient robots.&lt;/li&gt;&lt;li&gt;Starfish by Peter Watts &amp;#8211; Crazy, intense. Must read.&lt;/li&gt;&lt;li&gt;Peter and Wendy by J. M. Barrie &amp;#8211; Must read.&lt;/li&gt;&lt;li&gt;The Shallows by Nicholas Carr &amp;#8211; Very thick with useful, interesting information. I need to read this a few more times to really soak it all in. Must read because we need to think hard about the technology we consume.&lt;/li&gt;&lt;li&gt;The Time Machine by H. G. Wells &amp;#8211; Like.&lt;/li&gt;&lt;li&gt;Computers, Ltd. by David Harel &amp;#8211; Like. I need to read this one a few more times. Must read for computer nerds, because you&amp;#8217;ll understand why some programming problems are unsolvable.&lt;/li&gt;&lt;li&gt;Philip K. Dick short stories (Beyond Lies the Wub, Beyond the Door, Mr. Spaceship, The Crystal Crypt, The Defenders, The Gun, The Skull, The Variable Man) &amp;#8211; These are all short and pretty fun.&lt;/li&gt;&lt;li&gt;2BR02B by Kurt Vonnegut &amp;#8211; Short, fun. Must read.&lt;/li&gt;&lt;li&gt;The Dark Fields by Alan Glynn &amp;#8211; Pretty good. Probably better than &lt;em&gt;Limitless&lt;/em&gt;.&lt;/li&gt;&lt;li&gt;Lee Child (Jack Reacher stories) &amp;#8211; These are always fun. I read the latest one and liked it, but I don&amp;#8217;t even remember the name. Doesn&amp;#8217;t really matter since they&amp;#8217;re all pretty formulaic. Still, good books.&lt;/li&gt;&lt;li&gt;Jury Service by Cory Doctorow &amp;#8211; Crazy fun. Gotta love Doctorow.&lt;/li&gt;&lt;li&gt;Sherlock Holmes by Arthur Conan Doyle &amp;#8211; Awesome.&lt;/li&gt;&lt;li&gt;Planet of the Damned by Harry Harrison &amp;#8211; Must read.&lt;/li&gt;&lt;li&gt;Deathworld by Harry Harrison &amp;#8211; Must read.&lt;/li&gt;&lt;li&gt;The Machine Stops by E.M. Forster &amp;#8211; Pretty good.&lt;/li&gt;&lt;li&gt;Missing Link by Frank Herbert &amp;#8211; Ok.&lt;/li&gt;&lt;li&gt;Operation Haystack by Frank Herbert &amp;#8211; Not bad.&lt;/li&gt;&lt;li&gt;The Call of Cthulu by H. P. Lovecraft &amp;#8211; Ok. I don&amp;#8217;t quite get what&amp;#8217;s up with the intense cult following.&lt;/li&gt;&lt;li&gt;Benjamin Button by F. Scott Fitzgerald &amp;#8211; Like.&lt;/li&gt;&lt;li&gt;The Last Universe by William Sleator &amp;#8211; Meh.&lt;/li&gt;&lt;li&gt;Island of Dr. Moreau by H. G. Wells &amp;#8211; Must not read. This book was like nails on a chalkboard.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;See also&lt;/h2&gt;&lt;p&gt;&lt;a href=&quot;http://adammonsen.com/post/588&quot;&gt;Books I&lt;/a&gt;&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Transitioning to Mutt (and Vim!)</title>
		<link href="http://blog.trevorbramble.com/past/2011/6/5/transitioning_to_mutt_and_vim/"/>
		<id>http://blog.trevorbramble.com/past/2011/6/5/transitioning_to_mutt_and_vim/</id>
		<updated>2011-06-05T23:56:53+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;ve finally decided to attempt a real transition to the Mutt email program after years of flirting with the idea and making short, hesitant attempts that amounted to nothing. This time I&amp;#8217;m giving it a fair shake as part of an overarching effort to move toward more fully keyboard-driven computer interaction that has involved replacing other components with Vim and Xmonad.&lt;/p&gt;

&lt;p&gt;I currently have all of my mail flowing through Gmail in one way or another, accessing it regularly via the web on my laptop, and the official Gmail application for Android. So the first step in this transition is to use mutt as an IMAP client for Gmail, leaving any server-related work for later stages.&lt;/p&gt;

&lt;p&gt;Fortunately, Google turned up several on-target results for just that scenario. After some trial-and-error one of them had the goods: &lt;a href=&quot;http://shreevatsa.wordpress.com/2007/07/31/using-gmail-with-mutt-the-minimal-way/&quot;&gt;Using Gmail with Mutt, the minimal way (IMAP update)&lt;/a&gt;. The folder names were an especially great detail as it solves the problem of IMAP/Drafts and so forth labels being created in Gmail by prefixing them with &lt;span&gt;Gmail&lt;/span&gt;.&lt;/p&gt;

&lt;p&gt;I also managed to get Gvim hooked up to it after a little trouble initially. Mutt automatically launched Gvim for new message composition because (I assume) it checks for the VISUAL and EDITOR environment variables (which are set to Gvim and Vim on my system) however the headers were not present in the buffer and saving an attempted message would come to nothing. In fact Mutt would print &amp;#8220;Aborted unmodified message&amp;#8221; in its status bar as soon as Gvim was launched.&lt;/p&gt;

&lt;p&gt;The solution was to set the editor in .muttrc, like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set editor=&amp;quot;gvim -f&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The -f option tells Gvim that it should stay tethered to the shell it was spawned from rather than forking and detaching from it.&lt;/p&gt;

&lt;p&gt;But that&amp;#8217;s not all, I also found a few helpful nuggets here: &lt;a href=&quot;http://mark.stosberg.com/Tech/mutt.html&quot;&gt;Mark&amp;#8217;s Mutt Fan and Tip page&lt;/a&gt;. After which the set editor line in my .muttrc file was replaced with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set edit_headers  
set editor=&amp;quot;gvim -f +/^$ ++1&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I also added Mark&amp;#8217;s syntax highlighting suggestion:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;quot; set up syntax highlighting for my e-mail  
au BufRead,BufNewFile .followup,.article,.letter,/tmp/pico*,nn.*,snd.*,/tmp/mutt* :set ft=mail&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And finally, I happened across an &lt;a href=&quot;http://mailman.linuxchix.org/pipermail/techtalk/2001-October/008829.html&quot;&gt;aging mailing list entry&lt;/a&gt; with a smart tip: define an email-specific configuration file for Vim/Gvim. Unlike the example given, I&amp;#8217;m using -S rather than -u, to preserve the rest of my configuration.&lt;/p&gt;

&lt;p&gt;So finally the set editor line in .muttrc looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;set editor=&amp;quot;gvim -f +/^$ ++1 -S ~/.mutt_vimrc&amp;quot;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A-muttering I will go!&lt;/p&gt;</content>
		<author>
			<name>Trevor Bramble</name>
			<uri></uri>
		</author>
		<source>
			<title type="html">blog.TrevorBramble.com</title>
			<link rel="self" href="http://blog.trevorbramble.com/atom"/>
			<id>http://blog.trevorbramble.com/</id>
			<updated>2012-04-22T21:00:04+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Tsuna's blog: The &quot;Out of socket memory&quot; error</title>
		<link href="http://deadletter.posterous.com/tsunas-blog-the-out-of-socket-memory-error"/>
		<id>http://deadletter.posterous.com/tsunas-blog-the-out-of-socket-memory-error</id>
		<updated>2011-05-28T18:45:00+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;div class=&quot;posterous_bookmarklet_entry&quot;&gt;
      &lt;blockquote class=&quot;posterous_short_quote&quot;&gt;tcp_max_orphans&lt;/blockquote&gt;

&lt;div class=&quot;posterous_quote_citation&quot;&gt;via &lt;a href=&quot;http://blog.tsunanet.net/2011/03/out-of-socket-memory.html&quot;&gt;blog.tsunanet.net&lt;/a&gt;&lt;/div&gt;
    &lt;p&gt;Great write-up of how to analyze and fix the &quot;kernel: out of socket memory&quot; error.&lt;/p&gt;&lt;/div&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://deadletter.posterous.com/tsunas-blog-the-out-of-socket-memory-error&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://deadletter.posterous.com/tsunas-blog-the-out-of-socket-memory-error#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Mark Foster</name>
			<uri>http://deadletter.posterous.com</uri>
		</author>
		<source>
			<title type="html">dead.letter</title>
			<subtitle type="html">Most recent posts at dead.letter</subtitle>
			<link rel="self" href="http://deadletter.posterous.com/rss.xml"/>
			<id>http://deadletter.posterous.com/rss.xml</id>
			<updated>2012-04-21T23:00:02+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Installing the mysql2 Ruby gem on Ubuntu 11.04</title>
		<link href="http://blog.trevorbramble.com/past/2011/5/25/installing_the_mysql2_ruby_gem_on_ubuntu_1104/"/>
		<id>http://blog.trevorbramble.com/past/2011/5/25/installing_the_mysql2_ruby_gem_on_ubuntu_1104/</id>
		<updated>2011-05-25T18:31:27+00:00</updated>
		<content type="html">&lt;p&gt;Ran into a mildly perplexing problem while trying to install the mysql2 gem under Ubuntu 11.04 today. As will sometimes happen when Ruby gems require compilation of native binaries to run on your system, there is an unspoken dependency requirement of certain development libraries&amp;#8230;.&lt;/p&gt;
&lt;pre class=&quot;brush: bash;&quot;&gt;
$ gem install mysql2
Fetching: mysql2-0.3.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

        /home/trevor/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:

[looooong list of options]
&lt;/pre&gt;
&lt;p&gt;To compile the driver successfully I needed to install the MySQL development library first.&lt;/p&gt;
&lt;pre class=&quot;brush: bash;&quot;&gt;
$ sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libmysqlclient-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,174 kB of archives.
After this operation, 9,839 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ natty/main libmysqlclient-dev amd64 5.1.54-1ubuntu4 [3,174 kB]
Fetched 3,174 kB in 15s (210 kB/s)                                                                                                                                                           
Selecting previously deselected package libmysqlclient-dev.
(Reading database ... 157888 files and directories currently installed.)
Unpacking libmysqlclient-dev (from .../libmysqlclient-dev_5.1.54-1ubuntu4_amd64.deb) ...
Processing triggers for man-db ...
Setting up libmysqlclient-dev (5.1.54-1ubuntu4) ...
&lt;/pre&gt;
&lt;p&gt;After that, the mysql2 gem installation succeeded without any trouble.&lt;/p&gt;</content>
		<author>
			<name>Trevor Bramble</name>
			<uri></uri>
		</author>
		<source>
			<title type="html">blog.TrevorBramble.com</title>
			<link rel="self" href="http://blog.trevorbramble.com/atom"/>
			<id>http://blog.trevorbramble.com/</id>
			<updated>2012-04-22T21:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">OpenLogic FUD</title>
		<link href="http://adammonsen.com/post/684"/>
		<id>http://adammonsen.com/?p=684</id>
		<updated>2011-05-19T03:44:19+00:00</updated>
		<content type="html">&lt;p&gt;What&amp;#8217;s up with OpenLogic? A recent wave of press claims that &lt;a href=&quot;http://www.internetnews.com/bus-news/article.php/3933591/What+is+the+Top+Open+Source+License.htm&quot;&gt;OpenLogic&amp;#8217;s data reveals the top Open Source license&lt;/a&gt;. Meh, no way.&lt;/p&gt;&lt;p&gt;I commented on that article (corrections made):&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Sean, your headline and article are misleading. These claims may be true for OLEX, but not FLOSS in general. I&amp;#8217;ve been downloading FLOSS for over 10 years, and I&amp;#8217;ve never heard of OLEX. I download most FLOSS from GNU/Linux distributors (Fedora/Debian/Ubuntu/Canonical). I&amp;#8217;m not sure if they even track downloads.&lt;/p&gt;&lt;p&gt;Do the people at Geeknet/sf.net, Google Code, and the FSF support your findings?&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Come on, OpenLogic. Are you serious?&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Learning Less</title>
		<link href="http://blog.trevorbramble.com/past/2011/5/17/learning_less/"/>
		<id>http://blog.trevorbramble.com/past/2011/5/17/learning_less/</id>
		<updated>2011-05-18T04:40:15+00:00</updated>
		<content type="html">&lt;a href=&quot;http://trevor.mythinkup.com/post/?t=70377319528800257&amp;n=twitter&quot;&gt;&lt;img src=&quot;http://farm6.static.flickr.com/5125/5732189905_e7cd5c2f77_z.jpg&quot; height=&quot;285&quot; width=&quot;561&quot; /&gt;&lt;/a&gt;
&lt;p&gt;I&amp;#8217;ve been using Linux for a long time, and using the &lt;em&gt;less&lt;/em&gt; utility increasingly over recent years. Discovering that I&amp;#8217;d been missing some really great functionality and would never have known but for a twitch made me sit up and think a bit.&lt;/p&gt;

&lt;p&gt;Steve Krug&amp;#8217;s &lt;strong&gt;Don't Make Me Think&lt;/strong&gt; taught me an amazing word: &lt;em&gt;satisfice&lt;/em&gt;. We all do it, all the time. We learn just enough to satisfy our immediate need with exactly what will suffice and no more so we can move on to whatever our &lt;em&gt;real&lt;/em&gt; goal is, and that&amp;#8217;s exactly what I did with &lt;em&gt;less&lt;/em&gt;, resulting in going out of my way to open a file for editing occasionally because I didn&amp;#8217;t take a few minutes to read the manual.&lt;/p&gt;</content>
		<author>
			<name>Trevor Bramble</name>
			<uri></uri>
		</author>
		<source>
			<title type="html">blog.TrevorBramble.com</title>
			<link rel="self" href="http://blog.trevorbramble.com/atom"/>
			<id>http://blog.trevorbramble.com/</id>
			<updated>2012-04-22T21:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">require-rubygems.overrides and gem2deb 0.2.2</title>
		<link href="http://blog.loftninjas.org/2011/05/05/require-rubygems-overrides-and-gem2deb-0-2-2/"/>
		<id>http://blog.loftninjas.org/?p=720</id>
		<updated>2011-05-06T00:43:01+00:00</updated>
		<content type="html">&lt;p&gt;For those working on moving debian ruby library packaging to gem2deb, you can exempt specific hits from the slick built in &amp;#8216;require rubygems&amp;#8217; test by adding the path to debian/require-rubygems.overrides.&lt;/p&gt;
&lt;p&gt;For instance, to exempt this:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; toolbar: false; notranslate&quot;&gt;
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/version'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/dependency'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/spec_fetcher'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/platform'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/format'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/dependency_installer'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/uninstaller'
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb: require 'rubygems/specification'
debian/chef/usr/lib/ruby/vendor_ruby/chef/providers.rb: require 'chef/provider/package/rubygems'
Found some 'require rubygems' without overrides (see above).
ERROR: Test &amp;quot;require-rubygems&amp;quot; failed. Exiting.
dh_auto_install: dh_ruby --install /«BUILDDIR»/chef-0.10.0/debian/chef returned exit code 1
make: *** [binary] Error 1
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
&lt;/pre&gt;
&lt;p&gt;debian/require-rubygems.overrides should contain:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; toolbar: false; notranslate&quot;&gt;
debian/chef/usr/lib/ruby/vendor_ruby/chef/provider/package/rubygems.rb
debian/chef/usr/lib/ruby/vendor_ruby/chef/providers.rb
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">You are not a Software Engineer</title>
		<link href="http://adammonsen.com/post/689"/>
		<id>http://adammonsen.com/?p=689</id>
		<updated>2011-05-05T19:21:10+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://chrisaitchison.com/2011/05/03/you-are-not-a-software-engineer&quot;&gt;http://chrisaitchison.com/2011/05/03/you-are-not-a-software-engineer&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Thank you &lt;a href=&quot;http://fedoraproject.org/wiki/JesseKeating&quot;&gt;Jesse&lt;/a&gt; for the link!&lt;/p&gt;&lt;p&gt;I really like the post, but I&amp;#8217;d like to suggest a couple changes to the Chris Aitchison. Maybe the team of people building the software is the garden, and the software product is just a fruit (or maybe people producing the software are gardeners &lt;em&gt;and&lt;/em&gt; the garden!). Second, the metaphor works well enough for Web programmers. But folks writing game ROMs (for instance, 8-bit Nintendo games), lunar lander software, and Level-A software for commercial airliners &lt;em&gt;really are&lt;/em&gt; Software Engineers.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">New Blargh Title</title>
		<link href="http://adammonsen.com/post/686"/>
		<id>http://adammonsen.com/?p=686</id>
		<updated>2011-05-01T14:08:51+00:00</updated>
		<content type="html">&lt;p&gt;I still like Free Software, but I decided to change the name of this blog to just&amp;#8230; my name. In my feed reader, I found myself renaming other creatively-named blogs authored by one person mainly about their own interests to their name. So I guess this is dogfooding.&lt;/p&gt;&lt;p&gt;Dear reader, I&amp;#8217;d love to hear your preference: creative blog names or simple but accurate names?&lt;/p&gt;&lt;p&gt;Blargh == blog. I think I got that from Aaron Patterson.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">LFNW is tomorrow!</title>
		<link href="http://deadletter.posterous.com/lfnw-is-tomorrow"/>
		<id>http://deadletter.posterous.com/lfnw-is-tomorrow</id>
		<updated>2011-04-29T14:03:07+00:00</updated>
		<content type="html">&lt;p&gt;
	&quot;LinuxFest Northwest is happening this Saturday in Bellingham Wa&quot;. I'll &lt;br /&gt;be there (for my 6th year) with the BitPusher crew, helping run the &lt;br /&gt;GameDen and even shmoozing a bit. &lt;p&gt;&lt;/p&gt; &lt;a href=&quot;http://linuxfestnorthwest.org/&quot;&gt;http://linuxfestnorthwest.org/&lt;/a&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://deadletter.posterous.com/lfnw-is-tomorrow&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://deadletter.posterous.com/lfnw-is-tomorrow#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Mark Foster</name>
			<uri>http://deadletter.posterous.com</uri>
		</author>
		<source>
			<title type="html">dead.letter</title>
			<subtitle type="html">Most recent posts at dead.letter</subtitle>
			<link rel="self" href="http://deadletter.posterous.com/rss.xml"/>
			<id>http://deadletter.posterous.com/rss.xml</id>
			<updated>2012-04-21T23:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Programmable Text Editors are Cool Tools!</title>
		<link href="http://adammonsen.com/post/682"/>
		<id>http://adammonsen.com/?p=682</id>
		<updated>2011-04-28T19:35:52+00:00</updated>
		<content type="html">&lt;p&gt;Are you a writer? Consider learning a &lt;a href=&quot;http://www.kk.org/cooltools/archives/005259.php&quot;&gt;programmable text editor&lt;/a&gt;. You don&amp;#8217;t need to be a programmer to learn one, you just need a little patience and curiosity. Thanks for picking up my article, &lt;a href=&quot;http://www.kk.org/cooltools/&quot;&gt;Cool Tools&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;On a related note, I&amp;#8217;ll be giving a &lt;a href=&quot;http://linuxfestnorthwest.org/sessions/beyond-wq-life-changing-vim-plugins&quot;&gt;talk on Vim at LinuxFest Northwest&lt;/a&gt;. Hope you can make it!&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">locale errors on debian</title>
		<link href="http://blog.loftninjas.org/2011/04/14/locale-errors-on-debian/"/>
		<id>http://blog.loftninjas.org/?p=717</id>
		<updated>2011-04-14T21:51:00+00:00</updated>
		<content type="html">&lt;p&gt;I received the following error while working on a Debian sid box:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
$ schroot -l
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Aborted
&lt;/pre&gt;
&lt;p&gt;With &lt;a href=&quot;http://people.debian.org/~schultmc/locales.html&quot;&gt;debconf + locales&lt;/a&gt; already installed, I ran &amp;#8216;export | grep LANG&amp;#8217; to discover that my locale was set to &amp;#8216;en_US.UTF-8&amp;#8242;. Then I ran &amp;#8216;dpkg-reconfigure locale&amp;#8217; and checked that locale and set it to the default.&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Creating a Debian sid emi for Eucalyptus</title>
		<link href="http://blog.loftninjas.org/2011/04/13/creating-a-debian-sid-emi-for-eucalyptus/"/>
		<id>http://blog.loftninjas.org/?p=709</id>
		<updated>2011-04-13T23:43:52+00:00</updated>
		<content type="html">&lt;p&gt;For the most part, this is the same as any post about creating an image for Eucalyptus, but I had a hard time figuring out exactly how to put it all together. You need an up to date Debian sid system nearby to take the kernel and ramdisk from. I found having a sid VM easier than discovering the commands to build a sid initrd on my Ubuntu workstation.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
# First, the prerequisites. You need debootstrap and the eucalyptools tools installed.
sudo apt-get install debootstrap euca2ools

# Export your eucalyptus variables to use the tools.
source ~/.euca/eucarc

# Create an empty disk image. You can adjust the count to change the root disk size. 1000 is about a GB.
dd if=/dev/zero of=image count=1000 bs=1M

# Put a filesystem on the new disk image
mkfs.ext3 -F image

# Mount the filesystem
mkdir chroot
sudo mount -o loop image chroot

# Install debian sid to the chroot. Notice that the ssh server and curl are included here
sudo debootstrap --include=openssh-server,curl,vim --arch amd64 sid chroot/ http://ftp.debian.org

# chroot into the image
sudo chroot chroot

# Setup basic networking and disk configurations
echo -e 'auto lo\niface lo inet loopback\nauto eth0\niface eth0 inet dhcp' &amp;gt;&amp;gt; /etc/network/interfaces
echo -e '/dev/sda1 / ext3 defaults 0 1\n/dev/sda2 swap swap defaults 0 0' &amp;gt; /etc/fstab

# Set a default root password if you want
# passwd

# Set up the image to automatically install ssh keys
mkdir /root/.ssh
cat &amp;lt;&amp;lt;EOS &amp;gt; /etc/rc.local
echo &amp;gt;&amp;gt; /root/.ssh/authorized_keys
curl -m 10 -s http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key | grep 'ssh-rsa' &amp;gt;&amp;gt; /root/.ssh/authorized_keys
echo &amp;quot;AUTHORIZED_KEYS:&amp;quot;
echo &amp;quot;************************&amp;quot;
cat /root/.ssh/authorized_keys
echo &amp;quot;************************&amp;quot;
exit 0
EOS

# Leave the image
exit

# Unmount the image
sudo umount chroot

# After you've copied the latest /boot/vmlinuz* and /boot/initrd* from your sid system, upload the kernel + ramdisk
euca-bundle-image --image vmlinuz-2.6.38-2-amd64 --kernel true
euca-upload-bundle --bucket sid --manifest vmlinuz-2.6.38-2-amd64.manifest.xml
euca-register sid/vmlinuz-2.6.38-2-amd64.manifest.xml
euca-bundle-image --image initrd.img-2.6.38-2-amd64 --ramdisk true
euca-upload-bundle --bucket sid --manifest initrd.img-2.6.38-2-amd64.manifest.xml
euca-register sid/initrd.img-2.6.38-2-amd64.manifest.xml

# Prepare the image for upload, use the values given by euca-register above here
euca-bundle-image -i image --kernel eki-XXXXXXXX --ramdisk eri-XXXXXXXX

# Rename to manifest to something descriptive and upload it
mv image.manifest.xml `date +%Y%m%d`.sid.manifest.xml
euca-upload-bundle -b sid -m `date +%Y%m%d`.sid.manifest.xml

# Register the image to get an EMI
euca-register sid/`date +%Y%m%d`.sid.manifest.xml
&lt;/pre&gt;
&lt;p&gt;You should be able to use euca-run-instance on the emi that is returned by the last command. Remember to pass an ssh key (that eucalyptus knows about) using -k. If there are any issues, use euca-get-console-output to monitor the instance startup and tail the eucalyptus/nc.log file on the node controller for any errors. Building the initrd this way is a little hackish, because it is actually generated for your sid system, not for the one running in eucalyptus. Chicken, or the egg?&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Certification revocation is basically useless</title>
		<link href="http://deadletter.posterous.com/certification-revocation-is-basically-useless"/>
		<id>http://deadletter.posterous.com/certification-revocation-is-basically-useless</id>
		<updated>2011-04-01T14:36:00+00:00</updated>
		<content type="html">&lt;p&gt;
	&lt;p&gt;Interesting article from Ars Technica about certificates being used for man-in-the-middle (MITM) attacks. The quote &quot;&lt;span&gt;Certification revocation is basically useless&quot; sure hits home.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href=&quot;http://arstechnica.com/security/news/2011/03/how-the-comodo-certificate-fraud-calls-ca-trust-into-question.ars/&quot;&gt;http://arstechnica.com/security/news/2011/03/how-the-comodo-certificate-fraud-calls-ca-trust-into-question.ars/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
	
&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://deadletter.posterous.com/certification-revocation-is-basically-useless&quot;&gt;Permalink&lt;/a&gt; 

	| &lt;a href=&quot;http://deadletter.posterous.com/certification-revocation-is-basically-useless#comment&quot;&gt;Leave a comment&amp;nbsp;&amp;nbsp;&amp;raquo;&lt;/a&gt;

&lt;/p&gt;</content>
		<author>
			<name>Mark Foster</name>
			<uri>http://deadletter.posterous.com</uri>
		</author>
		<source>
			<title type="html">dead.letter</title>
			<subtitle type="html">Most recent posts at dead.letter</subtitle>
			<link rel="self" href="http://deadletter.posterous.com/rss.xml"/>
			<id>http://deadletter.posterous.com/rss.xml</id>
			<updated>2012-04-21T23:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Swimming in the deep end</title>
		<link href="http://adammonsen.com/post/667"/>
		<id>http://adammonsen.com/?p=667</id>
		<updated>2011-03-21T20:46:51+00:00</updated>
		<content type="html">&lt;p&gt;A coworker forwarded me an inspiring article from the Harvard Business Review. I was interested after the first paragraph, and was looking excitedly looking forward to finishing it along with a cookie. But &lt;em&gt;I could not&lt;/em&gt;!&lt;/p&gt;&lt;p&gt;&lt;span id=&quot;more-667&quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I&amp;#8217;d get a couple more sentences in before being distracted. I would dutifully stop, blink, then rewind a couple sentences, then repeat. Over and over. The dreaded &lt;a href=&quot;http://youtube.com/watch?v=7jT0JT3N47g&quot;&gt;technology loop&lt;/a&gt;!&lt;/p&gt;&lt;p&gt;&lt;em&gt;Hmm, I&amp;#8217;d rather read this as an ebook. I wonder how I could convert it. I wonder who else has read this article. Do I have any new emails? Maybe there&amp;#8217;s some news on Lybia I should be aware of. What other stuff has this dude written that I should read first? Man, an ebook of this would be nice. Maybe I should just print it?&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Come on brain, read! &lt;em&gt;Think!&lt;/em&gt; And remember, dangit!&lt;/p&gt;&lt;p&gt;I felt like I was learning to read for the first time. I had to work &lt;em&gt;very&lt;/em&gt; hard to actually make it through the article. Then I stopped to think about what I had read, and realized my reading comprehension was for naught.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://commons.wikimedia.org/wiki/File:Diver2.jpg&quot;&gt;&lt;img class=&quot;alignright&quot; title=&quot;diver&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/archive/f/f3/20060928211530!Diver2.jpg&quot; alt=&quot;black and white of diver in old swimsuit&quot; width=&quot;239&quot; height=&quot;177&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Why couldn&amp;#8217;t I take in the information? Because &lt;strong&gt;I was reading a computer screen&lt;/strong&gt;. When I&amp;#8217;m upright at the computer, hands on keyboard &amp;amp; mouse, I&amp;#8217;m in &lt;em&gt;computer&lt;/em&gt; mode, not &lt;em&gt;reading&lt;/em&gt; mode. Great for &lt;em&gt;doing&lt;/em&gt; stuff. Sure, I can learn stuff too, but nothing more than a tweet-sized tidbit. And the only pieces I can reliably hang on to are pointers to the &amp;#8220;real&amp;#8221; information online, somewhere. It&amp;#8217;s a useful state of being for some activities, not completive thought.&lt;/p&gt;&lt;p&gt;This is exactly the phenomenon described by Nicholas Carr in &lt;a href=&quot;http://www.theshallowsbook.com/&quot;&gt;&lt;em&gt;The Shallows&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I find myself doing this all the time lately.&lt;/p&gt;&lt;p&gt;me: &amp;#8220;Check out the supermoon!&amp;#8221;&lt;br /&gt; Eva: &amp;#8220;What&amp;#8217;s a supermoon?&amp;#8221;&lt;br /&gt; me: &amp;#8220;No idea. Just saw the headline. It&amp;#8217;s probably bigger or something.&amp;#8221;&lt;br /&gt; Eva: &amp;#8220;Huh?&amp;#8221;&lt;/p&gt;&lt;p&gt;Eva and I did an experiment for while where, for one day a week, we didn&amp;#8217;t use the internet. At all. For a whole day. Try it! I dare you.&lt;/p&gt;&lt;p&gt;Oh yeah, the article. It&amp;#8217;s 6 pages long. &lt;a href=&quot;http://hbr.org/2010/07/how-will-you-measure-your-life/ar&quot;&gt;&lt;em&gt;How Will You Measure Your Life?&lt;/em&gt;&lt;/a&gt; by Clayton M. Christensen.&lt;/p&gt;&lt;p&gt;Are you stuck in The Shallows at the computer? Are you able to read long articles on a computer screen? How do you recalibrate your brain when you need to think deeply about something? How does your reading comprehension and ability to concentrate change when you read newsprint? A book on an ebook reader? A printed novel? A Web page? How does your writing change when you use a computer vs. when you write with a pen and paper? Do you ever actually write with a pen and paper?&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">How to install the latest stable git release on Ubuntu 10.04 LTS</title>
		<link href="http://adammonsen.com/post/665"/>
		<id>http://adammonsen.com/?p=665</id>
		<updated>2011-03-21T18:39:18+00:00</updated>
		<content type="html">&lt;p&gt;I want a very stable desktop, so I&amp;#8217;m using Ubuntu 10.04 &amp;#8220;lucid lynx&amp;#8221; LTS (long-term support). I also want features of the latest version of git. I ran these commands to grab the latest stable git release without futzing with any manual downloading or dpkg.&lt;/p&gt;&lt;p&gt;&lt;code&gt;sudo apt-get install python-software-properties&lt;br /&gt; sudo add-apt-repository ppa:git-core/ppa&lt;br /&gt; sudo apt-get update&lt;br /&gt; sudo apt-get install git&lt;/code&gt;&lt;/p&gt;&lt;p&gt;Thank you, Anders Kaseorg!&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Linux_distribution&quot;&gt;Distribution&lt;/a&gt; packages in a release typically lag behind those released by &lt;a href=&quot;http://en.wikipedia.org/wiki/Upstream_(software_development)&quot;&gt;upstream maintainers&lt;/a&gt;. This is expected: part of what makes a release stable is intentionally &lt;em&gt;not&lt;/em&gt; introducing changes. &lt;a href=&quot;https://help.launchpad.net/Packaging/PPA&quot;&gt;PPAs (personal package archives)&lt;/a&gt; are a handy way to get at packages not already present in the distribution/release you are using. &lt;a href=&quot;https://help.ubuntu.com/community/UbuntuBackports&quot;&gt;Backports&lt;/a&gt; are handy too, but I didn&amp;#8217;t see the latest git in there for Ubuntu 10.04.&lt;/p&gt;&lt;p&gt;Back in the old days I used to manually scour some combination of rpmfind, DAG, Dries, ATrpms, rpmforge, (and others!) to find the right packages and dependencies.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Voicemail via Google Voice, iPhone Gotchas</title>
		<link href="http://blog.trevorbramble.com/past/2011/3/18/voicemail_via_google_voice_iphone_gotchas/"/>
		<id>http://blog.trevorbramble.com/past/2011/3/18/voicemail_via_google_voice_iphone_gotchas/</id>
		<updated>2011-03-18T20:08:03+00:00</updated>
		<content type="html">&lt;p&gt;TL;DR: If you replace an iPhone with a non-iPhone on the same AT&amp;amp;T account, make sure AT&amp;amp;T &amp;#8220;re-features&amp;#8221; your account voicemail, whether you want to use it or replace it with Google Voice.&lt;/p&gt;

&lt;p&gt;I recently replaced my first-gen Apple iPhone with a Motorola&amp;#8217;s new premium Android phone for AT&amp;amp;T, the Atrix 4G. Some time ago I switched voicemail handling from the iPhone&amp;#8217;s &amp;#8220;visual voicemail&amp;#8221; to Google Voice. It turned out to work very well for me so I stuck with it.&lt;/p&gt;

&lt;p&gt;Naturally I wanted to continue using Google Voice when I upgraded to the Atrix, so I didn&amp;#8217;t change a thing when my service was transferred. Eventually I discovered that unanswered calls to my Google Voice number would go to voicemail, but calls to my old carrier-assigned number would ring forever (or until the caller lost patience and terminated the connection).&lt;/p&gt;

&lt;p&gt;Attempts to correct this by setting Google Voice as my voicemail handler with the controls in the Google Voice web application (and the given MMI codes) and adjusting the Call Settings on the phone met with cryptic error messages.&lt;/p&gt;

&lt;p&gt;Eventually, a web search provided the important nugget of information that led to a resolution. The voicemail feature on my AT&amp;amp;T account had a lingering setting for iPhone visual voicemail that was preventing manipulation. A few minutes in chat with an AT&amp;amp;T rep had that cleared up!&lt;/p&gt;

&lt;p&gt;This may be important to others as well: I made a good number of frustrated attempts to call my carrier-provided phone number and kept hearing the endless ringing, only to find a voicemail from my brother waiting for me when I returned to the computer and phone after walking away for a few minutes. I&amp;#8217;d been testing by calling from the only other available phone I had: Google Talk. And yes, Google Talk uses my Google Voice number, so I was just being forwarded back to myself.&lt;/p&gt;</content>
		<author>
			<name>Trevor Bramble</name>
			<uri></uri>
		</author>
		<source>
			<title type="html">blog.TrevorBramble.com</title>
			<link rel="self" href="http://blog.trevorbramble.com/atom"/>
			<id>http://blog.trevorbramble.com/</id>
			<updated>2012-04-22T21:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">LVM errors with sbuild</title>
		<link href="http://blog.loftninjas.org/2011/03/10/lvm-errors-with-sbuild/"/>
		<id>http://blog.loftninjas.org/?p=705</id>
		<updated>2011-03-10T19:51:17+00:00</updated>
		<content type="html">&lt;p&gt;Here is a strange one that I fixed but I&amp;#8217;m not sure why. Roughly using the &lt;a href=&quot;https://help.ubuntu.com/community/SbuildLVMHowto&quot;&gt;SBuildLVM Howto&lt;/a&gt;, and the &lt;a href=&quot;http://community.opscode.com/cookbooks/sbuild&quot;&gt;Chef sbuild cookbook&lt;/a&gt;, I have an sbuild server. It was working alright for me, but another user was seeing this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;schroot -c lucid&lt;br /&gt;
E: 05lvm: File descriptor 3 (socket:[460392]) leaked on lvcreate invocation.&lt;br /&gt;
E: lucid-40c0e109-2d5d-4103-bf92-a44288595dcc: Chroot setup failed: stage=setup-start&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When he ran with verbose mode, this line was particularly interesting:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;E: 05lvm:   &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;When I su&amp;#8217;d to his user, it worked fine for me without verbose but failed similarly with the verbose flag. &lt;/p&gt;
&lt;p&gt;In the course of debugging, I started trying to redirect output and I found that these changes to /etc/schroot/setup.d/05lvm fixed the problem. Unfortunately I&amp;#8217;m running behind on work so I can&amp;#8217;t track down the root cause right now.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
--- 05lvm.orig	2011-03-10 19:28:17.000000000 +0000
+++ 05lvm	2011-03-10 19:37:54.000000000 +0000
@@ -36,10 +36,10 @@

 	if [ &amp;quot;$AUTH_VERBOSITY&amp;quot; = &amp;quot;verbose&amp;quot; ]; then
 	    lvcreate $VERBOSE --snapshot --name &amp;quot;$CHROOT_LVM_SNAPSHOT_NAME&amp;quot; \
-		&amp;quot;$CHROOT_DEVICE&amp;quot; $CHROOT_LVM_SNAPSHOT_OPTIONS
+		&amp;quot;$CHROOT_DEVICE&amp;quot; $CHROOT_LVM_SNAPSHOT_OPTIONS 2&amp;gt;&amp;amp;1
 	else
 	    lvcreate $VERBOSE --snapshot --name &amp;quot;$CHROOT_LVM_SNAPSHOT_NAME&amp;quot; \
-		&amp;quot;$CHROOT_DEVICE&amp;quot; $CHROOT_LVM_SNAPSHOT_OPTIONS &amp;gt; /dev/null
+		&amp;quot;$CHROOT_DEVICE&amp;quot; $CHROOT_LVM_SNAPSHOT_OPTIONS 2&amp;gt;&amp;amp;1 &amp;gt; /dev/null
 	fi

     elif [ $1 = &amp;quot;setup-stop&amp;quot; ]; then
@@ -57,9 +57,9 @@
 		--pid=$PID || true

 	    if [ &amp;quot;$AUTH_VERBOSITY&amp;quot; = &amp;quot;verbose&amp;quot; ]; then
-		lvremove $VERBOSE -f &amp;quot;$CHROOT_LVM_SNAPSHOT_DEVICE&amp;quot; || true
+		lvremove $VERBOSE -f &amp;quot;$CHROOT_LVM_SNAPSHOT_DEVICE&amp;quot; 2&amp;gt;&amp;amp;1 || true
 	    else
-		lvremove $VERBOSE -f &amp;quot;$CHROOT_LVM_SNAPSHOT_DEVICE&amp;quot; &amp;gt; /dev/null || true
+		lvremove $VERBOSE -f &amp;quot;$CHROOT_LVM_SNAPSHOT_DEVICE&amp;quot; 2&amp;gt;&amp;amp;1 &amp;gt; /dev/null || true
 	    fi
 	else
 	    # The block device no longer exists, or was never created,
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Measuring Development Speed II</title>
		<link href="http://adammonsen.com/post/655"/>
		<id>http://adammonsen.com/?p=655</id>
		<updated>2011-02-25T16:03:00+00:00</updated>
		<content type="html">&lt;p&gt;This is a followup to &lt;a href=&quot;http://adammonsen.com/post/644&quot;&gt;my post about Measuring Development Speed&lt;/a&gt;. Here&amp;#8217;s an updated graph showing the current state of head/master:&lt;br /&gt; &lt;a href=&quot;http://adammonsen.com/wp-content/uploads/2011/02/counts.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-656&quot; title=&quot;counts&quot; src=&quot;http://adammonsen.com/wp-content/uploads/2011/02/counts-300x225.png&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Most dramatic change in Struts/jsp LOC is now: &lt;strong&gt;5412&lt;/strong&gt; (time period ending Feb 2011)&lt;/p&gt;&lt;p&gt;Most dramatic change in SpringMVC/ftl LOC is still: &lt;strong&gt;3665&lt;/strong&gt; (time period ending Sep 2010)&lt;/p&gt;&lt;p&gt;Again, some assumptions/disclaimers:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;these data are not useful for estimating speed of future refactoring work&lt;/li&gt;&lt;li&gt;all acceptance tests pass in refactored areas&lt;/li&gt;&lt;li&gt;look &amp;amp; feel of refactored areas is acceptable&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Also see this &lt;a href=&quot;http://thread.gmane.org/gmane.comp.finance.mifos.devel/10798&quot;&gt;this thread on the dev list&lt;/a&gt; about the usefulness of these measurements.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">munin-cgi-graph with fcgid on ubuntu lucid</title>
		<link href="http://blog.loftninjas.org/2011/02/24/munin-cgi-graph-with-fcgid-on-ubuntu-lucid/"/>
		<id>http://blog.loftninjas.org/?p=695</id>
		<updated>2011-02-25T00:02:49+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://blog.loftninjas.org/wp-content/uploads/2011/02/munin_stats-day.png&quot;&gt;&lt;img src=&quot;http://blog.loftninjas.org/wp-content/uploads/2011/02/munin_stats-day-300x187.png&quot; alt=&quot;&quot; title=&quot;munin_stats-day&quot; width=&quot;300&quot; height=&quot;187&quot; class=&quot;alignleft size-medium wp-image-703&quot; /&gt;&lt;/a&gt;Two and a half years have passed since I wrote about running &lt;a href=&quot;http://blog.loftninjas.org/2008/09/16/munin-cgi-graph-with-fastcgi-on-debian-etch/&quot;&gt;Munin with fastcgi triggered graphs on Debian etch&lt;/a&gt;. Unfortunately, not a lot has changed since then. A revolution in trending would have been nice. When I started here munin was triggering graph generation using CGI and was painfully slow to use. I switched over to cron triggered graph generation and was happy. After a data center migration, drawing the munin graphs for that cluster from cron was taking about 130 seconds. As a precaution I wanted to get this down a bit. &lt;/p&gt;
&lt;p&gt;Someone asked me why munin-graph would have caused data loss because munin-update collects the data and I couldn&amp;#8217;t remember. I had problems with both munin-update and munin-update taking over five minutes in certain circumstances back then. The latter was primarily from the slow response time of the SNMP queries I was doing against MSSQL servers. That was back during Munin 1.2 as well and a few things have changed since then, most relevant is that you no longer have to patch Munin for fastcgi support.&lt;/p&gt;
&lt;p&gt;This time around I used &lt;a href=&quot;http://httpd.apache.org/mod_fcgid/&quot;&gt;fcgid&lt;/a&gt; instead of fastcgi. There are less licensing hurdles for fcgid, which was written to be compatible with fastcgi. Provided you already have munin running, install the prerequsites first.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
sudo apt-get install libcgi-fast-perl libdate-manip-perl libapache2-mod-fcgid
&lt;/pre&gt;
&lt;p&gt;The packaging should restart Apache as required to load the new module we just installed, but we need to configure our Munin site a bit to link our CGI script to fcgid. Add this to or update the VirtualHost block for your Apache configuration and reload Apache.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/

  &amp;lt;Directory /usr/lib/cgi-bin/&amp;gt;
    AllowOverride None
    Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
  &amp;lt;/Directory&amp;gt;

  &amp;lt;Location /cgi-bin/munin-fastcgi-graph&amp;gt;
    SetHandler  fastcgi-script
  &amp;lt;/Location&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Add the following lines to your munin.conf. This causes the munin-graph that is run from cron to not generate any graphs (noops) and munin-html will update the img src links to use the CGI script to generate the graphs rather than linking directly to files. You&amp;#8217;ll need to wait for the cron job to run once or run munin-html yourself to trigger this.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
graph_strategy cgi
cgiurl_graph /cgi-bin/munin-fastcgi-graph
&lt;/pre&gt;
&lt;p&gt;Triggering munin-html manually:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
sudo -s
sudo -u munin /usr/share/munin/munin-html --debug
&lt;/pre&gt;
&lt;p&gt;Remember that Apache needs to be able to write the graphs out. You will get no graphs and HTTP 500 errors in your Apache logs if the munin-cgi-graph script cannot write the graphs out. My Munin data directory, /var/www/munin/ is owned by &amp;#8216;munin&amp;#8217; while Apache runs as &amp;#8216;www-data&amp;#8217;. The following commands fix this, but Apache is going to change the user ownership to &amp;#8216;www-data&amp;#8217; when it saves a file by default, so if you try to switch back to munin-graph via cron, you&amp;#8217;ll need to fix permissions again.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
sudo chgrp -R www-data /var/www/munin
sudo chmod -R g+w /var/www/munin
sudo chgrp www-data /var/log/munin /var/log/munin/munin-graph.log
sudo chmod g+w /var/log/munin /var/log/munin/munin-graph.log
&lt;/pre&gt;
&lt;p&gt;After the switch to fcgid generated munin graphs, generating all the graphs for a single node would take minutes and was quite painful. I gave the node more CPU resources, but it still took two minutes to draw a page of graphs. I ended up switching back to cron based graph generation. The additional CPU resources cut about forty seconds off the munin-graph time from cron, which is progress. Having the graphs immediately available when you need them is worth the cost of the CPU resources you could otherwise share that you would save from demand based graph generation via CGI. For the time being I intend to keep giving Munin more CPU until I find settle on a better way to do trending.&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">My O'Reilly Wish List</title>
		<link href="http://blog.trevorbramble.com/past/2011/2/20/my_oreilly_wish_list/"/>
		<id>http://blog.trevorbramble.com/past/2011/2/20/my_oreilly_wish_list/</id>
		<updated>2011-02-21T00:27:54+00:00</updated>
		<content type="html">&lt;p&gt;&lt;em&gt;Note: this list was meant to fit within the requirements of &lt;a href=&quot;http://oreilly.com/new-year-2011.csp&quot;&gt;this O&amp;#8217;Reilly sweepstake&lt;/a&gt;. It&amp;#8217;s not a comprehensive list of the books/videos/etc. I&amp;#8217;d like to buy/read/view/etc.&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596155407/&quot;&gt;Being Geek (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596005955/&quot;&gt;Classic Shell Scripting (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596516253/&quot;&gt;Designing Web Interfaces (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596528102/&quot;&gt;Designing Web Navigation (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/0636920010630/&quot;&gt;Diagnosing and Fixing MySQL Performance Problems (video)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/0636920016205/&quot;&gt;Great Bash (video)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9781565925090/&quot;&gt;HTTP: The Definitive Guide (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/0636920010203/&quot;&gt;Mining the Social Web (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/0636920013990/&quot;&gt;Mobile Web High Performance (video)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596807306/&quot;&gt;MySQL High Availability (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9781565922259/&quot;&gt;sed &amp;amp; awk, Second Edition (ebook)&lt;/a&gt;&lt;/li&gt;

&lt;li&gt;&lt;a href=&quot;http://oreilly.com/catalog/9780596008956/&quot;&gt;SSH, The Secure Shell: The Definitive Guide, Second Edition (ebook)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Trevor Bramble</name>
			<uri></uri>
		</author>
		<source>
			<title type="html">blog.TrevorBramble.com</title>
			<link rel="self" href="http://blog.trevorbramble.com/atom"/>
			<id>http://blog.trevorbramble.com/</id>
			<updated>2012-04-22T21:00:04+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">The power of Chef and Ruby</title>
		<link href="http://blog.loftninjas.org/2011/02/16/the-power-of-chef-and-ruby/"/>
		<id>http://blog.loftninjas.org/?p=682</id>
		<updated>2011-02-16T20:57:07+00:00</updated>
		<content type="html">&lt;p&gt;The argument that Chef is difficult to learn because recipes are written in Ruby is a fallacy. &lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
package &amp;quot;vim&amp;quot;

cookbook_file &amp;quot;/home/btm/.vimrc&amp;quot; do
  source &amp;quot;dot-vimrc&amp;quot;
  owner &amp;quot;btm&amp;quot;
  group &amp;quot;btm&amp;quot;
  mode &amp;quot;0644&amp;quot;
end
&lt;/pre&gt;
&lt;p&gt;With the exception of the do/end block, that doesn&amp;#8217;t look like a programming language at all and is way easier to grok than some configuration file syntaxes I&amp;#8217;ve used. Any tool&amp;#8217;s configuration file syntax has a learning curve and refusing to learn a new one means you&amp;#8217;re going to be stuck in the past using old tools. Someone may not want to try out nginx today because they already know how to configure Apache, and I understand that up to a point. The tool you know is sometimes easier to use in the less than ideal conditions because you already understand it. I can&amp;#8217;t spend all of my time learning new tools anymore than the next person, but frankly if you are unwilling to learn something new, you are in the wrong industry. We are moving fast over here.&lt;/p&gt;
&lt;p&gt;Even if you don&amp;#8217;t know any Ruby, over time you start reusing other people&amp;#8217;s code shortcuts because it is easier to write understandable and flexible code.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
# Install useful troubleshooting tools that get regular use
%w{htop dstat strace sysstat gdb tmux tshark}.each do |tool_package|
  package tool_package
end

# Install the correct apache package depending on distribution
package &amp;quot;apache2&amp;quot; do
  case node[:platform]
  when &amp;quot;centos&amp;quot;,&amp;quot;redhat&amp;quot;,&amp;quot;fedora&amp;quot;,&amp;quot;suse&amp;quot;
    package_name &amp;quot;httpd&amp;quot;
  when &amp;quot;debian&amp;quot;,&amp;quot;ubuntu&amp;quot;
    package_name &amp;quot;apache2&amp;quot;
  end
  action :install
end
&lt;/pre&gt;
&lt;p&gt;Because Chef recipes are written in Ruby and they are compiled on the client rather than the server you can leverage Ruby in very powerful ways. When we want to create databases and grant privileges for a web application, we can use a number of &lt;a href=&quot;http://wiki.opscode.com/display/chef/Resources&quot;&gt;Chef resources&lt;/a&gt;, primarily execute, to use existing tools such as mysqladmin. We can also leverage Ruby to access Ruby libraries. Ruby code in a Chef recipe is executed during convergence, but Ruby code in a &lt;a href=&quot;http://wiki.opscode.com/display/chef/Resources#Resources-RubyBlock&quot;&gt;ruby_block&lt;/a&gt; resource is executed along with other resources during compilation and can be notified like any other resource. You can get a better idea of when these steps happen from the &lt;a href=&quot;http://wiki.opscode.com/display/chef/Anatomy+of+a+Chef+Run&quot;&gt;Anatomy of a Chef Run&lt;/a&gt; page on the wiki. Here is some code I used recently that is quite a bit simpler to read and shorter than using resources to perform all of the steps.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
    ruby_block &amp;quot;Create database + execute grants&amp;quot; do
      block do
        require 'rubygems'
        Gem.clear_paths
        require 'mysql'

        m = Mysql.new(mysql_host, &amp;quot;root&amp;quot;, mysql_root_password)
        if !m.list_dbs.include?(node[:jira][:database_name])
          # Create the database
          Chef::Log.info &amp;quot;Creating mysql database #{node[:jira][:database_name]}&amp;quot;
          m.query(&amp;quot;CREATE DATABASE #{node[:jira][:database_name]} CHARACTER SET utf8&amp;quot;)

          # Grant and flush permissions
          Chef::Log.info &amp;quot;Granting access to #{node[:jira][:database_name]} for #{node[:jira][:database_user]}&amp;quot;
          m.query(&amp;quot;GRANT ALL ON #{node[:jira][:database_name]}.* TO '#{node[:jira][:database_user]}'@'localhost' IDENTIFIED BY '#{node[:jira][:database_password]}'&amp;quot;)
          m.reload
        end
      end
    end
&lt;/pre&gt;
&lt;p&gt;Because Chef makes it easy to model data, you don&amp;#8217;t need to write the above code. You can just use what I wrote and change your variable names. If you use it for more than one web_application, you could make it a cookbook definition or &lt;a href=&quot;http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+%28LWRP%29&quot;&gt;LWRP&lt;/a&gt; that you could extend as you need more features.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
initialize_mysql_db &amp;quot;jiradb&amp;quot; do
  database_name node[:jira][:database_name]
  database_user node[:jira][:database_user]
  database_password node[:jira][:database_password]
end
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Monitoring Unicorn connections with munin</title>
		<link href="http://blog.loftninjas.org/2011/02/11/monitoring-unicorn-connections-with-munin/"/>
		<id>http://blog.loftninjas.org/?p=673</id>
		<updated>2011-02-12T02:00:37+00:00</updated>
		<content type="html">&lt;p&gt;Unicorn doesn&amp;#8217;t have any monitoring hooks. Typically folks either put nginx in front and monitor response time, do some &lt;a href=&quot;http://rubyforge.org/pipermail/mongrel-unicorn/2010-February/000405.html&quot;&gt;backlog magic&lt;/a&gt; and track errors or make guesses based on other available information. I&amp;#8217;ve been using a modified version of the &lt;a href=&quot;http://exchange.munin-monitoring.org/plugins/unicorn_status/version/1&quot;&gt;unicorn_status munin plugin&lt;/a&gt; for a while. It tracks CPU time for a thread and considers that thread idle if it hasn&amp;#8217;t changed after sleeping for a second. This doesn&amp;#8217;t pan out under load. Still, here it is.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
#!/usr/bin/env ruby
#
# unicorn_status - A munin plugin for Linux to monitor unicorn processes
#
#  Copyright (C) 2010 Shinji Furuya - shinji.furuya@gmail.com
#  Copyright (C) 2010 Opscode, Inc. - Bryan McLellan &amp;lt;btm@loftninjas.org&amp;gt;
#    - Specify pid file via environment variable
#    - Do not assume process names
#  Licensed under the MIT license:
#  http://www.opensource.org/licenses/mit-license.php
#

module Munin
  class UnicornStatus

    def initialize
      @pid_file = ENV['UNICORN_PID']
    end

    def master_pid
      File.read(@pid_file).to_i
    end

    def worker_pids
      result = []
      ps_output = `ps w --ppid #{master_pid}`
      ps_output.each_line do |line|
        chunks = line.strip.split(/\s+/, 5)
        pid = chunks[0]
        result &amp;lt;&amp;lt; pid.to_i if pid =~ /\A\d+\z/
      end
      result
    end

    def worker_count
      worker_pids.size
    end

    def idle_worker_count
      result = 0
      before_cpu = {}
      worker_pids.each do |pid|
        before_cpu[pid] = cpu_time(pid)
      end
      sleep 1
      after_cpu = {}
      worker_pids.each do |pid|
        after_cpu[pid] = cpu_time(pid)
      end
      worker_pids.each do |pid|
        result += 1 if after_cpu[pid] - before_cpu[pid] == 0
      end
      result
    end

    def cpu_time(pid)
      usr, sys = `cat /proc/#{pid}/stat | awk '{print $14,$15 }'`.strip.split(/\s+/).collect { |i| i.to_i }
      usr + sys
    end
  end
end

case ARGV[0]
when &amp;quot;autoconf&amp;quot;
  puts &amp;quot;yes&amp;quot;
when &amp;quot;config&amp;quot;
  puts &amp;quot;graph_title Unicorn - Status&amp;quot;
  puts &amp;quot;graph_args -l 0&amp;quot;
  puts &amp;quot;graph_vlabel number of workers&amp;quot;
  puts &amp;quot;graph_category Unicorn&amp;quot;
  puts &amp;quot;total_worker.label total_workers&amp;quot;
  puts &amp;quot;idle_worker.label idle_workers&amp;quot;
else
  m = Munin::UnicornStatus.new
  puts &amp;quot;total_worker.value #{m.worker_count}&amp;quot;
  puts &amp;quot;idle_worker.value #{m.idle_worker_count}&amp;quot;
end
&lt;/pre&gt;
&lt;p&gt;And the configuration file:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
$ sudo cat /etc/munin/plugin-conf.d/unicorn
      [unicorn_*]
      user root
      env.UNICORN_PID /etc/sv/opscode-chef/supervise/pid
&lt;/pre&gt;
&lt;p&gt;I wrote another plugin today that uses &lt;a href=&quot;http://raindrops.bogomips.org/&quot;&gt;raindrops&lt;/a&gt; to collect information about the active and queued connections. It is interesting how greatly active connections fluctuates. Thus, active connections don&amp;#8217;t produce a stable munin graph, but having the queue depth recorded is pretty useful for tracking down latency issues.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
#!/usr/bin/env ruby
#  Copyright: 2011 Opscode, Inc.
#  Author: Bryan McLellan &amp;lt;btm@loftninjas.org&amp;gt;
#
#   Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;);
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

require 'rubygems'
require 'raindrops'

def collect(port)
  # raindrops requires an array of strings, even if it denies this
  addr = [ &amp;quot;0.0.0.0:#{port}&amp;quot; ]
  stats = Raindrops::Linux.tcp_listener_stats(addr)

  puts &amp;quot;active.value #{stats[addr[0]].active}&amp;quot;
  puts &amp;quot;queued.value #{stats[addr[0]].queued}&amp;quot;
end

if ARGV[0] == &amp;quot;config&amp;quot;
  puts &amp;quot;graph_title Unicorn - connections&amp;quot;
  puts &amp;quot;graph_args -l 0&amp;quot;
  puts &amp;quot;graph_printf %6.0lf&amp;quot;
  puts &amp;quot;graph_vlabel connections&amp;quot;
  puts &amp;quot;graph_category Unicorn&amp;quot;
  puts &amp;quot;active.label active&amp;quot;
  puts &amp;quot;queued.label queued&amp;quot;
  exit 0
end

if $0 =~ /.*_(\d+)/
  # the munin wildcard format of plugin_value
  port = $1
elsif ARGV.size &amp;gt; 0
  port = ARGV[0]
else
  usage = &amp;quot;Usage: #$0 port or #{$0}_port&amp;quot;
  abort usage
end

collect(port)
&lt;/pre&gt;
&lt;p&gt;Usage is the same as any wildcard munin plugin. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Install the raindrops gem&lt;/li&gt;
&lt;li&gt;Drop the above code in &amp;#8220;/usr/share/munin/plugins/unicorn_connections_&amp;#8221;&lt;/li&gt;
&lt;li&gt;Create a link from &amp;#8220;/etc/munin/plugins/unicorn_connections_UNICORNPORT&amp;#8221; to the above script&lt;/li&gt;
&lt;li&gt;killall -HUP munin-node&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Graphs should start showing up in five or ten minutes. You can always test like so:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
$ nc localhost 4949
# munin node at unicorn.example.org
fetch unicorn_connections_6880
active.value 5
queued.value 0
.
quit
&lt;/pre&gt;
&lt;p&gt;Of course, I use the Chef and the munin cookbook&amp;#8217;s &lt;a href=&quot;https://github.com/opscode/cookbooks/blob/master/munin/definitions/munin_plugin.rb&quot;&gt;munin_plugin definition&lt;/a&gt;, so my application&amp;#8217;s cookbook has this additional code:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
# required for unicorn_connections_ munin plugin
gem_package &amp;quot;raindrops&amp;quot;

munin_plugin &amp;quot;unicorn_connections_&amp;quot; do
  plugin &amp;quot;unicorn_connections_6880&amp;quot;
  create_file true
end
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Init replacements change fundamental assumptions</title>
		<link href="http://blog.loftninjas.org/2011/02/10/init-replacements-change-fundamental-assumptions/"/>
		<id>http://blog.loftninjas.org/?p=644</id>
		<updated>2011-02-10T21:15:18+00:00</updated>
		<content type="html">&lt;p&gt;&lt;strong&gt;The trend with init replacements&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When you write a number of &lt;a href=&quot;http://wiki.opscode.com/display/chef/Resources#Resources-Service&quot;&gt;service resource&lt;/a&gt; providers for a configuration management system, you get some intimate experience with the quirks of init systems. A slew of new ones are working their way into stable releases lately which seem primarily motivated by decreasing system startup time by allowing services to be started in parallel. For instance, Ubuntu has been &lt;a href=&quot;http://netsplit.com/2006/08/26/upstart-in-universe/&quot;&gt;moving to upstart&lt;/a&gt;, the latest release of &lt;a href=&quot;http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot&quot;&gt;Debian uses insserv&lt;/a&gt;, and &lt;a href=&quot;http://launchd.macosforge.org/&quot;&gt;OS X uses launchd&lt;/a&gt;. There is overlap in design, and certainly parallel service execution isn&amp;#8217;t the only significant improvement. Since init is a basic building block of our systems, small changes can cause large ripples. In the end we will have some great new functionality, but we&amp;#8217;re in a rough patch of transition right now and need to ensure the functionality we rely upon doesn&amp;#8217;t get passed over.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disabling services with Upstart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you want a service to not start on system startup, but still want to be able to start it, you have to comment out a line in the configuration file. Programmatically editing configuration files, from a script or a configuration management system is difficult to do cleanly. In general you want to avoid minor changes to configuration files because then you have to reconcile the differences when you upgrade the package. There are &lt;a href=&quot;https://bugs.launchpad.net/upstart/+bug/94065&quot;&gt;plans to add support for an override file&lt;/a&gt; wherein you can specify that the service is manual, but clearly Ubuntu server users are taking a backseat to desktop users inside Canonical where Upstart is developed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Restarting services with Upstart&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Which is interesting, as Ubuntu server related packages are being migrated to use Upstart. We start to run into additional quirks, such as when you restart a service that isn&amp;#8217;t running, Upstart does not start it. We plan to work around this behavior &lt;a href=&quot;http://tickets.opscode.com/browse/CHEF-1424&quot;&gt;in Chef&lt;/a&gt; but others have clearly &lt;a href=&quot;http://twitter.com/#!/crucially/status/35753942273110016&quot;&gt;taken notice&lt;/a&gt;.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ status mysql
mysql start/running, process 548
$ sudo restart mysql
mysql start/running, process 649
$ sudo stop mysql
mysql stop/waiting
$ sudo restart mysql
restart: Unknown instance:
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Insserv changes how you specify runlevels&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On Debian lenny you could specify service runlevels and priorities as such:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ sudo update-rc.d apache2 start 20 3 4 5 . stop 80 0 1 .
 Adding system startup for /etc/init.d/apache2 ...
   /etc/rc0.d/K80apache2 -&amp;amp;gt; ../init.d/apache2
   /etc/rc1.d/K80apache2 -&amp;amp;gt; ../init.d/apache2
   /etc/rc3.d/S20apache2 -&amp;amp;gt; ../init.d/apache2
   /etc/rc4.d/S20apache2 -&amp;amp;gt; ../init.d/apache2
   /etc/rc5.d/S20apache2 -&amp;amp;gt; ../init.d/apache2
&lt;/pre&gt;
&lt;p&gt;However on squeeze, update-rc.d is wrapped by insserv, which ignores your request and acts on the LSB headers.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ sudo update-rc.d apache2 start 20 3 4 5 . stop 80 0 1 2 6 .
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: apache2 start runlevel arguments (3 4 5) do not match LSB Default-Start values (2 3 4 5)
update-rc.d: warning: apache2 stop runlevel arguments (0 1 2 6) do not match LSB Default-Stop values (0 1 6)
$ find /etc/rc* -name '*apache*'
/etc/rc0.d/K01apache2
/etc/rc1.d/K01apache2
/etc/rc2.d/S18apache2
/etc/rc3.d/S18apache2
/etc/rc4.d/S18apache2
/etc/rc5.d/S18apache2
/etc/rc6.d/K01apache2
&lt;/pre&gt;
&lt;p&gt;Insserv does have an option to override the LSB headers, but the update-rc.d wrapper doesn&amp;#8217;t use it and you have to be very careful as it fails silently if you use it wrong.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ sudo insserv -r apache2
$ sudo insserv apache2,start=3,4,5,stop=0,1,2,6
$ find /etc/rc* -name '*apache*'
/etc/rc0.d/K01apache2
/etc/rc1.d/K01apache2
/etc/rc2.d/K01apache2
/etc/rc2.d/S18apache2
/etc/rc3.d/S18apache2
/etc/rc4.d/S18apache2
/etc/rc5.d/S18apache2
/etc/rc6.d/K01apache2
&lt;/pre&gt;
&lt;p&gt;Additional behavior to work around &lt;a href=&quot;http://tickets.opscode.com/browse/CHEF-2034&quot;&gt;in Chef&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Moving forward&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Distributions continue to change the way we interact with init with every release. This is clearly a reasons to use a configuration management tool. You know that you want mysql to never start automatically&lt;a href=&quot;http://www.krisbuytaert.be/blog/ensure-running&quot;&gt; because your cluster resource manager controls it&lt;/a&gt;, but how you achieve that has been changing lately with regularity. You can let your configuration management tool abstract that from you. Still, we need to stay involved in the discussions in the open source communities whose software we use and be proactive citizens.&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Measuring Development Speed</title>
		<link href="http://adammonsen.com/post/644"/>
		<id>http://adammonsen.com/?p=644</id>
		<updated>2011-01-25T19:35:19+00:00</updated>
		<content type="html">&lt;p&gt;We&amp;#8217;re rewriting the Mifos front-end from Struts 1.0/JSP to SpringMVC/Freemarker. So far it&amp;#8217;s been slow going, so we&amp;#8217;re trying out &lt;a href=&quot;http://mifosforge.jira.com/wiki/display/MIFOS/Spring+FTL+Conversion+Spike&quot;&gt;several experiments&lt;/a&gt; to speed up the process.&lt;/p&gt;&lt;p&gt;I think it&amp;#8217;s important to measure the impact of our improvements. I want to know: are we moving faster? Is product quality flourishing? Can we say so quantitatively? The last bit has been the most elusive. It&amp;#8217;s like measuring how useful a painting is!&lt;/p&gt;&lt;p&gt;Still, here are some measures which we hope will eventually show how much the improvements are or are not helping. Right now we&amp;#8217;re just establishing baseline data.&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://adammonsen.com/wp-content/uploads/2011/01/counts.png&quot;&gt;&lt;img class=&quot;size-thumbnail wp-image-645 alignleft&quot; title=&quot;pre-counts&quot; src=&quot;http://adammonsen.com/wp-content/uploads/2011/01/counts-150x150.png&quot; alt=&quot;&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The red line in the graph represents legacy front-end code that will eventually disappear. The green line is new code, but it really doesn&amp;#8217;t matter.&lt;/p&gt;&lt;p&gt;From the chart data, we can say the following by measuring deltas between points: the most dramatic change in Struts/jsp LOC was 4380, for the time period ending Aug 2010.  The most dramatic change in SpringMVC/ftl LOC was 3665, for the time period ending Sep 2010.&lt;/p&gt;&lt;p&gt;Assumptions:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;these data are not useful for estimating speed of future refactoring work&lt;/li&gt;&lt;li&gt;all acceptance tests pass in refactored areas&lt;/li&gt;&lt;li&gt;look &amp;amp; feel of refactored areas is acceptable&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The 2nd &amp;amp; third bullets are a bit vague. To address this shortfall, we&amp;#8217;ll &lt;a href=&quot;http://mifosforge.jira.com/wiki/display/MIFOS/Spring+FTL+Conversion+Spike#SpringFTLConversionSpike-Measuringtestingeffort&quot;&gt;measure the following aspects of quality&lt;/a&gt;:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Time spent modifying CreateSavingsAccountTest.&lt;/li&gt;&lt;li&gt;Number of issues (regressions) caught during CSS walk through.&lt;/li&gt;&lt;li&gt;Number of layout or functional bugs logged during testing phase (missed during walk through).&lt;/li&gt;&lt;li&gt;Time spent by QA manually testing the feature, including logging issues and retesting bugs fixes.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Finally, developers should know &lt;a href=&quot;http://article.gmane.org/gmane.comp.finance.mifos.devel/10806&quot;&gt;if things are better&lt;/a&gt;. This is the most qualitative and possibly the most important &amp;#8220;measure&amp;#8221;! Certainly, for the migration of our codebase from svn to git, it was the &lt;em&gt;only&lt;/em&gt; measure we used, and it was enough.&lt;/p&gt;&lt;p&gt;Thoughts/comments/feedback are appreciated. I&amp;#8217;d rather have some kind of simpler measure, like &amp;#8220;x increased by 250%&amp;#8221;. Do you know of any more effective (and hopefully simpler) means of measuring development speed?&lt;/p&gt;&lt;p&gt;I used gnuplot to generate the graph. &lt;a href=&quot;https://github.com/meonkeys/mifosStats/tree/master/frontEndRefactorSpeed&quot;&gt;Here&amp;#8217;s the source&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Adam Monsen</name>
			<uri>http://adammonsen.com</uri>
		</author>
		<source>
			<title type="html">Adam Monsen</title>
			<link rel="self" href="http://adammonsen.com/feed"/>
			<id>http://adammonsen.com/feed</id>
			<updated>2012-04-22T21:00:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Knife Reporting: apt + updates</title>
		<link href="http://blog.loftninjas.org/2011/01/12/knife-reporting-apt-updates/"/>
		<id>http://blog.loftninjas.org/?p=639</id>
		<updated>2011-01-13T00:12:00+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://twitter.com/tmonk42&quot;&gt;Nathan&lt;/a&gt; and I were discussing yesterday the lack of a good way to visualize all of the updates waiting to be installed across a server cluster. I wrote a another knife script to do this, and &lt;a href=&quot;http://twitter.com/sfalcon&quot;&gt;Seth Falcon&lt;/a&gt; helped me clean it up.&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
# Knife exec script to search for and describe systems needing updates
# 2011-01-11 - Bryan McLellan &amp;lt;btm@loftninjas.org&amp;gt;

gem &amp;quot;net-ssh&amp;quot;, &amp;quot;&amp;gt;= 2.0.23&amp;quot;
require 'net/ssh/multi'

class AptSsh &amp;lt; Chef::Knife::Ssh
  # Override configure_session so we can specify where to get the query
  def configure_session
    @longest = 0 # Set in Chef::Knife::Ssh.run
    q = Chef::Search::Query.new
    @action_nodes = q.search(:node, ARGV[2])[0]
    fqdns = @action_nodes.map { |item| item.fqdn }
    if fqdns.empty?
      Chef::Log.fatal(&amp;quot;No nodes returned from search!&amp;quot;)
      exit 10
    end
    session_from_list(fqdns)
  end

  def capture_command(command, subsession=nil)
    host_data = Hash.new { |h, k| h[k] = &amp;quot;&amp;quot; }
    subsession ||= session
    command = fixup_sudo(command)
    subsession.open_channel do |ch|
      ch.request_pty
      ch.exec command do |ch, success|
        raise ArgumentError, &amp;quot;Cannot execute #{command}&amp;quot; unless success
        ch.on_data do |ichannel, data|
          host_data[ichannel[:host]] &amp;lt;&amp;lt; data
          if data =~ /^knife sudo password: /
            ichannel.send_data(&amp;quot;#{get_password}\n&amp;quot;)
          end
        end
      end
    end
    session.loop
    return host_data
  end
end

abort(&amp;quot;usage: knife exec apt.knife QUERY&amp;quot;) unless ARGV[2]
ssh = AptSsh.new
ssh.configure_session

# install apt-show-versions if it isn't installed
install_show_versions = &amp;lt;&amp;lt;EOH
if [ ! -e /usr/bin/apt-show-versions ] ; then
  echo INSTALLING APT-SHOW-VERSIONS ; sudo apt-get install apt-show-versions -y
fi
EOH
ssh.ssh_command(install_show_versions)

apt_data = ssh.capture_command('apt-show-versions -u -b')

apt_data.each do |host, data|
  puts &amp;quot;#{host} - #{data.count(&amp;quot;\n&amp;quot;)} updates, #{data.scan(&amp;quot;-security&amp;quot;).length} of which are security updates&amp;quot;
  data.each_line do |line|
    puts &amp;quot;  #{line}&amp;quot;
  end
end

# Prevents knife from trying to execute any command line arguments as addtional script files, see CHEF-1973
exit 0
&lt;/pre&gt;
&lt;p&gt;Given a search query, this provides an output of:&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
$ knife exec apt.knife role:dev
webui-dev.example.org - 6 updates, 6 of which are security updates
  libc-bin/lucid-security
  libc-dev-bin/lucid-security
  libc6/lucid-security
  libc6-dev/lucid-security
  libc6-i686/lucid-security
  libc6-xen/lucid-security
monitoring-dev.example.orgs - 6 updates, 6 of which are security updates
  libc-bin/lucid-security
  libc-dev-bin/lucid-security
  libc6/lucid-security
  libc6-dev/lucid-security
  libc6-i686/lucid-security
  libc6-xen/lucid-security
rabbitmq-dev.example.org - 6 updates, 6 of which are security updates
  libc-bin/lucid-security
  libc-dev-bin/lucid-security
  libc6/lucid-security
  libc6-dev/lucid-security
  libc6-i686/lucid-security
  libc6-xen/lucid-security
couchdb-dev.example.org - 7 updates, 7 of which are security updates
  libc-bin/lucid-security
  libc-dev-bin/lucid-security
  libc6/lucid-security
  libc6-dev/lucid-security
  xulrunner-1.9.2/lucid-security
  xulrunner-1.9.2-dev/lucid-security
  xulrunner-dev/lucid-security
&lt;/pre&gt;
&lt;p&gt;Lets say that you didn&amp;#8217;t want to upgrade the couch box, you could modify the search query to not include that box and run again to confirm. Then reuse that search string to trigger the update.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; title: ; notranslate&quot;&gt;
$ knife exec apt.knife &amp;quot;role:dev NOT hostname:couchdb-dev&amp;quot;
$ knife ssh &amp;quot;role:dev NOT hostname:couchdb-dev&amp;quot; &amp;quot;sudo apt-get upgrade -y&amp;quot;
&lt;/pre&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Reporting using Chef’s Knife</title>
		<link href="http://blog.loftninjas.org/2011/01/06/reporting-using-chefs-knife/"/>
		<id>http://blog.loftninjas.org/?p=609</id>
		<updated>2011-01-07T04:41:24+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href=&quot;http://blog.loftninjas.org/wp-content/uploads/2011/01/Cropped_VM_Table.jpg&quot;&gt;&lt;img class=&quot;alignleft size-medium wp-image-624&quot; title=&quot;Cropped_VM_Table&quot; src=&quot;http://blog.loftninjas.org/wp-content/uploads/2011/01/Cropped_VM_Table-300x111.jpg&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;111&quot; /&gt;&lt;/a&gt;We have a table in our corporate Confluence wiki that looks something like this. It was a product of a few quick notes to allow the team to build out VMs in parallel, distributed across a number of virtual hosts, and not rely on luck for proper resource utilization. The number fields are the amount of gigabytes of RAM allocated to the guests. As long as the total didn&amp;#8217;t exceed a magic number for the entire host, we could keep building and the team remained unblocked. It got the job done, but it is no way to keep track of guests and resources. First, wiki&amp;#8217;s have a tendency to get out of date and rot. It takes a fair amount of work to know what needs to be updated and keep it that way on a daily basis. Also, tables in Confluence are not all that great. They are far from Excel. The total row contains no formula to autosum the column, and you find yourself regularly switching between editor modes depending on how you are entering data, such as by hand or using cut and paste.&lt;/p&gt;
&lt;p&gt;So, what if your &amp;#8220;back of the napkin&amp;#8221; calculations could be sourced from real data? This is usually unrealistic because you don&amp;#8217;t know what data you need until you need it, so it hasn&amp;#8217;t been captured. But we do capture a lot of data about nodes in Chef, so it is sitting there waiting for you to have that bright idea. In this case, I wanted to reconcile the memory usage on the VM hosts. I could ssh to each host, and collect this information from libvirt by hand, and put it in a spreadsheet somewhere or add it up myself for Confluence. But what happens when a teammate builds another server tomorrow? Will they update the documentation? Is that a step we want to keep doing by hand, as we build and destroy VMs on a regular basis? Is it a step we should be doing by hand, these days?&lt;/p&gt;
&lt;pre class=&quot;brush: ruby; title: ; notranslate&quot;&gt;
Chef::Log.level= :fatal
printf &amp;quot;%-10s %-12s %-8s %s\n&amp;quot;, &amp;quot;host&amp;quot;, &amp;quot;guest&amp;quot;, &amp;quot;MB RAM&amp;quot;, &amp;quot;Run List&amp;quot;
search(:node, 'role:virt').each do |host|
  total_mem = 0
  host[:virtualization][:domains].each do |domain,attribs|
    begin
      guest = nodes.show(domain)
    rescue
      guest = search(:node, &amp;quot;hostname:#{domain}&amp;quot;)[0]
    end
    run_list = guest.run_list if guest
    printf &amp;quot;%-10s %-12s %-8s %s\n&amp;quot;, host.name, domain, attribs[:memory] / 1024, run_list
    total_mem += attribs[:memory]
  end
  printf &amp;quot;%-10s %-12s %-8s %s\n&amp;quot;, host.name, &amp;quot;TOTAL&amp;quot;, total_mem / 1024, &amp;quot;&amp;quot;
end
&lt;/pre&gt;
&lt;p&gt;This example is a knife exec script. If you saved this to a file named &lt;code&gt;virt_ram.knife&lt;/code&gt;, then you could run it with &lt;code&gt;knife exec virt_ram.knife&lt;/code&gt;. While Chef has full blown APIs you can interface with, that can raise the cost of a small project higher than its worth. With knife exec, small proof of concept projects done on the side of your desk are approachable with ease.&lt;/p&gt;
&lt;p&gt;Let us take a moment to step through the code.&lt;/p&gt;
&lt;p&gt;1 &amp;#8212; Set the Chef log level to fatal to surpress warnings generated my line 7 when we look a non-existent node.&lt;br /&gt;
2 &amp;#8212; Print out a header describing the columns of data we are going to generate&lt;br /&gt;
3 &amp;#8212; Search chef for all of the nodes with the role &amp;#8220;virt&amp;#8221; and loop through them, naming the node object &amp;#8216;host&amp;#8217;&lt;br /&gt;
5 &amp;#8212; Each virtual host object contains a hash of domains in host[:virtualization][:domains]. Step through these assigning the key to &amp;#8216;domain&amp;#8217; and the value (another hash) to &amp;#8216;attribs&amp;#8217;&lt;br /&gt;
6-10 &amp;#8211;  Look to see if we have a node in Chef whose name matches the domain name in libvirt. If not, rescue and trap that failure and try to search for a node with that hostname. Your node names in chef don&amp;#8217;t have to be your hostnames or fqdns. At Opscode we use short unique identifiers such as EC2 instance IDs, portions of randomly generated GUIDs, and asset tracking numbers.&lt;br /&gt;
11 &amp;#8212; If we did find a matching node, get its run_list. This really explains what a host does at Opscode, as we tend two only have two or three meta roles applied to a node. Usually one represents the environment it is in, such as &amp;#8220;prod&amp;#8221; or &amp;#8220;dev&amp;#8221; and the other is its role like &amp;#8220;webserver&amp;#8221; or &amp;#8220;couchdb&amp;#8221;&lt;br /&gt;
12 &amp;#8212; Print out the information we known about this guest&lt;br /&gt;
13 &amp;#8212; Then add the memory used by that guest to the running total for the host.&lt;br /&gt;
15 &amp;#8212; Finally, print out the total memory we&amp;#8217;ve calculated for that host.&lt;br /&gt;
16 &amp;#8212; Go back around and do it all again for the next host.&lt;/p&gt;
&lt;pre class=&quot;brush: plain; gutter: false; title: ; notranslate&quot;&gt;
$ knife exec virt_ram.knife
host guest        MB RAM   Run List
vm1  rv-735a342e  2048     role[prod], role[web]
vm1  rv-8ef1f3d1  4096     role[prod], role[database]
vm1  rv-eb574386  512      role[prod], role[dns]
vm1  TOTAL        6656
vm2  rv-91ba412e  2048     role[prod], role[web]
vm2  rv-8e342d11  4096     role[prod], role[database]
vm2  rv-e3829f86  512      role[prod], role[dns]
vm2  TOTAL        6656
vm3  cobbler1     1024
vm3  rv-e3829f86  512      role[prod], role[dns]
vm3  TOTAL        1536
&lt;/pre&gt;
&lt;p&gt;This data is made up, but I&amp;#8217;ve shown on vm3 something that I found in my own infrastructure; there were guests left over from testing that weren&amp;#8217;t named properly and never made it into the chef server. I wouldn&amp;#8217;t know they were there if I hadn&amp;#8217;t done an audit of the servers this way. This exemplifies the Chef philosophy that it should help you do what you want, not model what it thinks you should be doing. This isn&amp;#8217;t a carefully engineered reporting feature built around a common practice of virtualization management. This is a script I hacked on with &lt;a href=&quot;http://twitter.com/kallistec&quot;&gt;Dan&lt;/a&gt;&amp;#8217;s endless helpful guidance while I was waiting for an rsync to finish. I know others have written similar scripts to reconcile EC2 instances by comparing Chef and EC2 via Fog.&lt;/p&gt;
&lt;p&gt;I love it. Do you have some spare time? What do you need? Chef will get you there.&lt;/p&gt;</content>
		<author>
			<name>Bryan McLellan</name>
			<uri>http://blog.loftninjas.org</uri>
		</author>
		<source>
			<title type="html">btm.geek</title>
			<link rel="self" href="http://blog.loftninjas.org/feed/"/>
			<id>http://blog.loftninjas.org/feed/</id>
			<updated>2012-04-22T21:00:02+00:00</updated>
		</source>
	</entry>

</feed>

