<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-6426279</atom:id><lastBuildDate>Wed, 10 Mar 2010 21:59:39 +0000</lastBuildDate><title>n8 foo</title><description>nate's blog/journal/mad thought calendar</description><link>http://www.mybrainhurts.com/blog/</link><managingEditor>noreply@blogger.com (Nathan)</managingEditor><generator>Blogger</generator><openSearch:totalResults>163</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-8758659817687135906</guid><pubDate>Fri, 25 Dec 2009 00:54:00 +0000</pubDate><atom:updated>2009-12-24T17:08:50.342-08:00</atom:updated><title>Ruby on Rails dev environment on a remote server</title><description>&lt;div id=":29a" class="ii gt"&gt; &lt;div&gt;A friend asks: &lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;...so I'm trying to install RoR on a remote server of mine, but it seems that RoR development methodology wants you to test your webpages on localhost:3000. But, obviously, since the computer is in the cloud, I can't just well pull up a webpage on the console. Is there an easy way to get development pages to show up on a web browser that's not local?&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;Ruby on Rails was designed by a bunch of guys writing code locally on their Macs so it's easy to see why they assume a local web sever is a solution.  So there are a couple of options.&lt;br /&gt;&lt;br /&gt;1) use mod_passenger w/Apache for all your environments.  This requires quite a bit more work but it's the way you'd want to do it for any larger environment.  Google will teach you all you want about this, but I recommend it only when your environments are mature and you are needing to scale out production.&lt;br /&gt;&lt;br /&gt;2) Tell Apache to pass &lt;a href="http://dev.yourdomain.com/" target="_blank"&gt;dev.yourdomain.com&lt;/a&gt; to localhost port 3000. You'd need to set up a dev hostname in DNS and point it at the server as well.  It would look like this in the apache config:&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#d1d1d1;background:#000000;'&gt;&lt;span style='color:#ff8906; '&gt;&amp;lt;&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;VirtualHost&lt;/span&gt; &lt;span style='color:#00c4c4; '&gt;*:80&lt;/span&gt;&lt;span style='color:#ff8906; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style='color:#e66170; font-weight:bold; '&gt;ServerAdmin&lt;/span&gt;         &lt;span style='color:#a160f4; '&gt;webmaster@domain.com&lt;/span&gt;&lt;br /&gt;       &lt;span style='color:#e66170; font-weight:bold; '&gt;ServerName&lt;/span&gt;          dev.domain.com&lt;br /&gt;       ProxyPreserveHost   On&lt;br /&gt;       &lt;span style='color:#e66170; font-weight:bold; '&gt;ProxyPass&lt;/span&gt;           /      &lt;span style='color:#6070ec; '&gt;http://127.0.0.1:3000/&lt;/span&gt;&lt;br /&gt;       &lt;span style='color:#e66170; font-weight:bold; '&gt;ProxyPassReverse&lt;/span&gt;    /      &lt;span style='color:#6070ec; '&gt;http://127.0.0.1:3000/&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#fb8400; '&gt;&amp;lt;/&lt;/span&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;VirtualHost&lt;/span&gt;&lt;span style='color:#fb8400; '&gt;&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;3) Similar as above, but if you don't want to mess with DNS, you can&lt;br /&gt;proxy based on the URL:&lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#d1d1d1;background:#000000;'&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;ProxyPass&lt;/span&gt; /foo &lt;span style='color:#6070ec; '&gt;http://127.0.0.1:3000&lt;/span&gt;&lt;br /&gt;&lt;span style='color:#e66170; font-weight:bold; '&gt;ProxyPassReverse&lt;/span&gt; /foo &lt;span style='color:#6070ec; '&gt;http://127.0.0.1:3000&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;more on mod_proxy here:  &lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_proxy.html" target="_blank"&gt;http://httpd.apache.org/docs/&lt;wbr&gt;2.0/mod/mod_proxy.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4) Use ssh to tunnel requests from your local machine out to the server (ssh tunnel).  ssh will forward the tcp packets across the pipe towards a host you specify on the other end.  In this case, you'd tell it to send localhost port 3000 (on your laptop) across the pipe and out to localhost port 3000 on the server.  This will only provide access for you (since it's a private tunnel). &lt;br /&gt;&lt;br /&gt;&lt;pre style='color:#d1d1d1;background:#000000;'&gt;&lt;span style='color:#9999a9; '&gt;# ssh -L 3000:127.0.0.1:3000 host.server.com&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then in your browser surf to http://127.0.0.1:3000&lt;br /&gt;&lt;br /&gt;For speed, I'd probably do #4 to test that things are working and go up towards #1 as you get your environment more set up.  #1 is the most amount of work (mod_passenger can be a PITA).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-8758659817687135906?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/12/ruby-on-rails-dev-environment-on-remote.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-2509837354980814017</guid><pubDate>Tue, 22 Dec 2009 09:10:00 +0000</pubDate><atom:updated>2009-12-24T17:32:55.598-08:00</atom:updated><title>wildcard subdomain SSL certs</title><description>A friend asked:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;If I bought a wildcard certificate for *.domain.com, wouldn't that cover&lt;br /&gt;*.sub.domain.com?&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;Hrm...I had to look that one up.  The answer is: no, not accorindg to the RFC.  RFC 2818 states:&lt;br /&gt;&lt;blockquote&gt;  Matching is performed using the matching rules specified by&lt;br /&gt;  [RFC2459].  If more than one identity of a given type is present in&lt;br /&gt;  the certificate (e.g., more than one dNSName name, a match in any one&lt;br /&gt;  of the set is considered acceptable.) Names may contain the wildcard&lt;br /&gt;  character * which is considered to match any single domain name&lt;br /&gt;  component or component fragment. E.g., *.a.com matches foo.a.com but&lt;br /&gt;  not bar.foo.a.com. f*.com matches foo.com but not bar.com.&lt;/blockquote&gt;more here: &lt;a href="http://www.ietf.org/rfc/rfc2818.txt"&gt;http://www.ietf.org/rfc/rfc2818.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are &lt;a href="http://www.hanselman.com/blog/SomeTroubleWithWildcardSSLCertificatesFireFoxAndRFC2818.aspx"&gt;reports&lt;/a&gt; that older versions of Firefox don't complain when encountering an out of spec sub-domain SSL wild-card but IE would.  I would recommending sticking with the RFC spec.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-2509837354980814017?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/12/wildcard-subdomain-ssl-certs.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-7370627907752716152</guid><pubDate>Wed, 25 Nov 2009 04:24:00 +0000</pubDate><atom:updated>2009-11-24T18:14:27.872-08:00</atom:updated><title>System Administration with Capistrano</title><description>In previous years, when I had to run commands on hundreds or thousands of servers, I'd hack together a combo of &lt;a href="http://expect.nist.gov/"&gt;expect&lt;/a&gt; and perl.  It would almost always evolve into a system of complicated config and command files that was rickety and didn't handle errors well.  I didn't dare mess with multi-threaded perl, which meant it was serial execution and slow for large clusters.  It got the job done but left me wishing for a better system.  I have always had &lt;a href="http://www.cfengine.org/"&gt;cfengine&lt;/a&gt; in my sysadmin toolbox, but it's more about entropy reduction and not set up for one-off or occasional situations.   I tried a few parallel shell implementations (such as dsh, pdsh) and found them all &lt;span style="font-style: italic;"&gt;lacking&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Enter &lt;a href="http://www.capify.org/"&gt;Capistrano&lt;/a&gt;.  It bills its self as an 'easy deployment' system, with Ruby on Rails application deployment as the main use case.  And since I'd never worked in a RoR environment before, I had no real reason to look into it much.  But in the last 3 months, I have worked at 2 different companies that use RoR + Capistrano for deployment and have learned enough to see it's true power.  How I'd describe it to a fellow sysadmin is: "&lt;span style="font-weight: bold;"&gt;parallel execution of scripts and commands on multiple hosts...easily&lt;/span&gt;".   Want to quickly execute a command on every host in your cluster?  This is the way to do it.&lt;br /&gt;&lt;br /&gt;Installing it is pretty easy...you need a modern version of Ruby, a modern version of RubyGems and then a '&lt;span style="font-family:courier new;"&gt;gem install capistrano&lt;/span&gt;' later, and you're good to go. You only need to install all of this on the controlling/deployment server....not on all your clusters/nodes.  If you get errors with the version of ruby/gems that comes with your distro, install from source (recommended).  I followed &lt;a href="http://www.capify.org/index.php/Getting_Started"&gt;this tutorial&lt;/a&gt; to get it set up, and to get the basics.  You sould read it as well.  They skip a few necessary things (such as sudo and useful ENV variables) which I have below.&lt;br /&gt;&lt;br /&gt;An example Capfile of how to restart apache on a whole cluster:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;role :apache_cluster,&lt;br /&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"www1"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"www2"&lt;/span&gt;,&lt;br /&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"www3"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;desc &lt;span style="color: rgb(0, 196, 196);"&gt;"restart apache on www hosts"&lt;/span&gt;&lt;br /&gt;task &lt;span style="color: rgb(0, 196, 196);"&gt;"restart_apache_www"&lt;/span&gt;, :roles &lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&gt; :apache_cluster &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;do&lt;/span&gt;&lt;br /&gt;sudo &lt;span style="color: rgb(0, 196, 196);"&gt;"/etc/init.d/apache2 restart"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;'sudo' is a built in method of modern versions of Capistrano.  Instead of the 'run' method, you use 'sudo' and it understand and responds to the prompt (if prompted).  Very slick. One thing to keep in mind is that is is running everything as YOU, unless otherwise specified.  It will look like you logged into 50 servers all at once and ran sudo commands all at once.  I bet that'd look cool on a &lt;a href="http://www.splunk.com/"&gt;Splunk&lt;/a&gt; log graph.&lt;br /&gt;&lt;br /&gt;Now, from the command line, type '&lt;span style="font-family:courier new;"&gt;cap -T'&lt;/span&gt; to get a list of your documented commands.  As long as you describe your commands, you will always get a list of what you can run.  '&lt;span style="font-family:courier new;"&gt;cap -e command&lt;/span&gt;' will explain commands.&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;$ cap &lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;T&lt;br /&gt;cap invoke              &lt;span style="color: rgb(153, 153, 169);"&gt;# Invoke a single command on the remote servers.&lt;/span&gt;&lt;br /&gt;cap restart_apache_www  &lt;span style="color: rgb(153, 153, 169);"&gt;# restart apache on www hosts&lt;/span&gt;&lt;br /&gt;cap shell               &lt;span style="color: rgb(153, 153, 169);"&gt;# Begin an interactive Capistrano session.&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Run the command we set up: '&lt;span style="font-family:courier new;"&gt;cap restart_apache_www&lt;/span&gt;'.  It will prompt for your password.&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;$ cap restart_apache_util&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing `restart_apache_www'&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;sudo -p 'sudo password: ' /etc/init.d/apache2 restart&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;  servers:&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www01.domain.com&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www02.domain.com&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www03.domain.com&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www01&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www03&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www02&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www01&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; Restarting web server apache2&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www01&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;done&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www03&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; Restarting web server apache2&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www03&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;done&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www02&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; Restarting web server apache2&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www02&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;domain&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;com&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;done&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;br /&gt;command finished&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;And that was completed in parallel, in about 1 second.   What if you have a one-off thing you want to run on all hosts?  Try '&lt;span style="font-family:courier new;"&gt;cap invoke&lt;/span&gt;', &lt;span style="font-weight: bold;"&gt;no Capfile required&lt;/span&gt;.  If you have a Capfile with hosts defined, it will run against all of them by default, or it can take a role by passing ROLE as an env variable.&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;$ cap COMMAND&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;uptime HOSTS&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www1,www2&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt; invoke&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing `invoke'&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;uptime&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;    servers:&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www1&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www2&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www1&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;prod&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www2&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;prod&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;16&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;57&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;04&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;30&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.30&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.33&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.33&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;16&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;57&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;04&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;42&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.42&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.32&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.32&lt;/span&gt;&lt;br /&gt;command finished&lt;br /&gt;&lt;/pre&gt;and&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;cap ROLES&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;www COMMAND&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;uptime invoke&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing `invoke'&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;uptime&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;    servers:&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www1&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www2&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www3&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;www3&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; executing command&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;00&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;33&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.54&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.37&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.34&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;00&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;46&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.18&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.27&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.29&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www3&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;00&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;5&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;02&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.17&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.22&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.25&lt;/span&gt;&lt;br /&gt;command finished&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;But every time you 'invoke', you must re-type your password. Want to stay connected?  Try the shell:&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;"&gt;$ cap shell HOSTS&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;www1,www2&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; executing `shell'&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;br /&gt;Welcome to the interactive Capistrano shell&lt;span style="color: rgb(210, 205, 134);"&gt;!&lt;/span&gt; This is an experimental&lt;br /&gt;feature&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; and is liable to change in future releases&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt; Type &lt;span style="color: rgb(0, 196, 196);"&gt;'help'&lt;/span&gt; &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;for&lt;/span&gt;&lt;br /&gt;a summary of how to use the shell&lt;span style="color: rgb(210, 205, 134);"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;&lt;br /&gt;cap&lt;span style="color: rgb(210, 205, 134);"&gt;&gt;&lt;/span&gt; uptime&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;establishing connection&lt;span style="color: rgb(210, 205, 134);"&gt;(&lt;/span&gt;s&lt;span style="color: rgb(210, 205, 134);"&gt;)&lt;/span&gt; to www1&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;Password:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;03&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;24&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;36&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.29&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.32&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.32&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;03&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;24&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;49&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.35&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.30&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.29&lt;/span&gt;&lt;br /&gt;cap&lt;span style="color: rgb(210, 205, 134);"&gt;&gt;&lt;/span&gt; w&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;03&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;37&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;36&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.24&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.31&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.31&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; USER     TTY      FROM              LOGIN&lt;span style="color: rgb(210, 205, 134);"&gt;@&lt;/span&gt;   IDLE   JCPU   PCPU WHAT&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;17&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;03&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;37&lt;/span&gt; up &lt;span style="color: rgb(0, 140, 0);"&gt;190&lt;/span&gt; days&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;4&lt;/span&gt;&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 140, 0);"&gt;49&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  &lt;span style="color: rgb(0, 140, 0);"&gt;0&lt;/span&gt; users&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;  load average&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.30&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.29&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 159, 0);"&gt;0.28&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;out &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; USER     TTY      FROM              LOGIN&lt;span style="color: rgb(210, 205, 134);"&gt;@&lt;/span&gt;   IDLE   JCPU   PCPU WHAT&lt;br /&gt;cap&lt;span style="color: rgb(210, 205, 134);"&gt;&gt;&lt;/span&gt; ls &lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;tmp&lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;blah&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;err &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; ls&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; cannot access &lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;tmp&lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;blah&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;err &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; ls&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; cannot access &lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;tmp&lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;blah&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;err &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www1&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; No such file or directory&lt;br /&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(210, 205, 134);"&gt;*&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt;err &lt;span style="color: rgb(176, 96, 176);"&gt;::&lt;/span&gt; www2&lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt; &lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; No such file or directory&lt;br /&gt;&lt;span style="color: rgb(227, 74, 220);"&gt;error:&lt;/span&gt; failed&lt;span style="color: rgb(176, 96, 176);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;sh -c 'ls /tmp/blah'&lt;/span&gt;&lt;span style="color: rgb(2, 208, 69);"&gt;"&lt;/span&gt; on www1&lt;span style="color: rgb(210, 205, 134);"&gt;,&lt;/span&gt;www2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice that errors show up with a 'err' line.&lt;br /&gt;&lt;br /&gt;While useful and timesaving, this barely scratches the surface of the power of Capistrano. I suggest you read the "&lt;a href="http://www.capify.org/index.php/From_The_Beginning"&gt;From the Beginning&lt;/a&gt;" doc on the Capistrano site.  If you discover any cool recipes, share them in the comments on this blog and I'll publish them as a followup later (as I learn more recipes myself).&lt;br /&gt;&lt;br /&gt;P.S. I think I'm going to add a feature to &lt;a href="http://www.machdb.org/"&gt;MachDB&lt;/a&gt; to export host lists in a format compatible with the Capfiles.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-7370627907752716152?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/11/system-administration-with-capistrano.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-6642741426979167240</guid><pubDate>Mon, 30 Mar 2009 17:33:00 +0000</pubDate><atom:updated>2009-03-31T15:02:12.057-07:00</atom:updated><title>DIY Encrypted Password Vault</title><description>This is something I've needed at various jobs/situations for years...a place to store the root/router/database/web passwords that only I can see.  There are a lot of desktop/handheld apps for this but I always feel like I could lose the computer/handheld that it's on and I'd be boned.  I'd rather have something I can stick on a server somewhere and access via a remote shell....or carry it around on a thumb drive. Here are the scripts:&lt;br /&gt;&lt;br /&gt;encrypt.sh&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;#! /bin/sh &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;openssl bf &lt;span style="color: rgb(0, 221, 221);"&gt;-a&lt;/span&gt; -salt -&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;in&lt;/span&gt; $1&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;txt -out $1&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;bf &lt;span style="color: rgb(176, 96, 176);"&gt;&amp;amp;&amp;amp;&lt;/span&gt; rm &lt;span style="color: rgb(0, 221, 221);"&gt;-v&lt;/span&gt; $1&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;txt&lt;/pre&gt;decrypt.sh&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;#! /bin/sh &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;openssl bf &lt;span style="color: rgb(0, 221, 221);"&gt;-a&lt;/span&gt; &lt;span style="color: rgb(0, 221, 221);"&gt;-d&lt;/span&gt; -salt -&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;in&lt;/span&gt; $1&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;bf&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;To use it, create a file named blah.txt that has your secret info in it.  Run the encrypt script first:&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;$ .&lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;encrypt.sh blah&lt;br /&gt;enter bf&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;cbc encryption password&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt;&lt;br /&gt;Verifying &lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt; enter bf&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;cbc encryption password&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt;&lt;br /&gt;removed `blah.txt'&lt;br /&gt;&lt;/pre&gt;It will encrypt the file and remove it.  Check the contents of the file:&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;$ cat blah.bf&lt;br /&gt;U2FsdGVkX1&lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;+ZGiXPSZX8MED9aXrm1NfIEjpv5vvFKo&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;/pre&gt;It's actually base 64 encoded so you can email it to yourself for safe keeping if you so choose.&lt;br /&gt;&lt;br /&gt;To decrypt for reading:&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;$ .&lt;span style="color: rgb(210, 205, 134);"&gt;/&lt;/span&gt;decrypt.sh blah&lt;br /&gt;enter bf&lt;span style="color: rgb(210, 205, 134);"&gt;-&lt;/span&gt;cbc decryption password&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt;&lt;br /&gt;secret host&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt; secret password&lt;br /&gt;secret host2&lt;span style="color: rgb(210, 205, 134);"&gt;:&lt;/span&gt; secret password2&lt;br /&gt;&lt;/pre&gt;Now take the encrypted output file and the 2 scripts, email it to yourself and store a copy on a thumb drive.  :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-6642741426979167240?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/03/diy-encrypted-password-vault.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-384501042993830085</guid><pubDate>Mon, 23 Mar 2009 16:28:00 +0000</pubDate><atom:updated>2009-03-24T02:07:24.243-07:00</atom:updated><title>Why all phones need a silent ring</title><description>Telemarketers, vendors and people I'd rather not communicate with frequently intrude on my early morning slumber (esp East Coast vendors), meetings, lunches, free time and life in general.  And since they usually call from unrecognized numbers, I feel compelled to answer (could be something important, right?)  A co-worker and I have been using a neat technique to remove these individuals ability to communicate with us...create a new contact called "Do Not Answer" with a custom silent ring tone.  Each time they call from a new number, add them as an additional number to that contact.  And with that silent ring, now they can't interrupt you in meetings, at home, early in the morning, etc.  &lt;br /&gt;&lt;br /&gt;I used iTunes to make a silent ringtone...you can download it here: &lt;a href="http://www.mybrainhurts.com/blog/images/2009/2/silent_ring.m4r"&gt;iPhone Silent Ringone&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-384501042993830085?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/03/or-why-all-phones-need-silent-ring.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-6463409687713590149</guid><pubDate>Fri, 13 Mar 2009 23:14:00 +0000</pubDate><atom:updated>2009-03-16T10:31:31.184-07:00</atom:updated><title>automated nmap scans</title><description>Whipped this up for work, figured I'd share with the world, since it's decently useful.  Stick it in cron nightly, needs to run as root.  It will run a diff on what it sees and email you if there are new ports/hosts that pop up on your networks.  If you find errors or mods, use this: &lt;a href="http://pastebin.com/f635a7517"&gt;http://pastebin.com/f635a7517&lt;/a&gt; to modify it and post in the comments.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: rgb(0, 0, 0) none repeat scroll 0% 0%; color: rgb(209, 209, 209); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;span style="color: rgb(153, 153, 169);"&gt;#! /bin/sh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DIR&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/opt/nmap/scans&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"&lt;/span&gt;&lt;br /&gt;NETWORKS&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"192.168.1.0-255"&lt;/span&gt;&lt;br /&gt;TODAY&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;`date +%Y%m%d`&lt;/span&gt;&lt;br /&gt;YESTERDAY&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;`date &lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(0, 221, 221); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;-d&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt; yesterday +%Y%m%d`&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;for&lt;/span&gt; network &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;in&lt;/span&gt; $NETWORKS&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;do&lt;/span&gt;&lt;br /&gt;      nmap &lt;span style="color: rgb(0, 221, 221);"&gt;-n&lt;/span&gt; -sS $network -oG $DIR&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;$network&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;$TODAY&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;nmap&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;for&lt;/span&gt; network &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;in&lt;/span&gt; $NETWORKS&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;do&lt;/span&gt;&lt;br /&gt;      diff -I &lt;span style="color: rgb(0, 196, 196);"&gt;"^#"&lt;/span&gt; $DIR&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;$network&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;$TODAY&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;nmap $DIR&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;$network&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;$YESTERDAY&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;nmap  &lt;span style="color: rgb(227, 74, 220);"&gt;&gt;&lt;/span&gt; $DIR&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;$network&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;$TODAY&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;diff&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;done&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;for&lt;/span&gt; network &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;in&lt;/span&gt; $NETWORKS&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;do&lt;/span&gt;&lt;br /&gt;      SIZE&lt;span style="color: rgb(210, 205, 134);"&gt;=&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;`find &lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;$DIR&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(64, 1, 90); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;/&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;$network&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(230, 97, 112); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;$TODAY&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(230, 97, 112); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="background: rgb(40, 24, 0) none repeat scroll 0% 0%; color: rgb(255, 255, 255); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;diff -size +0b`&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;[&lt;/span&gt; &lt;span style="color: rgb(0, 196, 196);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;$SIZE&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"&lt;/span&gt; &lt;span style="color: rgb(0, 221, 221);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 196, 196);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;$DIR&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;$network&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;$TODAY&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;.diff"&lt;/span&gt; &lt;span style="color: rgb(210, 205, 134);"&gt;]&lt;/span&gt;&lt;br /&gt;      &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;then&lt;/span&gt;&lt;br /&gt;              cat $DIR&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;$network&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;$TODAY&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;diff &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; mail &lt;span style="color: rgb(0, 221, 221);"&gt;-s&lt;/span&gt; &lt;span style="color: rgb(0, 196, 196);"&gt;"Change Detected for &lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;$network&lt;/span&gt;&lt;span style="color: rgb(0, 196, 196);"&gt;"&lt;/span&gt;  user@host&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;.&lt;/span&gt;com&lt;br /&gt;      &lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(230, 97, 112); font-weight: bold;"&gt;done&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-6463409687713590149?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/03/automated-nmap-scans.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-3316943384454566874</guid><pubDate>Sun, 04 Jan 2009 04:20:00 +0000</pubDate><atom:updated>2009-01-03T20:49:52.424-08:00</atom:updated><title>automated disk partitioning with sfdisk</title><description>I discovered sfdisk a few years ago (part of &lt;a href="http://freshmeat.net/projects/util-linux/"&gt;util-linux&lt;/a&gt;) and have been using it in automation scripts ever since.  sfdisk is like fdisk, but is scriptable.  So for example, to list the partitions on a disk: &lt;pre&gt;[root@host]# sfdisk -l /dev/sdc&lt;br /&gt;&lt;br /&gt;Disk /dev/sdc: 121601 cylinders, 255 heads, 63 sectors/track&lt;br /&gt;Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0&lt;br /&gt;&lt;br /&gt;Device Boot Start     End   #cyls    #blocks   Id  System&lt;br /&gt;/dev/sdc1          0+ 121600  121601- 976760001   83  Linux&lt;br /&gt;/dev/sdc2          0       -       0          0    0  Empty&lt;br /&gt;/dev/sdc3          0       -       0          0    0  Empty&lt;br /&gt;/dev/sdc4          0       -       0          0    0  Empty&lt;br /&gt;&lt;/pre&gt;To list them in a dump format, suitable as input to sfdisk (for cloning, saving or for some wacky awesome script): &lt;pre&gt;[root@host ]# sfdisk -d /dev/sdc&lt;br /&gt;# partition table of /dev/sdc&lt;br /&gt;unit: sectors&lt;br /&gt;&lt;br /&gt;/dev/sdc1 : start=       63, size=1953520002, Id=83&lt;br /&gt;/dev/sdc2 : start=        0, size=        0, Id= 0&lt;br /&gt;/dev/sdc3 : start=        0, size=        0, Id= 0&lt;br /&gt;/dev/sdc4 : start=        0, size=        0, Id= 0&lt;br /&gt;&lt;/pre&gt;You can use that dump in a fashion like this to clone a disks's partition map:&lt;br /&gt;&lt;pre&gt;sfdisk -d /dev/sdc | sfdisk /dev/sdd&lt;br /&gt;&lt;/pre&gt;Or for saving it and using it later:&lt;br /&gt;&lt;pre&gt;sfdisk -d /dev/sdc &gt; partition.sfdisk&lt;br /&gt;sfdisk /dev/sdc &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-3316943384454566874?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2009/01/sfdisk-is-bomb.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-8294144648137770442</guid><pubDate>Thu, 01 Jan 2009 07:44:00 +0000</pubDate><atom:updated>2009-01-01T11:42:14.889-08:00</atom:updated><title>End of 2008</title><description>I have done a few things in the last few months that are worthy of mention.  I haven't had much of a chance to blog about them or write them down, what with them all being back to back and then holidays, being sick, vacation, more holidays, more being sick.  But here are some links to the media I've produced.  Enjoy.&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;a href="http://www.flickr.com/photos/n8foo/sets/72157610357703505" title="2 Moto Baja 2008 by n8foo, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3160/3068700522_9beff40893_m.jpg" alt="2 Adventurers" height="180" width="240" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/n8foo/sets/72157610357703505/"&gt;San Diego CA USA to Cabo San Lucas, Baja California Sur, MX  &lt;/a&gt;(in 6 days, 2200+ miles, on my new BMW adventure motorcycle)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.vimeo.com/2492763"&gt;One month of beard growth in 5 seconds &lt;/a&gt;(an experiment in time lapse)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.vimeo.com/2668014"&gt;Deleting that same beard at high speed&lt;/a&gt; (an experiment with tracy's camera)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=978FHU6MlCA"&gt;The mechanical wonderment behind a bowling alley machine&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-8294144648137770442?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/12/end-of-2008.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-233713705683446138</guid><pubDate>Wed, 05 Nov 2008 22:35:00 +0000</pubDate><atom:updated>2008-11-05T14:50:21.165-08:00</atom:updated><title>ssh tab completion on known_hosts</title><description>It's silly I've waited this may years to go figure this out.  Many of you may already know that modern installs of OpenSSH will tab complete hostnames based on what's in the /etc/hosts file.  But there is a neat little addition to your .bashrc that will tack on the ability to tab complete hostnames based on what's in ~/.ssh/known_hosts.  Add this to your .bashrc:&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;blockquote&gt;SSH_COMPLETE&lt;span style="color: rgb(128, 128, 48);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;(&lt;/span&gt; $&lt;span style="color: rgb(128, 0, 128);"&gt;(&lt;/span&gt;cat ~&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;ssh/known_hosts&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(15, 105, 255);"&gt;\&lt;/span&gt;&lt;br /&gt;cut &lt;span style="color: rgb(68, 170, 221);"&gt;-f&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt; &lt;span style="color: rgb(68, 170, 221);"&gt;-d&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;" "&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(15, 105, 255);"&gt;\&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;sed&lt;/span&gt; &lt;span style="color: rgb(68, 170, 221);"&gt;-e&lt;/span&gt; s&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;,&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/g&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(15, 105, 255);"&gt;\&lt;/span&gt;&lt;br /&gt;uniq &lt;span style="color: rgb(128, 0, 128);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(128, 0, 128);"&gt;)&lt;/span&gt;&lt;br /&gt;complete &lt;span style="color: rgb(68, 170, 221);"&gt;-o&lt;/span&gt; default -W &lt;span style="color: rgb(0, 0, 230);"&gt;"${SSH_COMPLETE[*]}"&lt;/span&gt; ssh&lt;br /&gt;&lt;/blockquote&gt;&lt;/pre&gt;All your new shells will auto complete based on what hosts you've connected to once (and therefore have entries in the known_hosts file).  Any host you've never visited, well it won't be there.  If you want to filter it based on certain hosts (for example, hosts in a certain domain name), just add a&lt;span style="font-family:courier new;"&gt; | &lt;/span&gt;&lt;span style=";font-family:courier new;font-size:100%;"  &gt;grep domain.com&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;after the &lt;span style="font-family:courier new;"&gt;uniq&lt;/span&gt;.  If you're like me, this will save a lot of keystrokes over the next few years.&lt;br /&gt;&lt;br /&gt;Tip:  If you cut and paste my text above and it gives errors, make sure your cut-n-paste didn't change the quotes.  If you want to see what it's going to use (or troubleshoot/modify), you can run this on the command line:&lt;br /&gt;&lt;pre style="color: rgb(0, 0, 0); -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;blockquote&gt;cat ~&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;ssh/known_hosts&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(15, 105, 255);"&gt;\&lt;/span&gt;&lt;br /&gt;cut &lt;span style="color: rgb(68, 170, 221);"&gt;-f&lt;/span&gt; &lt;span style="color: rgb(0, 140, 0);"&gt;1&lt;/span&gt; &lt;span style="color: rgb(68, 170, 221);"&gt;-d&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;" "&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(15, 105, 255);"&gt;\&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(187, 121, 119); font-weight: bold;"&gt;sed&lt;/span&gt; &lt;span style="color: rgb(68, 170, 221);"&gt;-e&lt;/span&gt; s&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;,&lt;span style="color: rgb(128, 0, 0); font-weight: bold;"&gt;.&lt;/span&gt;&lt;span style="color: rgb(128, 128, 48);"&gt;*&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(64, 1, 90);"&gt;/g&lt;/span&gt; &lt;span style="color: rgb(227, 74, 220);"&gt;|&lt;/span&gt; &lt;span style="color: rgb(15, 105, 255);"&gt;\&lt;/span&gt;&lt;br /&gt;uniq &lt;/blockquote&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-233713705683446138?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/11/ssh-tab-completion-on-knownhosts.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-8406288274109647281</guid><pubDate>Sun, 28 Sep 2008 03:26:00 +0000</pubDate><atom:updated>2008-09-28T01:27:41.030-07:00</atom:updated><title>New Midpipe</title><description>&lt;div style="float: right; margin-left: 10px; margin-bottom: 10px;"&gt;&lt;a href="http://www.flickr.com/photos/n8foo/2893359759/" title="photo sharing"&gt;&lt;img src="http://farm4.static.flickr.com/3285/2893359759_c99d774276_m.jpg" alt="" style="border: 2px solid rgb(0, 0, 0);" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="margin-top: 0px;font-size:0;" &gt;&lt;a href="http://www.flickr.com/photos/n8foo/2893359759/"&gt;Out for a hyperspin&lt;/a&gt;&lt;br /&gt;Originally uploaded by &lt;a href="http://www.flickr.com/people/n8foo/"&gt;n8foo&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;Installed a new &lt;a href="http://www.leovinceusa.com/"&gt;LeoVince&lt;/a&gt; midpipe on the Hypermotard earlier in the week (2am in the garage with a rubber hammer the night before an early meeting).  Finally got a moment away from the keyboard to take it out for a spin tonight.  Total awesomeness.  It starts better, sounds better and runs better.  I think it's a bit faster too.  How awesome is that for the effort and price?  I should have done this a long time ago.&lt;br /&gt;&lt;br /&gt;Pics:  &lt;a href="http://flickr.com/photos/n8foo/2889081603"&gt;Old and Busted&lt;/a&gt;.  &lt;a href="http://flickr.com/photos/n8foo/2889915452"&gt;New Hotness&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I had also adjusted the bars a bit to be a tad higher, but I didn't like it.  The turn signals are pointed at the ground 5 feet in front of me, which means my effective road use brightness went from 'are those lasers?' to 'dead lightning bug'.  I may pick a position half way between this position and neutral.  Will have to test it again later in the week when I've got some more time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-8406288274109647281?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/09/new-midpipe.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-4601801340804596013</guid><pubDate>Wed, 13 Aug 2008 06:32:00 +0000</pubDate><atom:updated>2008-08-13T00:53:04.067-07:00</atom:updated><title>HD Video Test</title><description>Finally got myself a video camera.  Been looking at them critically for about 8 years now...ever since my Hi8 cam broke in 2000. I loved making movies back then, and even lately have been doing various time-lapse type videos...not really 'movies' since they were shot with a SLR.  A few years ago I got interested in video again with the advent of consumer level HD cameras.  Canon came out with the HF10 and HF100, soda-can sized cameras that record 1080p HD to SDHC flash cards...no moving parts, great for strapping to cars/motorcycles, etc.  When the price finally fell to a range I could deal with, I pulled the trigger.  It's so cool...and little!  This is my first test. Video quality is great!  I hope to be posting more mischief and fun events in the coming months.&lt;br /&gt;&lt;br /&gt;Is Vimeo the best place to host HD video?  Anyone?  Bueller?   Anyway, enjoy some test shots from the backyard...&lt;br /&gt;&lt;br /&gt;&lt;a style="left: 0px ! important; top: 15px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-03375297713342391 visible ontop" href="http://www.vimeo.com/moogaloop.swf?clip_id=1514388&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1"&gt;&lt;/a&gt;&lt;a style="left: 0px ! important; top: 15px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-03375297713342391 visible ontop" href="http://www.vimeo.com/moogaloop.swf?clip_id=1514388&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1"&gt;&lt;/a&gt;&lt;a style="left: 0px ! important; top: 15px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab-03375297713342391 visible ontop" href="http://www.vimeo.com/moogaloop.swf?clip_id=1514388&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1"&gt;&lt;/a&gt;&lt;object height="360" width="640"&gt;    &lt;param name="allowfullscreen" value="true"&gt;    &lt;param name="allowscriptaccess" value="always"&gt;    &lt;param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=1514388&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1"&gt;    &lt;embed src="http://www.vimeo.com/moogaloop.swf?clip_id=1514388&amp;amp;server=www.vimeo.com&amp;amp;show_title=0&amp;amp;show_byline=0&amp;amp;show_portrait=0&amp;amp;color=ffffff&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" height="360" width="640"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;a href="http://www.vimeo.com/1514388?pg=embed&amp;amp;sec=1514388"&gt;HD Test - Backyard Oddities&lt;/a&gt; from &lt;a href="http://www.vimeo.com/user310962?pg=embed&amp;amp;sec=1514388"&gt;nathan hubbard&lt;/a&gt; on &lt;a href="http://vimeo.com/?pg=embed&amp;amp;sec=1514388"&gt;Vimeo&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-4601801340804596013?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/08/hd-video-test.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-7737241745870007057</guid><pubDate>Tue, 05 Aug 2008 06:08:00 +0000</pubDate><atom:updated>2008-08-04T23:38:10.830-07:00</atom:updated><title>changing your server over to GMT</title><description>&lt;blockquote&gt;&lt;/blockquote&gt;Funny how it's kind of hard to find documentation on this fairly simple task.  The host I'm working with is CentOS 5, a variant of Redhat Enterprise 5.   I use the following commands:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: courier new;"&gt;cat /usr/share/zoneinfo/GMT &gt; /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;localtime&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;That is actually what sets the time.  It's a binary file and is what our system tools and libraries look at.&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;blockquote&gt;vi /etc/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;sysconfig&lt;/span&gt;/clock&lt;/blockquote&gt;&lt;/span&gt;Edit the ZONE to be GMT.  Mine looks like this:&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: courier new;"&gt;ZONE="GMT"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;UTC&lt;/span&gt;=true&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ARC=false&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Verify it looks right with these commands.&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family: courier new;"&gt;date ; date -u ; /&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;sbin&lt;/span&gt;/&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;hwclock&lt;/span&gt; --show&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;Reboot, done!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-7737241745870007057?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/08/changing-your-server-over-to-gmt.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-3928701184154783725</guid><pubDate>Mon, 02 Jun 2008 04:51:00 +0000</pubDate><atom:updated>2008-06-04T03:28:32.770-07:00</atom:updated><title>Statistics, Charts and R</title><description>For a few weeks now, I've been playing around with the statistical computing package "R" to draw some graphs/plots of data.  Why would I want to do this?  Let me quote one of my favorite movies, &lt;span style="font-weight: bold;"&gt;Sneakers&lt;/span&gt;:  &lt;blockquote style="font-style: italic;"&gt;The world isn't run by weapons anymore, or energy, or money. It's run by little ones and zeroes, little bits of data. It's all just electrons.  ...&lt;snip&gt;... There's a war out there, old friend. A world war. And it's not about who's got the most bullets. It's about who controls the information. What we see and hear, how we work, what we think... it's all about the information!&lt;/snip&gt;&lt;/blockquote&gt;Well, you get the point.  We all know that information is king and analyzing and visualizing that information is becoming more and more important.  Presenting data in a way that is easy to digest is key to getting your audience to understanding that data.   So let me make an introduction...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.r-project.org/"&gt;R&lt;/a&gt; is an open source environment for statistical computing.  It can do some pretty neat breakdowns of your data and has a lot of built in functions for doing so. One of it's great strengths is generating production quality graphics and charts.  This is what I needed it for and what I'll be explaining here in a moment. I learned R by watching a &lt;a href="http://www.decisionsciencenews.com/?p=261"&gt;video introduction to R&lt;/a&gt; created by Decision Science News.  There were 2 actually.  But not very long and it got me to a base level.  I then installed R on my Mac, it was cake. Go to the &lt;a href="http://www.r-project.org/"&gt;R site&lt;/a&gt;, download the DMG, run the R executable and you're ready to go.  That got me up and running so I could start playing around on my own and using other examples from the web.  YMMV on other platforms.&lt;br /&gt;&lt;br /&gt;Now for the example.  Let's set the stage.  Say you have some data in a table, for example, a race my girlfriend competed in, the &lt;a href="http://kathyloperevents.com/results/2006_Super10.HTML"&gt;2006 San Diego 10K race&lt;/a&gt;.  I copied, pasted that data into a file, scrubbed it down, did some math with perl to get me the # of seconds, and ended up with a &lt;a href="http://www.mybrainhurts.com/blog/images/2008/5/race.csv"&gt;CSV file&lt;/a&gt;.   Download the file, save it locally, read that file in with R:&lt;br /&gt;&lt;pre&gt;race&lt;-read.csv("race.csv")&lt;/pre&gt;You are reading that CSV file in as a table into a variable called 'race'.  Because that CSV has a header as the first line, it automatically assigns variables based on those column names.  To reference those columns, use 'race$CITY', to check out the 'CITY' column.  So to check out what you've just done, type "&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;race&lt;/span&gt;&lt;/span&gt;" on the console.  Typing the variable name will spit it all back out.  To see a breakdown of what that variable contains, type:&lt;br /&gt;&lt;pre&gt;summary(race)&lt;/pre&gt;To see stats on the racers ages, type in:&lt;br /&gt;&lt;pre&gt; summary(race$AGE)&lt;/pre&gt;Which spits out:&lt;br /&gt;&lt;pre&gt;   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.&lt;br /&gt;10.00   28.00   35.00   37.06   44.00   81.00 &lt;/pre&gt;Minimum age of a runner was 10, oldest was 81.  Average age was 37.06 years old.  Doing this for &lt;tt&gt;race$SEX&lt;/tt&gt; shows us there were 411 women and 474 men.  Neat!  Now for the visuals:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/n8foo/2550921166/" title="Age vs Time by n8foo, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3121/2550921166_a98bc2247d.jpg" alt="Age vs Time" height="338" hspace="10" vspace="10" width="500" /&gt;&lt;/a&gt;&lt;br /&gt;Below is a script I used to generate the graph above.  You can see how I am plotting the dots, and drawing both lines:&lt;br /&gt;&lt;pre   style="border-style: solid; border-width: 1px; padding: 0.5cm;font-family:Courier New;font-size:10pt;"&gt;race&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;-&lt;/span&gt;read.&lt;span style="color: rgb(0, 0, 0);"&gt;csv&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"race.csv"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#Main Plot.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;plot&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$SECONDS&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;60&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$AGE&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;col&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"#5fae27"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;main&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;xlab&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"Minutes"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;ylab&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"Age"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;cex&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0.5&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;type&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"p"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# Set the Title&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;title&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;main&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"Age vs Time"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;# Draw the Red Line&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;lines&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;stats&lt;span style="color: rgb(0, 0, 0);"&gt;::&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;lowess&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$SECONDS&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;60&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$AGE&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;f&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0.1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;),&lt;/span&gt;&lt;br /&gt;col&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"red"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;lwd&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;2&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;#Draw the Blue Line&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;lines&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;stats&lt;span style="color: rgb(0, 0, 0);"&gt;::&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;lowess&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$SECONDS&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;/&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;60&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$AGE&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;f&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;0.3&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;),&lt;/span&gt;&lt;br /&gt;col&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"blue"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;&lt;br /&gt;lwd&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;3&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Not too hard, not too much code...pretty easy in fact!  One of the great things about R is the built in help.  Any of those functions, just type:&lt;br /&gt;&lt;pre&gt;?function&lt;/pre&gt; ..and you'll have immediate help.  I encourage you to do that for the example above, to better understand it.  It will describe far better than I can how each one of those functions works.&lt;br /&gt;&lt;br /&gt;Let's generate another one, a histogram.  That's real easy, you can just type this:&lt;br /&gt;&lt;pre style="border-style: solid; border-width: 1px; padding: 0.5cm; font-size: 10pt; font-family: Courier New;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;hist&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(&lt;/span&gt;race&lt;span style="color: rgb(0, 255, 0);"&gt;$AGE&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;col&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"RED"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;xlab&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"Age"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;breaks&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;100&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;,&lt;/span&gt;main&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"Histogram of Racers Age"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;/pre&gt;To generate this:&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/n8foo/2546957291/" title="2006 San Diego Super Run 10K by n8foo, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3068/2546957291_458ba078ae_o.jpg" alt="2006 San Diego Super Run 10K" height="227" width="482" /&gt;&lt;/a&gt;&lt;br /&gt;So, what did I learn from the creation of this plot?  My initial suspicion was that younger people would do better in the race...the data shows that is's almost average across the board.  The average age is in the late 30's, but the histogram shows the biggest group was mid-late 20's.  Hardly anyone in their early 20's even entered the race...too busy drinking?  Also, there is a neat little cluster at the bottom left of the plot that shows a group of young kids in their teens that did well.&lt;br /&gt;&lt;br /&gt;I have been making more of these, mostly around sysadmin type stuff.  I'll post those as I get more time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-3928701184154783725?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/06/statstics-charts-and-r.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-6423097630593037776</guid><pubDate>Wed, 16 Apr 2008 02:37:00 +0000</pubDate><atom:updated>2008-04-15T19:46:40.107-07:00</atom:updated><title>I got Joe Jobbed!</title><description>In case you've never heard of this, getting '&lt;a href="http://en.wikipedia.org/wiki/Joe_job"&gt;Joe Jobbed&lt;/a&gt;' is when a spammer uses your e-mail address as the 'From:' in their spam and you get all the billion bounces.  It rendered my Blackberry useless all afternoon, and I thought I'd finally be screwed on this one.  Alas, SpamAssassin 3.2.0 and above (I'm running 3.2.4) comes with rules to block this.  Unknown to me, most of the bounces were already going to my spam folder, but any that didn't have the spam body were getting to me.  I followed the instructions on this page:  &lt;a href="http://wiki.apache.org/spamassassin/VBounceRuleset"&gt;http://wiki.apache.org/spamassassin/VBounceRuleset&lt;/a&gt;  to make sure it was all set up and wouldn't classify bounces from my own server as bad. Then I set up the following procmail rule to put bounces in their own folder that I can review and run stats on:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;:0:&lt;br /&gt;* ^X-Spam-Status:.*ANY_BOUNCE_MESSAGE.*&lt;br /&gt;bounces&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Done!&lt;br /&gt;&lt;br /&gt;More good reading on this:  &lt;a href="http://www.sitepoint.com/print/sabotage-coping-joe-job"&gt;http://www.sitepoint.com/print/sabotage-coping-joe-job&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-6423097630593037776?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/04/i-got-joe-jobbed.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-8869971207264937178</guid><pubDate>Wed, 27 Feb 2008 03:34:00 +0000</pubDate><atom:updated>2008-02-27T13:37:34.690-08:00</atom:updated><title>UNIX paste, sed and nl commands</title><description>3 highly useful commands you will find as part of your standard UNIX toolbox. I'll give an example situation for relevance:&lt;br /&gt;&lt;br /&gt;I quite often find myself needing to merge 2 files together for some reason or another. My latest awesomeness consists of ripping/encoding favorite seasons of DVD's I own so my MediaCenter can have an easily accessed library (that I can also stream to my iPod Touch). When the encoding is done, I get files based on the name of the DVD Media and the track number. Like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Blah Season 1 Disc 1-1.mp4&lt;br /&gt;Blah Season 1 Disc 1-2.mp4&lt;br /&gt;Blah Season 1 Disc 1-3.mp4&lt;br /&gt;Blah Season 1 Disc 1-4.mp4&lt;br /&gt;Blah Season 1 Disc 2-1.mp4&lt;br /&gt;Blah Season 1 Disc 2-2.mp4&lt;br /&gt;Blah Season 1 Disc 2-3.mp4&lt;br /&gt;Blah Season 1 Disc 2-4.mp4&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I can go to a place like Wikipedia or Amazon and find a list of the track names, that should look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Pilot&lt;br /&gt;The Fat Man&lt;br /&gt;Little John&lt;br /&gt;Howard&lt;br /&gt;The Reconing&lt;br /&gt;Half Way&lt;br /&gt;Blah&lt;br /&gt;Blah Pt 2&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What I want to end up with is files named something like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Blah - S01E01 - Pilot.mp4&lt;br /&gt;Blah - S01E02 - The Fat Man.mp4&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;It'd be so much easier to rename these on the command line if I could at least partly automate it. Re-typing is a PITA. So, here is how I do it to save a lot of time...&lt;br /&gt;&lt;br /&gt;If I assume that they were ripped in order, I can get a listing of the order of the episode files based on the time stamps (ls) and add a " to the front and end of the line (sed commands):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# ls -tr *.mp4 | sed 's/^/"/g' | sed 's/$/"/g' &gt; tracklist.txt&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Next I go to Amazon, Wikipedia, whatever. Find a list of episodes that is represented with tables (which cut-n-pastes as individual lines with tabs as the delimiter) and paste it into a vi edit session:&lt;br /&gt;&lt;br /&gt;# vi episodes.txt&lt;br /&gt;In general, edit this file down to a point that the only thing that exists are the track names, one per line. Let's pretend the first column contained the name of the track, 2nd column the Writer, etc. We only care about the first column, so you can execute this command in vi:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;:%s/\t.*//g&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;You can do other various cleanup like removing the " character:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;:%s/"//g&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Clean up other stuff like invalid shell characters, extra spaces, etc. This is the least automated part, but a hell of a lot faster/easier than re-typing. Especially if you are a vi whiz. If you use some other text editor, I'm sure this can be accomplished in a similar fashion.&lt;br /&gt;&lt;br /&gt;Now we have 1 file that is the list of mp4 files, in order, and another that is the episode names, in order. What we now need is to make a file with what we actually want the files to be named. I accomplish this with the following command-line awesomeness:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;nl -n rz -w 2 -s " - " episodes.txt \&lt;br /&gt;| sed "s/^/\"Blah - S01E/g" \&lt;br /&gt;| sed "s/$/.mp4\"/g" \&lt;br /&gt;&gt; newnames.txt&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To break that down, this is what is happening:&lt;br /&gt;&lt;br /&gt;The nl command adds numbered lines...the -n means "right justified, padded zeros" and the -w means "padded with 2 characters" and the -s means "separate the columns with what's in the quotes".&lt;br /&gt;The 2 sed commands add a " to the beginning and end of the lines.&lt;br /&gt;The &gt; sends the output to a file.&lt;br /&gt;&lt;br /&gt;Output looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;"Blah - S01E01 - Pilot.mp4"&lt;br /&gt;"Blah - S01E02 - The Fat Man.mp4"&lt;br /&gt;"Blah - S01E03 - Little John.mp4"&lt;br /&gt;"Blah - S01E04 - Howard.mp4"&lt;br /&gt;"Blah - S01E05 - The Reconing.mp4"&lt;br /&gt;"Blah - S01E06 - Half Way.mp4"&lt;br /&gt;"Blah - S01E07 - Blah.mp4"&lt;br /&gt;"Blah - S01E08 - Blah Pt 2.mp4"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we merge the 2 files and prepend the 'mv' command to get a script we can run:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;paste tracklist.txt newname.txt | sed 's/^/mv /g' &gt; script.sh&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Which looks like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;mv "Blah Season 1 Disc 1-1.mp4" "Blah - S01E01 - Pilot.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 1-2.mp4" "Blah - S01E02 - The Fat Man.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 1-3.mp4" "Blah - S01E03 - Little John.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 1-4.mp4" "Blah - S01E04 - Howard.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 2-1.mp4" "Blah - S01E05 - The Reconing.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 2-2.mp4" "Blah - S01E06 - Half Way.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 2-3.mp4" "Blah - S01E07 - Blah.mp4"&lt;br /&gt;mv "Blah Season 1 Disc 2-4.mp4" "Blah - S01E08 - Blah Pt 2.mp4"&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Check the script for sanity, then run it!&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;bash -x script.sh&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;w00t!&lt;br /&gt;&lt;br /&gt;If you want the shell script I use to automate this somewhat:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;#! /bin/sh&lt;br /&gt;&lt;br /&gt;ls -tr *.mp4 | sed 's/^/"/g' | sed 's/$/"/g' &gt; tracklist.txt&lt;br /&gt;nl -n rz -w 2 -s " - " episodes.txt \&lt;br /&gt;| sed "s/^/\"$1 - $2E/g" \&lt;br /&gt;| sed "s/$/.mp4\"/g" \&lt;br /&gt;&gt; newnames.txt&lt;br /&gt;paste tracklist.txt newnames.txt | sed 's/^/mv /g' &gt; script.sh&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The arguments are the name of the series and the season, like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;bash ./rename.sh Blah S01&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;P.S. If you're trying to guess the show by the track names, I made them up. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-8869971207264937178?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/02/unix-paste-sed-and-nl-commands.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-1345616677720954752</guid><pubDate>Tue, 26 Feb 2008 03:29:00 +0000</pubDate><atom:updated>2008-02-26T19:02:55.963-08:00</atom:updated><title>My Synergy Setup</title><description>&lt;a href=http://synergy2.sourceforge.net/&gt;Synergy&lt;/a&gt; rules.  I've been talking about it for a few weeks now, expounding on it's virtues over other options like x2vnc.  A friend asked that I document my setup...here ya go Eddy:  :)&lt;br /&gt;&lt;br /&gt;My current install of synergy runs on on my Mac Pro, my linux box (centos5) and my MacBook Pro laptop.  The Mac Pro is the controlling keyboard and reaches across both of the other computers.  The monitor layout is the Mac Pro in front (2 monitors), the Linux box directly to the left and the laptop below the linux box.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/n8foo/2293128638/" title="My Home Workstation by n8foo, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2222/2293128638_a550c41b8a_m.jpg" width="240" height="180" alt="My Home Workstation" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After I downloaded synergy, I placed the 2 binaries (synergys,synergyc) in /usr/local/bin on my Mac.  If the dir doesen't exist, create it.  I also created /usr/local/etc for the config files.&lt;br /&gt;&lt;br /&gt;Config on the Mac Pro:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;n8pro:bin nathan$ cd /usr/local/bin&lt;br /&gt;n8pro:bin nathan$ ls&lt;br /&gt;jhead  jpegtran synergyc synergys xv&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The config file on the Mac Pro:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;n8pro:~ nathan$ cd /usr/local/etc/&lt;br /&gt;n8pro:etc nathan$ cat synergy.conf&lt;br /&gt;  section: screens&lt;br /&gt;     n8pro.local:&lt;br /&gt;     n8bookpro.local:&lt;br /&gt;     homelinux:&lt;br /&gt;  end&lt;br /&gt;  section: links&lt;br /&gt;     n8pro.local:&lt;br /&gt;         left = homelinux&lt;br /&gt;     homelinux:&lt;br /&gt;         right = n8pro.local&lt;br /&gt;         down = n8bookpro.local&lt;br /&gt;n8bookpro.local:&lt;br /&gt;   up = homelinux&lt;br /&gt;  end&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Commands I run on the Mac Pro (server):&lt;br /&gt;&lt;pre&gt;# synergys -f -c /usr/local/etc/synergy.conf&lt;/pre&gt;&lt;br /&gt;Commands I run on the Linux Box (client):&lt;br /&gt;&lt;pre&gt;# synergyc -f n8pro&lt;/pre&gt;&lt;br /&gt;Commands I run on the MacBook Pro (client):&lt;br /&gt;&lt;pre&gt;# synergyc -f n8pro&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Extra credit:&lt;br /&gt;&lt;br /&gt;I also use this at work.  A Linux box is the control.  Synergyc will re-try connections every 30 sec or so, which means I can launch synergyc clients and let them fail when I'm not on the network.  This means I can run it once and connect/disconnect from work/home networks and have seamless mouse sharing with very little work required.  To set this up on the Linux box, i had a config similar to the one above for the Mac Pro.  On the laptop I have one script that I run that fires off both synergyc clients at the same time.  They stay running until a reboot.  After reboot, I run it again and I'm set.  This is the script:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cat /usr/local/bin/setup_synergy.sh&lt;br /&gt;#! /bin/bash&lt;br /&gt;killall synergyc&lt;br /&gt;sleep 2&lt;br /&gt;synergyc -f n8pro &amp;amp;&lt;br /&gt;synergyc -f n8linuxbox &amp;amp;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-1345616677720954752?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2008/02/my-synergy-setup.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-6158562888887067380</guid><pubDate>Thu, 20 Dec 2007 11:16:00 +0000</pubDate><atom:updated>2008-03-03T11:06:29.260-08:00</atom:updated><title>Restoring lost screen sockets</title><description>Do your screen sockets get nuked and you can't connect to your screen sessions?  If something auto-cleans the /tmp dir, you may have seen this before.  If you're like me, you end up with 10 or so shells with various programs running that you then have to follow the process tree to kill off.  This is my only real (huge) frustration with screen.  Well, here's ya go:  &lt;br /&gt;&lt;br /&gt;&lt;tt&gt;ps -x | grep SCREEN | awk '{print $1}' | xargs kill -CHLD&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-6158562888887067380?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/12/restoring-lost-screen-sockets.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-4057954090439070600</guid><pubDate>Wed, 05 Dec 2007 22:37:00 +0000</pubDate><atom:updated>2007-12-05T14:38:32.427-08:00</atom:updated><title>Christmas tree decorating at high speed</title><description>&lt;a style="left: 0px ! important; top: 18px ! important;" title="Click here to block this object with Adblock Plus" class="abp-objtab visible" href="http://www.vimeo.com/moogaloop.swf?clip_id=418612&amp;amp;server=www.vimeo.com&amp;amp;fullscreen=1&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=01AAEA"&gt;&lt;/a&gt;&lt;object type="application/x-shockwave-flash" data="http://www.vimeo.com/moogaloop.swf?clip_id=418612&amp;amp;server=www.vimeo.com&amp;amp;fullscreen=1&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=01AAEA" height="266" width="400"&gt; &lt;param name="quality" value="best"&gt; &lt;param name="allowfullscreen" value="true"&gt; &lt;param name="scale" value="showAll"&gt; &lt;param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=418612&amp;amp;server=www.vimeo.com&amp;amp;fullscreen=1&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=01AAEA"&gt;&lt;/object&gt;&lt;br /&gt;&lt;a href="http://www.vimeo.com/418612/l:embed_418612"&gt;Christmas Tree 2007&lt;/a&gt; from &lt;a href="http://www.vimeo.com/user310962/l:embed_418612"&gt;nathan hubbard&lt;/a&gt; on &lt;a href="http://vimeo.com/l:embed_418612"&gt;Vimeo&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you watch closely, you can see some sillyness at the beginning.  Hehe.  Good stuff!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-4057954090439070600?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/12/christmas-tree-decorating-at-high-speed.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-8096340478728149899</guid><pubDate>Mon, 12 Nov 2007 07:15:00 +0000</pubDate><atom:updated>2007-11-11T23:20:17.053-08:00</atom:updated><title>Peyton Lost, boooooo hoooooo</title><description>&lt;img src="http://www.mybrainhurts.com/blog/images/2007/10/peyton_waah.jpg"&gt;&lt;br /&gt;&lt;br /&gt;I don't even like football, but I did tonight.  &gt;:-)  &lt;br /&gt;&lt;br /&gt;Go Chargers!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-8096340478728149899?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/11/peyton-lost-boooooo-hoooooo.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-1799186007648848817</guid><pubDate>Thu, 08 Nov 2007 19:48:00 +0000</pubDate><atom:updated>2007-11-08T11:50:05.208-08:00</atom:updated><title>Spiders on Drugs</title><description>I guess everyone has seen this but me:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://youtube.com/watch?v=sHzdsFiBbFc"&gt;http://youtube.com/watch?v=sHzdsFiBbFc&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;In the 1960s, Dr. Peter Witt gave drugs to spiders and observed their effects on web building. This short film about the results of the experiment was created by First Church Of Christ, Filmmaker.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-1799186007648848817?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/11/spiders-on-drugs.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-2680494649109513229</guid><pubDate>Tue, 24 Jul 2007 09:52:00 +0000</pubDate><atom:updated>2007-07-24T02:59:12.014-07:00</atom:updated><title>looking at your boot sector</title><description>Yes yes, I know, sometimes you just get curious about your boot sector.  Your Sysadmin says you'll go to hell if you play with it, and god knows what would happen if you tried to modify it.  But sometimes, when you've been screwing with Lilo and Grub and you can't really remember which one is installed, it's nice to have a peek:&lt;br /&gt;&lt;br /&gt;&lt;tt&gt;dd if=/dev/hda of=mbr.img bs=512 count=1 &lt;br /&gt;xxd -g 4 mbr.img&lt;/tt&gt;&lt;br /&gt;&lt;br /&gt;Where /dev/hda is the drive you want to look at. &lt;br /&gt;&lt;br /&gt;Output should look something like this:&lt;br /&gt;&lt;tt&gt;&lt;br /&gt;-snip-&lt;br /&gt;0000150: 31fffcf3 a51f61ff 26427cbe 7f7de840  1.....a.&amp;B|..}.@&lt;br /&gt;0000160: 00eb0ebe 847de838 00eb06be 8e7de830  .....}.8.....}.0&lt;br /&gt;0000170: 00be937d e82a00eb fe475255 42200047  ...}.*...GRUB .G&lt;br /&gt;0000180: 656f6d00 48617264 20446973 6b005265  eom.Hard Disk.Re&lt;br /&gt;0000190: 61640020 4572726f 7200bb01 00b40ecd  ad. Error.......&lt;br /&gt;00001a0: 10ac3c00 75f4c300 00000000 00000000  ..&lt;.u...........&lt;br /&gt;-snip-&lt;br /&gt;&lt;/tt&gt;&lt;br /&gt;Oh no, I've displayed all my most intimate parts for everybody to see.  Oh well...hey, there's Grub.  Cool.  :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-2680494649109513229?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/07/looking-at-your-boot-sector.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-4662829629468996175</guid><pubDate>Wed, 11 Jul 2007 05:55:00 +0000</pubDate><atom:updated>2007-07-10T23:09:23.511-07:00</atom:updated><title>1:1 NAT on your Linux/Netfilter Firewall</title><description>So you want to map a public IP to a private IP behind your Linux (netfilter) based firewall.  Here is the syntax:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;## Standard Stuff ##&lt;br /&gt;echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;iptables --table nat -A POSTROUTING -o eth0 -j SNAT --to $NAT_IP&lt;br /&gt;&lt;br /&gt;## The 1:1 NAT stuff ##&lt;br /&gt;iptables -t nat -A PREROUTING -d $EXTERNAL_IP  \&lt;br /&gt;        -j DNAT --to-destination $INTERNAL_IP&lt;br /&gt;iptables -t nat -A POSTROUTING -s $INTERNAL_IP \&lt;br /&gt;        -j SNAT --to-source $EXTERNAL_IP&lt;br /&gt;iptables -t nat -A POSTROUTING -s $INTERNAL_NET -d $INTERNAL_IP \&lt;br /&gt;        -j SNAT --to-source $NAT_IP&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Where $NAT_IP is the external IP of your firewall.  The last rule is required if you want hosts on your internal net to be able to talk to that external IP as well.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-4662829629468996175?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/07/11-nat-on-your-linuxnetfilter-firewall.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-3038571413072882829</guid><pubDate>Thu, 14 Jun 2007 10:00:00 +0000</pubDate><atom:updated>2007-06-14T03:03:08.200-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>machdb</category><title>MachDB</title><description>After a successful night of coding, I decided to start blogging my development of the MachDB. &lt;br /&gt;&lt;br /&gt;Yay!  First post!  I'll describe it more later.&lt;br /&gt;&lt;br /&gt;(also checking out the cool labels that blogger has now)&lt;br /&gt;&lt;br /&gt;And going to bed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-3038571413072882829?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/06/machdb.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-9169755956264967046</guid><pubDate>Sun, 27 May 2007 08:08:00 +0000</pubDate><atom:updated>2007-05-27T04:39:30.956-07:00</atom:updated><title>Great song: Two Sisters by Fiction Plane</title><description>&lt;img src="http://www.mybrainhurts.com/blog/images/2007/4/00022842-427250.jpg" align="right" hspace="10" vspace="10" /&gt;Watching Jay Leno this week, I heard a band I wasn't familiar with, &lt;a href="http://en.wikipedia.org/wiki/Fiction_Plane"&gt;Fiction Plane&lt;/a&gt;.   3 talented guys sang a great song called "Two Sisters".  One of the best rock/pop songs I've heard in a long time. And going back to look up the name, I discovered that the &lt;a href="http://www.nbc.com/The_Tonight_Show_with_Jay_Leno/calendar/05212007.shtml"&gt;NBC Jay Leno web site&lt;/a&gt; has a free 160kbps MP3 for download....right above a link to buy it.  :)  Get it right &lt;a href="http://www.nbc.com/The_Tonight_Show_with_Jay_Leno/music/mp3/Fiction_Plane_Two_Sisters.mp3"&gt;here&lt;/a&gt;, before somebody realizes the (what has to be) mistake and takes it down.&lt;br /&gt;&lt;br /&gt;I'm always impressed with bands that can create great music with only a few bodies.  Trivia note: If you &lt;a href="http://images.google.com/images?svnum=10&amp;um=1&amp;amp;hl=en&amp;safe=off&amp;amp;client=firefox-a&amp;rls=org.mozilla%3Aen-US%3Aunofficial&amp;amp;amp;amp;amp;q=fiction+plane&amp;amp;btnG=Search+Images"&gt;look them up&lt;/a&gt;, you may think the lead singer, Joe Sumner, looks familiar.  Sting is his dad.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-9169755956264967046?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/05/great-song-two-sisters-by-fiction-plane.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-6426279.post-2383399730584869414</guid><pubDate>Sat, 26 May 2007 09:21:00 +0000</pubDate><atom:updated>2007-05-26T05:43:15.382-07:00</atom:updated><title>1080p Sky Timelapse</title><description>I got a new toy recently.  A &lt;a href="http://www.amazon.com/Canon-TC80N3-Remote-Control-Cameras/dp/B00009XVA3/ref=pd_bbs_sr_1/103-0730095-7686221?ie=UTF8&amp;s=electronics&amp;amp;qid=1180171431&amp;sr=8-1"&gt;Canon TC-80N3&lt;/a&gt;...a programmable remote timer for my DSLR.   I've always been a huge fan of Time Lapse video, especially the clouds moving and flowers blooming. I made one of my own, recorded at full image size and scaled *down* to 1080p for your viewing pleasure.  File is 28MB:  &lt;a href="http://www.mybrainhurts.com/blog/images/2007/4/sky_timelapse_20070509_1080p.mp4"&gt;Mira Mesa Night Sky Timelapse 2007-05-09&lt;/a&gt;.  Right-click &amp;amp; save, then play. Flash preview below:&lt;br /&gt;&lt;br /&gt;&lt;embed src="/flash/mediaplayer.swf" width="720" height="404" allowfullscreen="true" flashvars="&amp;displayheight=404&amp;file=http://www.mybrainhurts.com/blog/images/2007/4/sky_timelapse_20070509_1080p.mp4.ff.flv&amp;height=404&amp;image=http://www.mybrainhurts.com/blog/images/2007/4/night_timelapse_20070509.png&amp;width=720" /&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;Other than seeing the stars move at 450 times normal speed, the neatest part is the planes flying around at the bottom.  They almost look like UFO's. You can see the fog roll in later in the shots as the camera gets a layer of dew on the lens.  The exposure was 10sec each, taken every 30 seconds and playback is at 15fps.&lt;br /&gt;&lt;br /&gt;I'll be making more of these and posting them to my blog as I have time.  Tell me what you think.&lt;br /&gt;&lt;br /&gt;Other timelapse posts:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mybrainhurts.com/blog/2006/04/blogercize-my-time-lapse.html"&gt;Blogerize My Time Lapse&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.mybrainhurts.com/blog/2006/04/6-hours-of-friday.html"&gt;6 hours of Friday&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.mybrainhurts.com/blog/2006/04/more-timelapses.html"&gt;More Timelapses&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.mybrainhurts.com/blog/2006/11/pumpkins.html"&gt;Pumpkins&lt;/a&gt;&lt;br /&gt;&lt;a href="http://s3.vmix.com/maint.html"&gt;Flight of the Servers/VMIX Down Page&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6426279-2383399730584869414?l=www.mybrainhurts.com%2Fblog' alt='' /&gt;&lt;/div&gt;</description><link>http://www.mybrainhurts.com/blog/2007/05/1080p-sky-timelapse.html</link><author>noreply@blogger.com (Nathan)</author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></item></channel></rss>