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

  <title><![CDATA[hmmm....]]></title>
  <link href="http://michael.thegrebs.com/atom.xml" rel="self"/>
  <link href="http://michael.thegrebs.com/"/>
  <updated>2012-05-10T07:56:25-04:00</updated>
  <id>http://michael.thegrebs.com/</id>
  <author>
    <name><![CDATA[mikegrb]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Migrating Post Tags from Wordpress to Octopress]]></title>
    <link href="http://michael.thegrebs.com/2012/05/08/migrate-tags-wordpress-to/"/>
    <updated>2012-05-08T20:50:05-04:00</updated>
    <id>http://michael.thegrebs.com/2012/05/08/migrate-tags-wordpress-to</id>
    <content type="html"><![CDATA[<p>I&#8217;ve migrated from Wordpress to Octopress and used the Jekyll <a href="https://github.com/mojombo/jekyll/wiki/Blog-Migrations">wordpress migrator</a> to move my posts over.  Unfortunately, this doesn&#8217;t preserve post tags.  The output looks like this:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="nn">---</span>
</span><span class='line'><span class="l-Scalar-Plain">layout</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">post</span>
</span><span class='line'><span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Devops w/ Perl @ Linode PPW Talk Slides</span>
</span><span class='line'><span class="l-Scalar-Plain">wordpress_id</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">330</span>
</span><span class='line'><span class="l-Scalar-Plain">wordpress_url</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">http://michael.thegrebs.com/?p=330</span>
</span><span class='line'><span class="l-Scalar-Plain">date</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">2011-10-27 14:46:31 -04:00</span>
</span><span class='line'><span class="nn">---</span>
</span><span class='line'><span class="l-Scalar-Plain">Earlier this month I gave a talk about...</span>
</span></code></pre></td></tr></table></div></figure>


<p>Having the wordpress post id means extracting the post tags from the db should be quite easy.  First we define our desired output:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="nn">---</span>
</span><span class='line'><span class="l-Scalar-Plain">layout</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">post</span>
</span><span class='line'><span class="l-Scalar-Plain">title</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">Devops w/ Perl @ Linode PPW Talk Slides</span>
</span><span class='line'><span class="l-Scalar-Plain">wordpress_id</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">330</span>
</span><span class='line'><span class="l-Scalar-Plain">wordpress_url</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">http://michael.thegrebs.com/?p=330</span>
</span><span class='line'><span class="l-Scalar-Plain">date</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">2011-10-27 14:46:31 -04:00</span>
</span><span class='line'><span class="l-Scalar-Plain">tags</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">geek perl slides</span>
</span><span class='line'><span class="nn">---</span>
</span><span class='line'><span class="l-Scalar-Plain">Earlier this month I gave a talk about ...</span>
</span></code></pre></td></tr></table></div></figure>


<p>The tags field really can appear anywhere in this YAML fragment but I chose to throw it at the end.  With 103 posts to loop over, run a query and insert a new line a short script makes sense.  The real win for our script though is using the <a href="https://metacpan.org/module/Tie::File">Tie::File</a> module which presents each file as an array with an element for each line.</p>

<p>From there it&#8217;s simply a matter of reverse engineering the Wordpress schema to come up with a query that will return a space delimited list of tags for a given post id.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='sql'><span class='line'><span class="k">SELECT</span> <span class="n">GROUP_CONCAT</span><span class="p">(</span><span class="n">t</span><span class="p">.</span><span class="o">`</span><span class="n">name</span><span class="o">`</span> <span class="n">SEPARATOR</span> <span class="ss">&quot; &quot;</span><span class="p">)</span> <span class="k">FROM</span> <span class="o">`</span><span class="n">wp_term_relationships</span><span class="o">`</span> <span class="n">r</span>
</span><span class='line'><span class="k">INNER</span> <span class="k">JOIN</span> <span class="o">`</span><span class="n">wp_term_taxonomy</span><span class="o">`</span> <span class="n">tax</span> <span class="k">ON</span> <span class="n">r</span><span class="p">.</span><span class="o">`</span><span class="n">term_taxonomy_id</span><span class="o">`</span> <span class="o">=</span> <span class="n">tax</span><span class="p">.</span><span class="o">`</span><span class="n">term_taxonomy_id</span><span class="o">`</span>
</span><span class='line'><span class="k">INNER</span> <span class="k">JOIN</span> <span class="o">`</span><span class="n">wp_terms</span><span class="o">`</span> <span class="n">t</span> <span class="k">ON</span> <span class="n">tax</span><span class="p">.</span><span class="o">`</span><span class="n">term_id</span><span class="o">`</span> <span class="o">=</span> <span class="n">t</span><span class="p">.</span><span class="o">`</span><span class="n">term_id</span><span class="o">`</span>
</span><span class='line'><span class="k">WHERE</span> <span class="n">r</span><span class="p">.</span><span class="o">`</span><span class="n">object_id</span><span class="o">`</span> <span class="o">=</span> <span class="o">?</span>
</span><span class='line'><span class="k">AND</span> <span class="n">tax</span><span class="p">.</span><span class="o">`</span><span class="n">taxonomy</span><span class="o">`</span> <span class="o">=</span> <span class="ss">&quot;post_tag&quot;</span><span class="p">;</span>
</span></code></pre></td></tr></table></div></figure>


<p>Throw that query in a script that iterates over the list of files and uses <a href="https://metacpan.org/module/Tie::File">Tie::File</a> to add a line to the post and we get:</p>

<figure class='code'><figcaption><span> (word2octo-tags.pl)</span> <a href='http://michael.thegrebs.com/downloads/code/2012/word2octo-tags.pl'>download</a></figcaption>
 <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
<span class='line-number'>27</span>
<span class='line-number'>28</span>
<span class='line-number'>29</span>
<span class='line-number'>30</span>
<span class='line-number'>31</span>
<span class='line-number'>32</span>
<span class='line-number'>33</span>
<span class='line-number'>34</span>
<span class='line-number'>35</span>
<span class='line-number'>36</span>
<span class='line-number'>37</span>
<span class='line-number'>38</span>
<span class='line-number'>39</span>
<span class='line-number'>40</span>
<span class='line-number'>41</span>
<span class='line-number'>42</span>
<span class='line-number'>43</span>
<span class='line-number'>44</span>
<span class='line-number'>45</span>
<span class='line-number'>46</span>
<span class='line-number'>47</span>
<span class='line-number'>48</span>
<span class='line-number'>49</span>
</pre></td><td class='code'><pre><code class='perl'><span class='line'><span class="c1">#!/usr/bin/perl </span>
</span><span class='line'>
</span><span class='line'><span class="k">use</span> <span class="mf">5.010</span><span class="p">;</span>
</span><span class='line'><span class="k">use</span> <span class="n">strict</span><span class="p">;</span>
</span><span class='line'><span class="k">use</span> <span class="n">warnings</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">use</span> <span class="n">DBI</span><span class="p">;</span>
</span><span class='line'><span class="k">use</span> <span class="nn">Tie::</span><span class="n">File</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">my</span> <span class="nv">$path_to_posts</span> <span class="o">=</span> <span class="s">&#39;source/_posts&#39;</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">my</span> <span class="nv">$dbh</span> <span class="o">=</span> <span class="n">DBI</span><span class="o">-&gt;</span><span class="nb">connect</span><span class="p">(</span><span class="s">&#39;DBI:mysql:db_name:db_host&#39;</span><span class="p">,</span><span class="s">&#39;db_user&#39;</span><span class="p">,</span><span class="s">&#39;db_pass&#39;</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'><span class="k">my</span> <span class="nv">$get_tags</span> <span class="o">=</span> <span class="nv">$dbh</span><span class="o">-&gt;</span><span class="n">prepare</span><span class="p">(</span><span class="sx">q{</span>
</span><span class='line'><span class="sx">    SELECT GROUP_CONCAT(t.`name` SEPARATOR &quot; &quot;) FROM `wp_term_relationships` r</span>
</span><span class='line'><span class="sx">    INNER JOIN `wp_term_taxonomy` tax ON r.`term_taxonomy_id` = tax.`term_taxonomy_id`</span>
</span><span class='line'><span class="sx">    INNER JOIN `wp_terms` t ON tax.`term_id` = t.`term_id`</span>
</span><span class='line'><span class="sx">    WHERE r.`object_id` = ?</span>
</span><span class='line'><span class="sx">    AND tax.`taxonomy` = &quot;post_tag&quot;;</span>
</span><span class='line'><span class="sx">    }</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'>
</span><span class='line'><span class="k">for</span> <span class="k">my</span> <span class="nv">$file</span> <span class="p">(</span><span class="nb">glob</span> <span class="s">&quot;$path_to_posts/*.markdown&quot;</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">say</span> <span class="nv">$file</span><span class="p">;</span>
</span><span class='line'>    <span class="n">add_tags_to_file</span><span class="p">(</span><span class="nv">$file</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="k">sub </span><span class="nf">add_tags_to_file</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$filename</span> <span class="o">=</span> <span class="nb">shift</span><span class="p">;</span>
</span><span class='line'>    <span class="nb">tie</span> <span class="k">my</span> <span class="nv">@file</span><span class="p">,</span> <span class="s">&#39;Tie::File&#39;</span><span class="p">,</span> <span class="nv">$filename</span> <span class="ow">or</span> <span class="nb">die</span> <span class="s">&quot;No tie: $!&quot;</span><span class="p">;</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$tags</span><span class="p">;</span>
</span><span class='line'>    <span class="k">while</span> <span class="p">(</span><span class="k">my</span> <span class="p">(</span><span class="nv">$rec</span><span class="p">,</span> <span class="nv">$data</span><span class="p">)</span> <span class="o">=</span> <span class="nb">each</span> <span class="nv">@file</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>        <span class="k">if</span> <span class="p">(</span><span class="nv">$data</span> <span class="o">=~</span> <span class="sr">m/^wordpress_id: (\d+)$/</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>            <span class="nv">$tags</span> <span class="o">=</span> <span class="n">get_tag</span><span class="p">(</span><span class="nv">$1</span><span class="p">);</span>
</span><span class='line'>        <span class="p">}</span>
</span><span class='line'>        <span class="k">if</span><span class="p">(</span> <span class="nv">$data</span> <span class="o">=~</span><span class="sr"> /^date:/</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>            <span class="nb">splice</span> <span class="nv">@file</span><span class="p">,</span> <span class="nv">$rec</span> <span class="o">+</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nv">$tags</span> <span class="k">if</span> <span class="nv">$tags</span><span class="p">;</span>
</span><span class='line'>            <span class="k">return</span><span class="p">;</span>
</span><span class='line'>        <span class="p">}</span>
</span><span class='line'>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="k">sub </span><span class="nf">get_tag</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$post</span> <span class="o">=</span> <span class="nb">shift</span><span class="p">;</span>
</span><span class='line'>    <span class="nv">$get_tags</span><span class="o">-&gt;</span><span class="n">execute</span><span class="p">(</span><span class="nv">$post</span><span class="p">);</span>
</span><span class='line'>    <span class="k">my</span> <span class="p">(</span><span class="nv">$tags</span><span class="p">)</span> <span class="o">=</span> <span class="nv">$get_tags</span><span class="o">-&gt;</span><span class="n">fetchrow_array</span><span class="p">();</span>
</span><span class='line'>    <span class="k">return</span> <span class="s">&quot;tags: &quot;</span> <span class="o">.</span> <span class="nv">$tags</span> <span class="k">if</span> <span class="nv">$tags</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Devops w/ Perl @ Linode PPW Talk Slides]]></title>
    <link href="http://michael.thegrebs.com/2011/10/27/devops-w-perl-linode-ppw-talk-slides/"/>
    <updated>2011-10-27T14:46:31-04:00</updated>
    <id>http://michael.thegrebs.com/2011/10/27/devops-w-perl-linode-ppw-talk-slides</id>
    <content type="html"><![CDATA[<p>Earlier this month I gave a talk about <a href="http://www.linode.com">Linode&#8217;s</a> use of <a href="http://www.perl.org/">Perl</a> for <a href="http://en.wikipedia.org/wiki/DevOps">devopsy</a> things at the<a href="http://pghpw.org/ppw2011/"> Pittsburgh Perl Workshop</a>.  Finally getting around to posting the slides online.  I wanted to add some details so more of the slides made since on their own but haven&#8217;t gotten around to it yet.</p>

<p><a href='http://michael.thegrebs.com/assets/2011/Linode-DevOps-w-Perl.pdf'>DevOps w/ Perl @ Linode.pdf</a> (2.1MB)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Local Growl Notifications from Remote Irssi]]></title>
    <link href="http://michael.thegrebs.com/2011/06/12/local-growl-notifications-from-remote-irssi/"/>
    <updated>2011-06-12T00:50:05-04:00</updated>
    <id>http://michael.thegrebs.com/2011/06/12/local-growl-notifications-from-remote-irssi</id>
    <content type="html"><![CDATA[<p><strong>What I&#8217;ve tried, What I want</strong></p>

<p>Skip to the next section if you just care about the end result.  In the past, I&#8217;ve had my remote <a href="http://irssi.org/">Irssi</a> client send UDP <a href="http://growl.info/">Growl</a> packets to my static home IP that were then forwarded to the broadcast address on the local network.  This worked great and allowed me to get Growl notifications on which ever computer I happened to be sitting at.  These days, I&#8217;m always on my laptop, even when sitting at another computer (<a href="http://www.abyssoft.com/software/teleport/">Teleport</a> for the mega win).</p>

<p>I wanted a solution that would allow me to receive Growl notifications without having to forward any ports and no matter what the public IP for my laptop may be.  I use <a href="http://beta.metacpan.org/module/App::PersistentSSH">App::PersistentSSH</a> to maintain a persistent SSH control master connection to my <a href="http://www.linode.com/">Linode</a> so the ideal solution uses a reverse tunnel over this connection to get the notifications too my laptop.</p>

<p><strong>My Current Solution</strong></p>

<ul>
<li>Added <code>--ssh_opts -R 127.0.0.1:22992:127.0.0.1:22</code> to my <a href="http://beta.metacpan.org/module/App::PersistentSSH">App::PersistentSSH</a> command line.  This connects localhost:22992 on my Linode to port 22 on my laptop.</li>
<li><a href="https://github.com/mikegrb/irssi-scripts/blob/master/local-growl.pl">local-growl.pl</a> &#8211; an Irssi script that uses growlnotify to send growl notifications</li>
<li><a href="https://github.com/mikegrb/irssi-scripts/blob/master/growlnotify.pl">growlnotify.pl</a> &#8211; an ssh proxy for growlnotify, passes it&#8217;s arguments to growlnotify on a remote system via ssh</li>
</ul>


<p>Simple push growl notifications from my <a href="http://www.linode.com">Linode</a> -> my MacBook Air whenever it is online.  The scripts and an irssi.png to use in the notifications are available on <a href="https://github.com/mikegrb/irssi-scripts">GitHub</a>.</p>

<p>Configuration for local-growl.pl is via Irssi&#8217;s in built settings, type <code>/set growl</code> to see a list of possibilites:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>[local-growl]
</span><span class='line'>growl_enabled = ON
</span><span class='line'>growl_growlnotifypath = /home/michael/bin/growlnotify
</span><span class='line'>growl_image_path = /Users/mgreb/Documents/irssi.png
</span><span class='line'>growl_show_hilights = ON
</span><span class='line'>growl_show_private_messages = ON
</span><span class='line'>growl_sticky = OFF</span></code></pre></td></tr></table></div></figure>


<p>Configuration for growlnotify.pl is via a set of config variables near the top:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='perl'><span class='line'><span class="k">my</span> <span class="nv">$ssh_host</span>    <span class="o">=</span> <span class="s">&#39;localhost&#39;</span><span class="p">;</span>
</span><span class='line'><span class="k">my</span> <span class="nv">$ssh_port</span>    <span class="o">=</span> <span class="mi">22992</span><span class="p">;</span>
</span><span class='line'><span class="k">my</span> <span class="nv">$ssh_user</span>    <span class="o">=</span> <span class="s">&#39;mgreb&#39;</span><span class="p">;</span>
</span><span class='line'><span class="k">my</span> <span class="nv">$growlnotify</span> <span class="o">=</span> <span class="s">&#39;/usr/local/bin/growlnotify&#39;</span><span class="p">;</span>
</span></code></pre></td></tr></table></div></figure>


<p>Hopefully you will find this useful.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Whole House Energy Monitoring]]></title>
    <link href="http://michael.thegrebs.com/2011/02/27/whole-house-energy-monitoring/"/>
    <updated>2011-02-27T19:18:20-05:00</updated>
    <id>http://michael.thegrebs.com/2011/02/27/whole-house-energy-monitoring</id>
    <content type="html"><![CDATA[<p>I placed an order for a <a href="http://www.theenergydetective.com/ted-5000/features">TED 5000</a> on February
10th. The <em>TED 5000</em> is a whole house energy monitor &#8211; a kill-a-watt for the whole house.  I&#8217;ve spent a lot
of time reading about the products available in this space.  I&#8217;ve looked at about 10 products for whole house
energy monitoring and three jump to the top.  The <a href="http://www.wattvision.com/">wattvision</a>, <a
href="http://www.powerhousedynamics.com/content/solutions">PowerHouse Dynamics&#8217;s eMonitor</a>, and the <a
href="http://www.theenergydetective.com/ted-5000/features">TED 5000</a>.</p>

<p><a href="http://michael.thegrebs.com/assets/2011/wattvision-analog-sensor-beta.jpg"><img
class="alignright" title="wattvision-analog-sensor-beta"
src="http://michael.thegrebs.com/assets/2011/wattvision-analog-sensor-beta-300x168.jpg" alt=""
width="300" height="168" /></a></p>

<!-- more -->


<p>The <a href="http://www.wattvision.com/">wattvision</a> (~$250) most closely
resembles the TED in terms of price and features.  The wattvision uses an optical sensor that counts the rotation
of the disk in the utility meter.  This sensor is connected to the device, which is powered by an AC adapter and
sends the data to wattvision&#8217;s servers via your home wifi network.  This is the easiest to install, but would
require running the sensor cable from the outside to inside. Additionally, all data is sent to wattvision&#8217;s
servers.  I&#8217;d also need to subscribe to wattvision&#8217;s <a href="http://www.wattvision.com/info/pricing">$8.99/month
service</a> for the other features I want (like API access.)</p>

<p><img class="alignright" title="powerhouse dynamics eMonitor" src="http://michael.thegrebs.com/assets/2011/Picture29-300x276.png" alt="" width="300" height="276" /></p>

<p>The <a href="http://www.powerhousedynamics.com/content/solutions">eMonitor</a> (starting around $688 for 12 circuits) is something I just recently discovered.  Really, this is my ideal solution: for <a href="http://www.smarthome.com/90428/PowerHouse-Dynamics-eMonitor-44-Intelligent-Residential-Power-Usage-Monitor/p.aspx">$1,277</a>, you get the necessary equipment for monitoring the power feed plus 44 individual breakers.  This gives a much better view of where your power consumption is going.  Per-circuit monitoring also enables nifty alerts &#8211; an SMS for power draw in the kids room after school starts on a week day, or if the compressor on the fridge is running longer than normal (time to clean the coils, etc.) I just can&#8217;t justify the expense at $1,277.  The price is certainly reasonable for what you are getting, but there is no way the wife would approve the purchase :/</p>

<p><img class="alignright size-full wp-image-285" title="ted-5000-g" src="http://michael.thegrebs.com/assets/2011/ted-5000-g.png" alt="" width="265" height="265" /></p>

<p><a href="http://www.theenergydetective.com/ted-5000/features">The Energy Detective</a> (TED, ~$200) from Energy Inc provides full house consumption monitoring like the wattvision.  Unlike the wattvision, the data is stored and served from a gateway device on your home network.  Two current transformers go around the two lines for the incoming split phase feed.  These are connected to a box, which is installed next-to-or-inside the breaker panel. The breaker panel is powered and communicates via a connection to a breaker on each phase.  The gateway is installed elsewhere in the house and plugs into an outlet for power and communication with the current sensor, and via Ethernet to serve its precious data up.</p>

<p>So, February 10th I finally got approval from the wife to order the TED and purchased the <a href="http://www.theenergydetective.com/ted5000-g">TED 5000-G</a> with overnight shipping. It arrived as expected on the 11th and I was eager to install it.  A coworker (also interested in the TED,) came over for dinner and to help out with the installation.  I was too excited to wait for his arrival and finished the install before he got there ;-).</p>

<p>It&#8217;s now February 27th and I still don&#8217;t have a working TED system.  The gateway I was originally shipped has a defective Ethernet port. It&#8217;s already been to Energy Inc and back and is <span style="text-decoration: underline;">still</span> defective.  They finally agreed to ship me a replacement gateway on the 25th but sent it with 2nd day shipping, which has the same transit time as ground (just more expensive.) The new unit should arrive March 1st.</p>

<p><a href="http://michael.thegrebs.com/assets/2011/TED5000-display.png"><img src="http://michael.thegrebs.com/assets/2011/TED5000-display-e1298852839843-133x150.png" alt="" title="Optional TED Display" width="133" height="150" class="size-thumbnail wp-image-318" /></a></p>

<p>I&#8217;m quite eager to get things up and running, and anticipate no problems once I have a working gateway. The most common issue people run into is excessive noise or attenuation of the <a href="http://en.wikipedia.org/wiki/Power_line_communication">power line communications</a> (PLC) signal between the sensor and gateway. The forums seem to be full of people with lots of grief around this issue. The gateway does contain a <a href="http://en.wikipedia.org/wiki/Zigbee">ZigBee</a> transceiver but that is for communication with the <a href="http://www.theenergydetective.com/additonal-ted-5000-display">optional wireless display</a>. Some have questioned switching from PLC to <a href="http://en.wikipedia.org/wiki/Zigbee">ZigBee</a> for the current data but a device inside the metal breaker box would have a hard time getting any sort of RF signal out, and PLC seems the most logical solution (even with it&#8217;s inherent issues.)  Of course, this is easy for me to say since I don&#8217;t anticipate having any issue with PLC. I can see a clear ~3-4Vpk signal on the zero crossing of the A/C at the outlet I plan to install the gateway:</p>

<p><img src="http://michael.thegrebs.com/assets/2011/plc_w_ac.png" alt="AC with TED MCU transmissions" width="320" height="234" /></p>

<p>I have another blog post in the works documenting my seemingly unending issues with the other half of the TED solution: the support staff and engineers backing the product. To be fair, the support staff is 1:2 &#8211; the second guy I spoke to there was great, but I&#8217;m pretty sure their engineers shouldn&#8217;t be allowed to know customers even exist, let alone talk to them on the phone. But, this is a story for my next blog post.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Bacon Salad & Zinik Owes Me]]></title>
    <link href="http://michael.thegrebs.com/2010/10/29/bacon-salad-zinik-owes-me/"/>
    <updated>2010-10-29T14:04:12-04:00</updated>
    <id>http://michael.thegrebs.com/2010/10/29/bacon-salad-zinik-owes-me</id>
    <content type="html"><![CDATA[<p>First off, Zinik owes me bacon flavored donuts, the Internet says it, it must be true.</p>

<p>I composed my first recipe the other night and figured I&#8217;d share it with you in the hopes that your doctor might hate me as much as mine does.</p>

<h2>Bacon Salad</h2>

<h3>Ingredients</h3>

<ul>
<li>1lb Pancetta</li>
<li>1lb Virginia Bacon</li>
<li>1lb Peppered Bacon</li>
<li>1lb Canadian Bacon</li>
<li>1lb Apple-Wood Smoked Bacon</li>
<li>1lb Irish Bacon</li>
<li>1lb Slab Bacon</li>
<li>2lb Hog Jowl</li>
<li>1   Bottle reduced fat Bacon Ranch Salad Dressing</li>
</ul>


<h3>Directions</h3>

<ol>
<li>Fry each, crispy.</li>
<li>Cut into 1x2 inch rectangles.</li>
<li>Toss in bowl with salad dressing.</li>
</ol>


<p>Makes 2, snack sized, servings.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Task Management with Hiveminder and Perl]]></title>
    <link href="http://michael.thegrebs.com/2010/03/13/task-management-with-hiveminder-and-perl/"/>
    <updated>2010-03-13T18:08:25-05:00</updated>
    <id>http://michael.thegrebs.com/2010/03/13/task-management-with-hiveminder-and-perl</id>
    <content type="html"><![CDATA[<p>This is how I manage my tasks with <a href="http://hiveminder.com/">Hiveminder</a> on a weekly basis and the Perl script that helps me do it.  I don&#8217;t really expect the Perl script to be useful to anyone as-is but portions of it may be useful to others, as well as the general work flow, so I&#8217;ve decided to share them.</p>




<p>At <a href="http://www.linode.com/">Linode</a> we have a wiki page where we list 5 or more tasks we wish to accomplish during the week.  There is a heading for each employee and below the heading we place our tasks.   Throughout the week we can add additional tasks or mark existing ones as done.</p>




<p>I&#8217;ve used <a href="http://hiveminder.com/">Hiveminder</a> for some time.  When we started the weekly task lists at <a href="http://www.linode.com/">Linode</a> I found that taking a few minutes to figure out which tasks I wish to complete in the coming week works quite well for me.  I started marking these tasks with the &#8216;week&#8217; tag in <a href="http://hiveminder.com/">Hiveminder</a>.  I quickly ended up writing a perl script, <a href="http://thegrebs.com/~michael/tasks/week.txt">week.pl</a>, to help me manage hem.</p>




<!-- more -->




<h3>My Weekly Workflow</h3>




<p>First thing Monday morning I run:</p>


<pre><code>$ week.pl report
</code></pre>

<p>This prints a report with two sections.  The first section lists tasks that currently have the &#8216;week&#8217; tag with a line through the task ID if it is completed.  This gives me a nice summary of what I planned on accomplishing the previous week and how I did.  The second section lists all of my tasks currently visible in <a href="http://hiveminder.com/">Hiveminder</a>.  I hide tasks that I know I&#8217;m not going to work on in the next few weeks so this list is usually no more than 20 or 30 items.</p>


<p><img src="http://thegrebs.com/~michael/tasks/report.png" height="260" width="334" alt="Sample report Image"/></p>

<p>I take this report into the Monday morning meeting with me.  During the meeting, I&#8217;ll glance over this list and select items for the upcoming week.  I also use this page to take notes on during the meeting, writing down any new tasks that come up in the meeting.</p>




<p>After the meeting, I add any new tasks generated in the meeting that I won&#8217;t be working on this week to <a href="http://hiveminder.com/">Hiveminder</a>.</p>


<pre><code>$ todo.pl braindump
</code></pre>

<p>`todo.pl` comes from <a href="http://search.cpan.org/~alexmv/App-Todo-0.97/bin/todo.pl">App::Todo</a>, a command line <a href="http://hiveminder.com/">Hiveminder</a> interface.  The braindump command launches $EDITOR where I add new tasks, one per line.  The <a href="http://hiveminder.com/help/reference/tasklists/braindump.html">braindump syntax</a> allows for specifying tags, setting priorities, and other things as well.</p>




<p>Next, I prepare the task list for the upcoming week:</p>


<pre><code>$ week.pl edit
Carry over the following tasks?
bring about world peace (y or n) [default y] y
write some awesome pre
do some other cool stuff
create practical cold fusion (y or n) [default y] n
return library book
</code></pre>

<p>The `edit` command iterates over each task tagged with &#8216;week&#8217; if  the task is not marked completed. It prompts whether or not I wish to carry the task over to this week (leave the tag). Any tasks marked completed have the tag removed automatically.</p>


<pre><code>$ week.pl add
Created:
        #YRVK write an awesome report for Tom [week dev]
        #YRVL test some new stuff for deployment [week admin]
</code></pre>

<p>The `add</tt` command works the same as todo.pl's braindump command except the 'week' tag is automatically applied to the newly created tasks.  The full braindump syntax is available for specifying other properties of the tasks.</p>


<pre><code>$ week.pl update https://path.to.trac/wiki/Tasks/2010-03-15
Sup dawg, I heard you like tasks so I did ur shit for you
</code></pre>

<p>The `update` command grabs my tasks tagged with &#8216;week&#8217; and formats them one per line started with &#8217; * &#8216;, a wiki bullet list.  It grabs the current wiki page, finds my heading, substitutes the formatted task list under the heading, and submits the change.  It also stores the path given in the YAML config file.</p>


<pre><code>$week.pl go
</code></pre>

<p>This opens the stored URL for this week&#8217;s tasks wiki page in my default browser, allowing me to confirm week.pl did what it&#8217;s supposed to.</p>




<p>Later in the week once I&#8217;ve done something:</p>


<pre><code>$ week.pl done tom
#YH7T bring about world peace [dev week]
#YRVL test some new stuff for deployment [week admin]
[DONE] #YRVK write an awesome report for Tom [week dev]
</code></pre>

<p>This retrieves the task(s) tagged &#8216;week&#8217; that are not marked completed containing the given string.  If there was only one match, the script marks it as done and then outputs the current state of tasks tagged &#8216;week&#8217;.</p>


<pre><code>$ week.pl update
Sup dawg, I heard you like tasks so I did ur shit for you
</code></pre>

<p>Same as `update` before, except when no URL is given, the URL is read from the configuration file.  This way I only need to worry about the URL once per week, the first time I update for the week.</p>




<h3>Conclusion</h3>




<p>So there you have it.  If you are also using <a href="http://hiveminder.com/">Hiveminder</a>, maybe aspects of my work flow will make sense for you and pieces of the Perl script may be useful.  If you aren&#8217;t using <a href="http://hiveminder.com/">Hiveminder</a>, maybe you will be inspired to check it out.  I use michael@thegrebs.com on <a href="http://hiveminder.com/">Hiveminder</a> in case you feel the need to assign me a task or wish to gift me another year of Hiveminder Pro ;)</p>


<p><a href="http://thegrebs.com/~michael/tasks/week.txt">week.pl</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Comic Genius]]></title>
    <link href="http://michael.thegrebs.com/2009/09/29/comic-genius/"/>
    <updated>2009-09-29T19:26:56-04:00</updated>
    <id>http://michael.thegrebs.com/2009/09/29/comic-genius</id>
    <content type="html"><![CDATA[<p>This guy is a comic genius!  Sheer hilarity.</p>

<object width="425" height="344"><param name="movie" value="http://www.youtube-nocookie.com/v/kCvkatCGNFY&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/kCvkatCGNFY&hl=en&fs=1&rel=0&color1=0x3a3a3a&color2=0x999999" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[WebService::MobileMe uploaded to the CPAN]]></title>
    <link href="http://michael.thegrebs.com/2009/07/26/webservicemobileme-uploaded-to-the-cpan/"/>
    <updated>2009-07-26T18:06:23-04:00</updated>
    <id>http://michael.thegrebs.com/2009/07/26/webservicemobileme-uploaded-to-the-cpan</id>
    <content type="html"><![CDATA[<p>Just a quick post to announce a new perl module I uploaded to the CPAN the other day.  It&#8217;s still to be considered alpha quality as it is lacking error checking and other such necessary stuffs but is working for me.</p>

<p>Usage looks like:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
</pre></td><td class='code'><pre><code class='perl'><span class='line'><span class="k">use</span> <span class="nn">WebService::</span><span class="n">MobileMe</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">my</span> <span class="nv">$mme</span> <span class="o">=</span> <span class="nn">WebService::</span><span class="n">MobileMe</span><span class="o">-&gt;</span><span class="k">new</span><span class="p">(</span>
</span><span class='line'>    <span class="n">username</span> <span class="o">=&gt;</span> <span class="s">&#39;yaakov&#39;</span><span class="p">,</span> <span class="n">password</span> <span class="o">=&gt;</span> <span class="s">&#39;HUGELOVE&#39;</span> <span class="p">);</span>
</span><span class='line'><span class="k">my</span> <span class="nv">$location</span> <span class="o">=</span> <span class="nv">$mme</span><span class="o">-&gt;</span><span class="n">locate</span><span class="p">;</span>
</span><span class='line'><span class="k">print</span> <span class="o">&lt;</span> <span class="o">&lt;</span><span class="s">&quot;EOT&quot;</span><span class="p">;</span>
</span><span class='line'>    <span class="n">As</span> <span class="n">of</span> <span class="nv">$location</span><span class="o">-&gt;</span><span class="p">{</span><span class="n">date</span><span class="p">},</span> <span class="nv">$location</span><span class="o">-&gt;</span><span class="p">{</span><span class="nb">time</span><span class="p">},</span> <span class="n">Yaakov</span> <span class="n">was</span> <span class="n">at</span>
</span><span class='line'>    <span class="nv">$location</span><span class="o">-&gt;</span><span class="p">{</span><span class="n">latitude</span><span class="p">},</span> <span class="nv">$location</span><span class="o">-&gt;</span><span class="p">{</span><span class="n">longitude</span><span class="p">}</span> <span class="p">(</span><span class="n">plus</span> <span class="ow">or</span> <span class="n">minus</span>
</span><span class='line'>    <span class="nv">$location</span><span class="o">-&gt;</span><span class="p">{</span><span class="n">accuracy</span><span class="p">}</span> <span class="n">meters</span><span class="p">)</span><span class="o">.</span>
</span><span class='line'><span class="n">EOT</span>
</span><span class='line'><span class="nv">$mme</span><span class="o">-&gt;</span><span class="n">sendMessage</span><span class="p">(</span> <span class="n">message</span> <span class="o">=&gt;</span> <span class="s">&#39;Hi Yaakov!&#39;</span><span class="p">,</span> <span class="nb">alarm</span> <span class="o">=&gt;</span> <span class="mi">1</span> <span class="p">);</span>
</span></code></pre></td></tr></table></div></figure>


<p>The online documentation is available via <a href="http://search.cpan.org/~mikegrb/WebService-MobileMe/lib/WebService/MobileMe.pm">search.cpan.org</a>.</p>

<ul>
<li>Git Web: <a href="http://git.thegrebs.com/?p=WebService-MobileMe">http://git.thegrebs.com/?p=WebService-MobileMe</a></li>
<li>Git Clone: http://git.thegrebs.com/git/WebService-MobileMe</li>
</ul>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[YAPC|10]]></title>
    <link href="http://michael.thegrebs.com/2009/06/01/yapc10/"/>
    <updated>2009-06-01T12:53:44-04:00</updated>
    <id>http://michael.thegrebs.com/2009/06/01/yapc10</id>
    <content type="html"><![CDATA[<p>I will be at <a href="http://yapc10.org/yn2009/">YAPC|10</a> in Pittsburgh the end of June.  Here&#8217;s a schedule of the talks I plan to attend.  There are a few holes not because the talks at those time suck but because they rock so hard I can&#8217;t decide which I want to attend.</p>

<p>Old Google Calendar embed removed.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Playing a Tone Through an Arduino Connected Piezo]]></title>
    <link href="http://michael.thegrebs.com/2009/03/23/playing-a-tone-through-an-arduino-connected-piezo/"/>
    <updated>2009-03-23T21:27:52-04:00</updated>
    <id>http://michael.thegrebs.com/2009/03/23/playing-a-tone-through-an-arduino-connected-piezo</id>
    <content type="html"><![CDATA[<p>I&#8217;m working on a top secret project, all I&#8217;ll say is it involves the Arduino, Twitter, and the refrigerator, and needed to play a tone through a piezo connected to the Arduino.  I looked around and the closest I could find was <a href="http://www.arduino.cc/en/Tutorial/PlayMelody">a tutorial  that included code to play a melody</a>.</p>

<p>This wasn&#8217;t quite what I wanted and the playTone function expects the notes and timing to be in global variables which makes the baby jesus cry.  The premise was simple though.  Take the period and divide by two then bring the output high then low for this amount of time, repeat to make up the desired duration.</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
</pre></td><td class='code'><pre><code class='c'><span class='line'><span class="kt">int</span> <span class="n">pinSpeaker</span> <span class="o">=</span> <span class="mi">10</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="kt">void</span> <span class="nf">setup</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">pinMode</span><span class="p">(</span><span class="n">pinSpeaker</span><span class="p">,</span> <span class="n">OUTPUT</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="kt">void</span> <span class="nf">loop</span> <span class="p">()</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">playTone</span><span class="p">(</span><span class="mi">750</span><span class="p">,</span> <span class="mi">500</span><span class="p">);</span>
</span><span class='line'>    <span class="n">delay</span><span class="p">(</span><span class="mi">750</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="c1">// duration in mSecs, frequency in hertz</span>
</span><span class='line'><span class="kt">void</span> <span class="nf">playTone</span><span class="p">(</span><span class="kt">long</span> <span class="n">duration</span><span class="p">,</span> <span class="kt">int</span> <span class="n">freq</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">duration</span> <span class="o">*=</span> <span class="mi">1000</span><span class="p">;</span>
</span><span class='line'>    <span class="kt">int</span> <span class="n">period</span> <span class="o">=</span> <span class="p">(</span><span class="mf">1.0</span> <span class="o">/</span> <span class="n">freq</span><span class="p">)</span> <span class="o">*</span> <span class="mi">1000000</span><span class="p">;</span>
</span><span class='line'>    <span class="kt">long</span> <span class="n">elapsed_time</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span>
</span><span class='line'>    <span class="k">while</span> <span class="p">(</span><span class="n">elapsed_time</span> <span class="o">&lt;</span> <span class="n">duration</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>        <span class="n">digitalWrite</span><span class="p">(</span><span class="n">pinSpeaker</span><span class="p">,</span><span class="n">HIGH</span><span class="p">);</span>
</span><span class='line'>        <span class="n">delayMicroseconds</span><span class="p">(</span><span class="n">period</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
</span><span class='line'>        <span class="n">digitalWrite</span><span class="p">(</span><span class="n">pinSpeaker</span><span class="p">,</span> <span class="n">LOW</span><span class="p">);</span>
</span><span class='line'>        <span class="n">delayMicroseconds</span><span class="p">(</span><span class="n">period</span> <span class="o">/</span> <span class="mi">2</span><span class="p">);</span>
</span><span class='line'>        <span class="n">elapsed_time</span> <span class="o">+=</span> <span class="p">(</span><span class="n">period</span><span class="p">);</span>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>This simple sketch plays a 500Hz tone for 750 mSec, pauses 750 mSec and repeats.  To use it in your sketch simply define <code>pinSpeaker</code> and set it for output, copy <code>playTone</code> to your sketch and call it with the duration in milliseconds and the frequency in hertz.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[I am so totally a nerd]]></title>
    <link href="http://michael.thegrebs.com/2009/03/03/i-am-so-totally-a-nerd/"/>
    <updated>2009-03-03T20:39:03-05:00</updated>
    <id>http://michael.thegrebs.com/2009/03/03/i-am-so-totally-a-nerd</id>
    <content type="html"><![CDATA[<p>Somebody came into the IRC support channel for work and their nick was &#8216;turtle&#8217;.  I made a logo joke and a co-worker corrected my short LOGO triangle.  This prompted me to waste 20 minutes in a LOGO interpreter.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>RT 30
</span><span class='line'>REPEAT 3 [REPEAT 3 [FD 100 RT 120] RT 120]
</span><span class='line'>PENUP
</span><span class='line'>FD 100
</span><span class='line'>PENDOWN
</span><span class='line'>RT 90
</span><span class='line'>REPEAT 360 [FD 1.75 RT 1]</span></code></pre></td></tr></table></div></figure>


<p>The output:</p>

<p><img src="http://michael.thegrebs.com/assets/2009/logo.png" alt="logo" title="logo" width="282" height="251"></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[pitz prepares to rock my socks]]></title>
    <link href="http://michael.thegrebs.com/2009/02/22/pitz-prepares-to-rock-my-socks/"/>
    <updated>2009-02-22T23:16:57-05:00</updated>
    <id>http://michael.thegrebs.com/2009/02/22/pitz-prepares-to-rock-my-socks</id>
    <content type="html"><![CDATA[<p><a href="http://blog.tplus1.com/">Matt Wilson</a> must be spying on my dialogs in sekrit IRC channels.  After setting up <a href="http://www.beckingham.net/task.html">Task</a> this evening I mentioned there being several project ticketing systems, like <a href="http://ditz.rubyforge.org/">Ditz</a>, that store data in the RCS.  I was lamenting the fact that there wasn&#8217;t any of these systems written in anything other than ruby that I was aware of.</p>


<p>Reading my RSS feeds before bed, I found <a href='http://blog.tplus1.com/index.php/2009/02/22/my-new-ticket-tracking-system-is-now-vaporware/'>&#8220;My new ticket tracking system is now vaporware&#8221;</a> from <a href="http://blog.tplus1.com/">Matt Wilson&#8217;s blog</a> talking about <a href="http://pitz.tplus1.com/">Pitz</a>, his soon to exist Python implementation of <a href="http://ditz.rubyforge.org/">Ditz</a>.</p>


<p>Please take a few moments to read over the feature set and example commands on the <a href="http://pitz.tplus1.com/">Pitz</a> site and let Matt know about any ideas/suggestions you may have.</p>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[~/.bashrc Perl Module Version Tip]]></title>
    <link href="http://michael.thegrebs.com/2009/01/09/bashrc-perl-module-version-tip/"/>
    <updated>2009-01-09T11:41:12-05:00</updated>
    <id>http://michael.thegrebs.com/2009/01/09/bashrc-perl-module-version-tip</id>
    <content type="html"><![CDATA[<p>I often need to quickly check the version of a perl module currently installed.  A while back I got tired of running:</p>

<pre><code>$ perl -MPOE::Filter -E 'say $POE::Filter::VERSION'
1.2357
</code></pre>

<p>So I added a quick function to .bashrc:</p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'>pm-vers <span class="o">()</span> <span class="o">{</span>
</span><span class='line'>    perl -M<span class="nv">$1</span> -e <span class="s2">&quot;print \$$1::VERSION, \&quot;\n\&quot;&quot;</span>
</span><span class='line'><span class="o">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>Now I just run:</p>

<pre><code>$ pm-vers POE::Filter
1.2357
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[git diff and white space]]></title>
    <link href="http://michael.thegrebs.com/2009/01/07/git-diff-and-whitespace/"/>
    <updated>2009-01-07T23:44:04-05:00</updated>
    <id>http://michael.thegrebs.com/2009/01/07/git-diff-and-whitespace</id>
    <content type="html"><![CDATA[<p>So I&#8217;m getting ready to make a commit to <a href="http://michael.thegrebs.com/software/wxperl/">wxperl</a> and I run a <code>git diff</code> to check on changes and git yelled at me that I had some trailing white space.  Well it didn&#8217;t yell but it hi-lighted the white space in red.  Way awesome!</p>

<p><a href="http://michael.thegrebs.com/assets/2009/git-diff-trailing-white-space.png"><img src="http://michael.thegrebs.com/assets/2009/git-diff-trailing-white-space-300x145.png" alt="git-diff-trailing-white-space" title="git-diff-trailing-white-space" width="300" height="145" class="aligncenter size-medium wp-image-185" /></a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Net::Abuse::Utils v0.10 Released]]></title>
    <link href="http://michael.thegrebs.com/2008/12/28/netabuseutils-v010-released/"/>
    <updated>2008-12-28T23:23:04-05:00</updated>
    <id>http://michael.thegrebs.com/2008/12/28/netabuseutils-v010-released</id>
    <content type="html"><![CDATA[<p>I just released Net::Abuse::Utils v0.10 to CPAN.  If you can&#8217;t wait, grab it <a href="http://thegrebs.com/~michael/modules/Net-Abuse-Utils-0.10.tar.gz">here</a>.</p>

<p>If you haven&#8217;t heard of this module before, see this <a href="http://thegrebs.com/ip-info/">online example</a> of some of the data that can be returned.  Online docs are available as well at <a href="http://search.cpan.org/~mikegrb/Net-Abuse-Utils/lib/Net/Abuse/Utils.pm">search.cpan.org</a>.</p>

<p>From the Changes file:</p>

<ul>
    <li>New get_domain function that converts host name to domain name</li>
    <li> Memoize support though commented out by default, enable by 
      uncommenting the following two lines in `lib/Net/Abuse/Utils.pm`<br />
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='perl'><span class='line'><span class="c1"># use Memoize;</span>
</span><span class='line'><span class="c1"># memoize(&#39;_return_rr&#39;);</span>
</span></code></pre></td></tr></table></div></figure>
      A future version will likely allow Memoization via an export tag.</li>
</ul>


<p>The <code>get_domain</code> function is fairly spiffy taking a host name like &#8216;michael.thegrebs.com&#8217; and turning it into the domain name, &#8216;thegrebs.com&#8217;, but with proper recognition of second level zones like .co.uk.</p>

<p>The Memoization support is weak and I almost removed it but decided to leave it in but commented out for this release.  It speeds up batch processing of large quantities of requests fairly well.  Processing a days worth of spam used to take an average of 5 minutes and is now down to a minute and a half.  This is quite a bit more increase than I expected as I am using bind with heavy local caching.</p>

<p>There were a few more changes mostly related to distribution related stuff, see <a href="http://git.thegrebs.com/?p=Net-Abuse-Utils">git</a> for the full gory details.</p>

<p>Not a horribly significant release but it&#8217;s been a while since the last one and I wanted to get <code>get_domain</code> out there.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Geeky Weather Station Stuffs]]></title>
    <link href="http://michael.thegrebs.com/2008/12/21/geeky-weather-station-stuffs/"/>
    <updated>2008-12-21T22:08:55-05:00</updated>
    <id>http://michael.thegrebs.com/2008/12/21/geeky-weather-station-stuffs</id>
    <content type="html"><![CDATA[<p><img src="http://michael.thegrebs.com/wp-content/uploads/2008/12/wxperl.png" alt="wxperl" title="wxperl" width="200" height="385" class="alignright size-full wp-image-176" />
<a href="http://weather.thegrebs.com/">http://weather.thegrebs.com/</a></p>

<p>I recently received a nice Honeywell weather station.  It turns out they are actually manufactured by a company called Irox which also sells stations under it&#8217;s own name but they seem to be more popular in Europe.  Being a geek, one of the first things I did was check out Linux or OS X support.  Unfortunately only one piece of software supports this weather station under Linux, <a href="http://www.weather-display.com/index.php">Weather Display</a>.  There Linux software is freeware but not open source and leaves quite a bit to be desired but at least it would talk to the weather station and collect data from it.</p>

<p>With a bit of Googling I found <a href="http://saratoga-weather.org/template/index.php">Saratoga Weather</a> which seems to be based on a template from <a href="http://www.carterlake.org/webtemplates.php">Carter Lakes</a>.  Unfortunately the PHP code is a bit of a mess with 43 separate php files all in a top level directory and including each other.  With a bit of work I was able to bend it to my will but every little change was a pain to accomplish.</p>

<p>I started slowly re-implementing things in Perl.  I found an <a href="http://www.tnetweather.com/wd-parser.php">online WD data-file parser</a> which greatly helped in figuring out what the fields in Weather Displays native log files meant.  Fast-forward a couple of weeks and I think things are pretty much done feature wise.  I lack NWS warning/watch/advisory notification, the thermometer image with today&#8217;s information is still PHP generated, and I don&#8217;t yet have a wind graph.  These last few details shouldn&#8217;t take too much work when I get around to it.  I also have a few features the original lacks, graphs, a daily tweet with today&#8217;s high/low, and sane code :p.</p>

<p>The information from my weather station is available online at <a href="http://weather.thegrebs.com/">http://weather.thegrebs.com/</a> and the source is available via git clone from http://git.thegrebs.com/git/wxperl.  You may also browse the repo via Git Web at <a href="http://git.thegrebs.com/?p=wxperl">http://git.thegrebs.com/?p=wxperl</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Join the FSF Today]]></title>
    <link href="http://michael.thegrebs.com/2008/12/05/join-the-fsf-today/"/>
    <updated>2008-12-05T23:24:46-05:00</updated>
    <id>http://michael.thegrebs.com/2008/12/05/join-the-fsf-today</id>
    <content type="html"><![CDATA[<p>The <a href="http://www.fsf.org/associate/support_freedom/join_fsf?referrer=7097">Free Software Foundation</a> is having a year end fund drive.  Go join today.  <strong>Can you think of a better way to spend $10 per month?</strong>  Tell them member 7097 sent you.</p>

<div align="center">
<a href="http://www.fsf.org/associate/support_freedom/join_fsf?referrer=7097"><img src="http://static.fsf.org/fsforg/img/thin-image.png" alt="Support freedom" title="Help protect your freedom, join the Free Software Foundation" /></a></div>

]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Ruby's not Ready]]></title>
    <link href="http://michael.thegrebs.com/2008/11/11/rubys-not-ready/"/>
    <updated>2008-11-11T23:28:20-05:00</updated>
    <id>http://michael.thegrebs.com/2008/11/11/rubys-not-ready</id>
    <content type="html"><![CDATA[<p>Was looking for a specific essay about some of the issues with Ruby to point my boss to and stumbled across this instead, still haven&#8217;t quite finished reading it yet but good stuff.  Increases my desire to further my Python skillz.</p>

<p><a href="http://glyphobet.net/blog/essay/228">Ruby&#8217;s not Ready at glyphobet</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Quick & Easy Temperature Logging with the Arduino]]></title>
    <link href="http://michael.thegrebs.com/2008/11/02/arduino-temperature-logging/"/>
    <updated>2008-11-02T23:29:50-05:00</updated>
    <id>http://michael.thegrebs.com/2008/11/02/arduino-temperature-logging</id>
    <content type="html"><![CDATA[<p><strong>Basic Voltage Divider with a Thermistor:</strong></p>

<p><img src='http://thegrebs.com/~michael/old-stuff/old-png/therm-vd.png' alt='Thermistor Voltage Divider Schematic' class='alignleft' /></p>

<p>Typical voltage divider, matched would have made better sense but the thermistor was a random one salvaged from consumer electronics so I didn&#8217;t know the value in advance.</p>

<p>Would work just fine like this with TP1 connected to an Arduino analog input and Vcc and GND connected.  Energy savings for the win though, connected the top of the divider (Vcc) to a digital pin on the Arduino.  Set the pin HIGH when you want to take a reading, LOW the rest of the time.  Now the divider is not consuming power when a reading isn&#8217;t being taken.</p>

<p><strong>Arduino Code</strong></p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
</pre></td><td class='code'><pre><code class='c'><span class='line'><span class="kt">int</span> <span class="n">pinDivEn</span>   <span class="o">=</span> <span class="mi">4</span><span class="p">;</span>
</span><span class='line'><span class="kt">int</span> <span class="n">pinDivRead</span> <span class="o">=</span> <span class="mi">1</span><span class="p">;</span>
</span><span class='line'><span class="kt">int</span> <span class="n">pinLED</span>     <span class="o">=</span> <span class="mi">13</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="kt">void</span> <span class="nf">setup</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'>    <span class="n">Serial</span><span class="p">.</span><span class="n">begin</span><span class="p">(</span><span class="mi">9600</span><span class="p">);</span>
</span><span class='line'>    <span class="n">pinMode</span><span class="p">(</span><span class="n">pinLED</span><span class="p">,</span> <span class="n">OUTPUT</span><span class="p">);</span>
</span><span class='line'>    <span class="n">pinMode</span><span class="p">(</span><span class="n">pinDivEn</span><span class="p">,</span> <span class="n">OUTPUT</span><span class="p">);</span>
</span><span class='line'>    <span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="s">&quot;READY&quot;</span><span class="p">);</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="kt">void</span> <span class="nf">loop</span><span class="p">()</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">if</span> <span class="p">(</span><span class="n">Serial</span><span class="p">.</span><span class="n">available</span><span class="p">()</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>        <span class="n">digitalWrite</span><span class="p">(</span><span class="n">pinDivEn</span><span class="p">,</span> <span class="n">HIGH</span><span class="p">);</span>
</span><span class='line'>        <span class="n">digitalWrite</span><span class="p">(</span><span class="n">pinLED</span><span class="p">,</span> <span class="n">HIGH</span><span class="p">);</span>
</span><span class='line'>        <span class="n">delay</span><span class="p">(</span><span class="mi">100</span><span class="p">);</span>
</span><span class='line'>        <span class="k">while</span> <span class="p">(</span><span class="n">Serial</span><span class="p">.</span><span class="n">available</span><span class="p">()</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">)</span>
</span><span class='line'>            <span class="kt">int</span> <span class="n">serByte</span> <span class="o">=</span> <span class="n">Serial</span><span class="p">.</span><span class="n">read</span><span class="p">();</span>
</span><span class='line'>        <span class="n">Serial</span><span class="p">.</span><span class="n">println</span><span class="p">(</span><span class="n">analogRead</span><span class="p">(</span><span class="n">pinDivRead</span><span class="p">));</span>
</span><span class='line'>        <span class="n">digitalWrite</span><span class="p">(</span><span class="n">pinDivEn</span><span class="p">,</span> <span class="n">LOW</span><span class="p">);</span>
</span><span class='line'>        <span class="n">digitalWrite</span><span class="p">(</span><span class="n">pinLED</span><span class="p">,</span> <span class="n">LOW</span><span class="p">);</span>
</span><span class='line'>    <span class="p">}</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>pinDivEn is the divider enable pin (Vcc), pinDivRead is the analog input connected to TP1 in the divider, pinLED is is a digital pin with an LED that is lit while a reading is taken.</p>

<p>Once the Arduino boots it sends READY on the serial port at 9600 bps.  It then waits for any data to be available on the serial port, when bytes are available, the voltage divider is enabled, the LED is lit, the bytes on the serial port are consumed, the value of TP1 is read and then written to the serial port, the divider enable pin is brought back low and the led is extinguished.</p>

<p><strong>Perl Code</strong></p>

<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
<span class='line-number'>27</span>
<span class='line-number'>28</span>
<span class='line-number'>29</span>
<span class='line-number'>30</span>
<span class='line-number'>31</span>
<span class='line-number'>32</span>
<span class='line-number'>33</span>
<span class='line-number'>34</span>
<span class='line-number'>35</span>
<span class='line-number'>36</span>
<span class='line-number'>37</span>
<span class='line-number'>38</span>
<span class='line-number'>39</span>
<span class='line-number'>40</span>
<span class='line-number'>41</span>
<span class='line-number'>42</span>
</pre></td><td class='code'><pre><code class='perl'><span class='line'><span class="c1">#!/usr/bin/perl</span>
</span><span class='line'>
</span><span class='line'><span class="k">use</span> <span class="n">strict</span><span class="p">;</span>
</span><span class='line'><span class="k">use</span> <span class="n">warnings</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">use</span> <span class="nn">IO::</span><span class="n">Handle</span><span class="p">;</span>
</span><span class='line'><span class="k">use</span> <span class="nn">Device::</span><span class="n">SerialPort</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="k">my</span> <span class="nv">$dev</span> <span class="o">=</span> <span class="nb">tie</span> <span class="p">(</span><span class="o">*</span><span class="n">FH</span><span class="p">,</span> <span class="s">&#39;Device::SerialPort&#39;</span><span class="p">,</span> <span class="s">&quot;/dev/tty.usbserial-A4001JwW&quot;</span><span class="p">)</span>
</span><span class='line'>    <span class="o">||</span> <span class="nb">die</span> <span class="s">&quot;Can&#39;t tie: $!&quot;</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'><span class="nv">$dev</span><span class="o">-&gt;</span><span class="n">baudrate</span><span class="p">(</span><span class="mi">9600</span><span class="p">);</span>
</span><span class='line'><span class="nv">$dev</span><span class="o">-&gt;</span><span class="n">databits</span><span class="p">(</span><span class="mi">8</span><span class="p">);</span>
</span><span class='line'><span class="nv">$dev</span><span class="o">-&gt;</span><span class="n">parity</span><span class="p">(</span><span class="s">&quot;none&quot;</span><span class="p">);</span>
</span><span class='line'><span class="nv">$dev</span><span class="o">-&gt;</span><span class="n">stopbits</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'><span class="nb">open</span> <span class="p">(</span><span class="k">my</span> <span class="nv">$log</span><span class="p">,</span> <span class="s">&#39;&gt;&gt;&#39;</span><span class="p">,</span> <span class="s">&#39;ohms.log&#39;</span><span class="p">)</span> <span class="o">||</span> <span class="nb">die</span> <span class="s">&quot;can&#39;t open: $!&quot;</span><span class="p">;</span>
</span><span class='line'><span class="nv">$log</span><span class="o">-&gt;</span><span class="n">autoflush</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
</span><span class='line'>
</span><span class='line'><span class="c1"># wait for arduino to boot</span>
</span><span class='line'><span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$val</span> <span class="o">=</span> <span class="sr">&lt;fh&gt;</span><span class="p">;</span>
</span><span class='line'>    <span class="k">last</span> <span class="k">if</span> <span class="nv">$val</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span><span class='line'>
</span><span class='line'><span class="k">print</span> <span class="n">FH</span> <span class="s">&quot;1\n&quot;</span><span class="p">;</span>
</span><span class='line'><span class="k">while</span> <span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="p">{</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$val</span> <span class="o">=</span> <span class="sr">&lt;/fh&gt;&lt;fh&gt;</span><span class="p">;</span>
</span><span class='line'>    <span class="k">next</span> <span class="k">unless</span> <span class="nv">$val</span><span class="p">;</span>
</span><span class='line'>    <span class="nb">chomp</span> <span class="nv">$val</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$vR2</span> <span class="o">=</span> <span class="nv">$val</span> <span class="o">/</span> <span class="mi">1023</span> <span class="o">*</span> <span class="mi">5</span><span class="p">;</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$vR1</span> <span class="o">=</span> <span class="mi">5</span> <span class="o">-</span> <span class="nv">$vR2</span><span class="p">;</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$i</span>   <span class="o">=</span> <span class="nv">$vR1</span> <span class="o">/</span> <span class="mi">1_000</span> <span class="o">*</span> <span class="mi">1_000</span><span class="p">;</span>
</span><span class='line'>    <span class="k">my</span> <span class="nv">$R2</span>  <span class="o">=</span> <span class="nv">$vR2</span> <span class="o">/</span> <span class="nv">$i</span><span class="p">;</span>
</span><span class='line'>
</span><span class='line'>    <span class="k">print</span> <span class="nv">$log</span> <span class="nb">time</span> <span class="o">.</span> <span class="s">&#39; &#39;</span> <span class="o">.</span> <span class="nv">$R2</span> <span class="o">.</span> <span class="s">&quot;\n&quot;</span><span class="p">;</span>
</span><span class='line'>    <span class="c1"># printf(&quot;V_R2=%.2fV, i=%.2fmA  R2=%.2fK&amp;#8486;\n&quot;, $vR2, $i, $R2);</span>
</span><span class='line'>
</span><span class='line'>    <span class="nb">sleep</span> <span class="mi">10</span><span class="p">;</span>
</span><span class='line'>    <span class="k">print</span> <span class="n">FH</span> <span class="s">&quot;1\n&quot;</span><span class="p">;</span>
</span><span class='line'><span class="p">}</span>
</span></code></pre></td></tr></table></div></figure>


<p>Opens the serial port, waits for something (the Arduino sending &#8216;READY&#8217; but it pays no attention to what) on the serial port then every 10 seconds sends a 1\n to the Arduino prompting it to send a value.  The result of analogRead is an integer from 0 - 1023 so this is converted to a voltage.  The current through the divider is found allowing the resistance of the thermistor to be solved for.  The resistance and time are written to a space separated log file.  If the thermistor wasn&#8217;t unknown it would make more sense to solve for the actual temp using the Steinhartâ€“Hart equation or similar and logging that rather than the resistance.</p>

<p><strong>Sample log file entries</strong></p>

<pre><code>1224349429 10.1195652173913
1224349439 10.3666666666667
1224349449 10.3666666666667
1224349459 10.3666666666667
1224349469 10.4943820224719
1224349479 10.3666666666667
1224349489 10.2417582417582
</code></pre>

<p>A few lines in a text file gets us a graph from the log file by way of GnuPlot:</p>

<pre><code>set term png transparent nocrop enhanced font "./arial.ttf" 9 size 800, 600
set xdata time
set timefmt "%s"
set format x "%m/%d %H:%M"
set xtics  rotate by -45
set title "Thermistor Value"
set xlabel "Date/Time"
set ylabel "Resistance (kOhms)"
set grid
set output "ohms.png"
plot \
    "ohms.log" using 1:2 title "10 sec interval readings" linecolor 2, \
    "ohms.log" using 1:2 title "Bezier fit curve" smooth bezier linecolor 4 lw 2, \
    10 title "77 F" lw 2 linecolor 1
</code></pre>

<p><img src='http://thegrebs.com/~michael/old-stuff/old-png/ohms.png' alt='GnuPlot Graph of Time vs Resistance' class='alignnone' /></p>

<p></fh></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[multi-multi-multi function office machines]]></title>
    <link href="http://michael.thegrebs.com/2008/08/28/multi-multi-multi-function-office-machines/"/>
    <updated>2008-08-28T17:18:23-04:00</updated>
    <id>http://michael.thegrebs.com/2008/08/28/multi-multi-multi-function-office-machines</id>
    <content type="html"><![CDATA[<p>Currently in a waiting room and CNN is on.  There was just a commercial for a Sharp deep freezer sized copier/scanner/printer/sink.  The business person googled for a restaurant to take a client to on the built in touch screen then presses a button to print a full-color map to the restaurant.  What business person would go to the copy building (a room is not big enough) to google a restaurant?</p>

<p>Sorry check back later for pics, Steve Jobs says I don&#8217;t need copy &amp; paste as I&#8217;m sending this from the wordpress app on my iPhone.</p>

<p><strong>Update:</strong>
<img src="http://michael.thegrebs.com/wp-content/uploads/2008/08/sharp-mx-m1100-300x300.jpg" alt="" title="sharp-mx-m1100" width="300" height="300" class="alignright size-medium wp-image-135" />
One note of clearification, as crazy as the feature set on these machines is, I still wouldn&#8217;t mind having one to use whenever I wanted, imagine what you could do with it!  The commercial I saw is available in flash form at
<a href="http://www.sharpusa.com/files/workwithoutlimits.swf">http://www.sharpusa.com/files/workwithoutlimits.swf</a>.</p>
]]></content>
  </entry>
  
</feed>

