<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Bear Den Designs - The Fixer's Musings</title>
    <link>http://beardendesigns.com/blogs/feed?user=3</link>
    <description>Blog postings by The Fixer of Bear Den Designs</description>
    <language>en-us</language>
    <atom:link type="application/rss+xml" rel="self" href="http://beardendesigns.com/blogs/feed?user=3"/>
    <item>
      <title>Dust in the fan</title>
      <description>&lt;p&gt;My Thinkpad T60p is a pretty nice machine, but it&amp;#8217;s been running ridiculously hot; hot enough that I&amp;#8217;ve had to throttle the speed down to keep it from melting and/or burning me.  I finally got sufficiently annoyed at it that last night I got the maintenance manual from Lenovo/IBM&amp;#8217;s support site, took it apart and cleaned the fan.  The exhaust vent was in fact completely clogged with caked-on dust, and after a small adventure in finding all the screws, it&amp;#8217;s running much better.  50 degrees cooler, in fact, and that&amp;#8217;s without throttling the cpu speed down at all.  Excellent!&lt;/p&gt;</description>
      <pubDate>Thu, 16 Oct 2008 15:16:36 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/54</link>
      <category>thinkpad/overheat/fixed</category>
      <guid>http://beardendesigns.com/blogs/show?54</guid>
    </item>
    <item>
      <title>Microsoft's Mojave experiment</title>
      <description>&lt;p&gt;There&amp;#8217;s been a bunch of press about Microsoft&amp;#8217;s Mojave experiment, where they presented Vista to some naive users, telling them it was actually a new operating system, code-named &amp;#8216;Mojave&amp;#8217;.  Unsurprisingly, it rated better than Vista, even though it was just a copy of Vista.  This is actually a very valuable experiment, since it tells us exactly how much the placebo effect controls perceptions of a new operating system, and the bar which Microsoft must exceed in order to actually make improvements to their operating system.  Microsoft claims a pre-demo rating of 4.4 for Vista and a post-demo rating of 8.5 for Mojave, so now I know that anything less than a doubling of user ratings for Microsoft&amp;#8217;s next OS means it actually got worse ;-)&lt;/p&gt;</description>
      <pubDate>Tue, 05 Aug 2008 20:02:57 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/50</link>
      <category>placeboeffect</category>
      <guid>http://beardendesigns.com/blogs/show?50</guid>
    </item>
    <item>
      <title>OpenSolaris 2008.05</title>
      <description>&lt;p&gt;I regularly install lots of different operating systems for testing purposes.  Yesterday I installed OpenSolaris 2008.05; I had high hopes for this one, since the stated goal was to bring a modern interface to the Solaris kernel and goodies like DTrace and &lt;span class=&quot;caps&quot;&gt;ZFS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;So I went to assign it a static IP, so I could access it over the network reliably.  Great, I thought, a Gnome interface; I know what to do with that.  I click System&amp;#8594;Administration&amp;#8594;Network, only to see a dialog box that basically just says &amp;#8220;this doesn&amp;#8217;t work&amp;#8221;.  Okay, okay, so I follow the directions to disable network auto-magic and let me have control again.  I start the network administration panel again, set up the network address, then click &amp;#8220;Enable interface.&amp;#8221;  Nice and straightforward.  (On later reflection, this may not be what I wanted to do, as taking manual control in this way entails setting lots of other things, too, like the fact that I now have to tell Solaris that it should be using &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt; to resolve hostnames to IP addresses; it&amp;#8217;s been over 15 years since I last had a computer where I didn&amp;#8217;t want &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt; resolution to work, and that&amp;#8217;s because I only had one computer and no Internet connection at home.)&lt;/p&gt;
&lt;p&gt;Well, except for the fact that it didn&amp;#8217;t work.  The network interface had actually disappeared.  Fine, so I&amp;#8217;ll reboot on the theory that OpenSolaris has a half-assed Gnome install just like Solaris 10 did &amp;#8212; but there is no reboot option, and I&amp;#8217;m not about to fumble around trying to figure it out from the command line, so I just hit the shutdown option instead, wait 5 minutes for it to give me any feedback that it&amp;#8217;s doing anything, watch the error message about being unable to unmount /export/home because it&amp;#8217;s in use go by, before it finally shuts down.&lt;/p&gt;
&lt;p&gt;Restarting and logging in again presented me with an error about not being able to resolve my hostname, and suggested adding it to /etc/hosts.  That&amp;#8217;s weird &amp;#8211; I explicitly added it in the network administration app; I went back and checked, but it&amp;#8217;s gone now.  Trying to add it there just doesn&amp;#8217;t work.  I guess that means it&amp;#8217;s vi from the command line again.&lt;/p&gt;
&lt;p&gt;Starting the package manager reveals more oddities; there is at least a &lt;span class=&quot;caps&quot;&gt;GUI&lt;/span&gt; package manager now, but it&amp;#8217;s &amp;#8230; not as good as the command line.  Finding the package I want to install is nearly impossible, because every program is named SUNWfbar or something like that.  Dr Sn, dnt y knw ts vry hrd t rd wth n vwls, lt aln srch fr smthng?  Seriously, I thought the days of such cryptic filenames went away with &lt;span class=&quot;caps&quot;&gt;DOS&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Some time ago, &lt;span class=&quot;caps&quot;&gt;BBC&lt;/span&gt; Top Gear went back in history and tried to find the first car manufactured with a steering wheel and pedals in the now conventional locations; while looking for it, they found a bunch of real oddities.  OpenSolaris still has a spark advance lever and a choke knob and a steering tiller; upgrading the engine from a V8 to a V12 is nice, guys, and the leather seats are a nice touch, but I &lt;strong&gt;still can&amp;#8217;t drive it&lt;/strong&gt;.&lt;/p&gt;</description>
      <pubDate>Tue, 06 May 2008 16:40:50 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/45</link>
      <category>solaris</category>
      <guid>http://beardendesigns.com/blogs/show?45</guid>
    </item>
    <item>
      <title>Perl use lib</title>
      <description>&lt;p&gt;I recently had occasion to break up an overly-large Perl script into a couple of modules, but I didn&amp;#8217;t particularly want to install the modules anyplace.  For one thing, I&amp;#8217;m still working on them, but I also want to use a current (working!) version in production.  Keeping the modules next to the script seemed like a nice straightforward thing to do, and it even worked, so long as the current working directory was the same as the directory the script and its modules were located in, but didn&amp;#8217;t work so well from a different directory.&lt;/p&gt;
&lt;p&gt;The solution is the FindBin module, which has some heuristics to find where the currently running script is actually located, and make that directory available to the rest of the program as a nice neat variable.  Here&amp;#8217;s what bit me; the syntax to actually make use of this looks like this:&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;perl&quot;&gt;
use FindBin;
use lib &quot;$FindBin::Bin&quot;;
&lt;/pre&gt;
&lt;p&gt;What I failed to notice is that the second line is &lt;span class=&quot;caps&quot;&gt;NOT&lt;/span&gt; a fill-in-the-name-of-your-library-here thing, it&amp;#8217;s a literal thing.  It is supposed to be followed by code that actually loads the libraries you want, only now it will look in the same directory as where the script is loaded from as well.&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;perl&quot;&gt;
use FindBin;
use lib &quot;$FindBin::Bin&quot;;

use MyLibrary;
use MyOtherLibrary;
&lt;/pre&gt;
&lt;p&gt;&amp;#8220;use lib&amp;#8221; is not a command to load a library, it&amp;#8217;s a &amp;#8220;pragma&amp;#8221;, which alters the way Perl works.  Yet another bit of the &lt;a href=&quot;http://steve.yegge.googlepages.com/tour-de-babel&quot;&gt;whale guts&lt;/a&gt; in Perl, I suppose.  Since I don&amp;#8217;t write in Perl all that often, I suppose I really ought to dig out my copy of the camel book and keep it in a more accessible place so I don&amp;#8217;t embarrass myself like this every time I try.&lt;/p&gt;</description>
      <pubDate>Tue, 15 Apr 2008 15:46:52 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/44</link>
      <category>perl</category>
      <guid>http://beardendesigns.com/blogs/show?44</guid>
    </item>
    <item>
      <title>Quickcam STX on Ubuntu</title>
      <description>&lt;p&gt;I just bought a Logitech Quickcam Communicate &lt;span class=&quot;caps&quot;&gt;STX&lt;/span&gt; for teleconferencing with Skype 2.0 beta on Ubuntu 7.10.  Getting it working was &amp;#8230;. trivial.  True Plug-and-Play; I didn&amp;#8217;t even need a driver CD, it just worked as soon as I plugged it in.  Hurray!&lt;/p&gt;</description>
      <pubDate>Tue, 26 Feb 2008 18:40:26 -0600</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/39</link>
      <category>linux/webcam</category>
      <guid>http://beardendesigns.com/blogs/show?39</guid>
    </item>
    <item>
      <title>Rinari fixes</title>
      <description>&lt;p&gt;I&amp;#8217;m using &lt;a href=&quot;http://rinari.rubyforge.org/&quot;&gt;Rinari&lt;/a&gt; for editing Rails in Emacs, but the current trunk in svn is &amp;#8230; slightly broken and hasn&amp;#8217;t been maintained in a bit.&lt;/p&gt;
&lt;p&gt;Here are a couple of fixes to it that I&amp;#8217;ve been using recently.  This reverts the switch-to-view shortcut key to something that isn&amp;#8217;t stubbed out, and also makes the switch-to-view look for .haml files in additional to .rhtml files.  I suppose it should look for .erb as well, but since we&amp;#8217;re not using that convention (yet), I haven&amp;#8217;t been motivated to add that in.&lt;/p&gt;
&lt;pre name=&quot;code&quot; class=&quot;diff&quot;&gt;
===================================================================
--- rinari.el	(revision 96)
+++ rinari.el	(working copy)
@@ -45,11 +45,21 @@
 
 (defun rinari-find-view ()
   (interactive)
-  (let* ((funname (which-function))
- 	 (cls (rinari-make-dirname (rinari-name-components funname)))
-	 (fn (and (string-match &quot;#\(.*\)&quot; funname) (match-string 1 funname)))
- 	 (railsdir (rails-root (directory-file-name (file-name-directory (buffer-file-name))))))
-    (find-file (concat railsdir &quot;/app/views/&quot; cls &quot;/&quot; fn &quot;.rhtml&quot;))))
+  (let* (basename
+		 (funname (which-function))
+		 (cls (rinari-make-dirname (rinari-name-components funname)))
+		 (fn (and (string-match &quot;#\(.*\)&quot; funname) (match-string 1 funname)))
+		 (railsdir (rails-root (directory-file-name (file-name-directory (buffer-file-name))))))
+	(setq basename (concat railsdir &quot;/app/views/&quot; cls &quot;/&quot; fn))
+	(if (file-exists-p (concat basename &quot;.haml&quot;))
+		(find-file (concat basename &quot;.haml&quot;))
+	  (if (file-exists-p (concat basename &quot;.rjs&quot;))
+		  (find-file (concat basename &quot;.rjs&quot;))
+		(if (file-exists-p (concat basename &quot;.rhtml&quot;))
+			(find-file (concat basename &quot;.rhtml&quot;))
+		  (find-file (concat basename &quot;.haml&quot;))
+		  )))
+	))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; find-file-in-project
@@ -169,7 +179,7 @@
 (define-key ruby-mode-map
   &quot;\C-c\C-s&quot; 'rinari-console)
 (define-key ruby-mode-map
-  &quot;\C-c\C-v&quot; (lambda () (interactive) (toggle-buffer 'rails-view)))
+  &quot;\C-c\C-v&quot; 'rinari-find-view)
 (define-key ruby-mode-map
   &quot;\C-c\C-t&quot; 'toggle-buffer)
 (define-key ruby-mode-map
Index: rhtml/rhtml-mode.el
===================================================================
--- rhtml/rhtml-mode.el	(revision 96)
+++ rhtml/rhtml-mode.el	(working copy)
@@ -54,11 +54,14 @@
   (rhtml-activate-fontification))
 
 (add-to-list 'auto-mode-alist '(&quot;\.rhtml$&quot; . rhtml-mode))
+(add-to-list 'auto-mode-alist '(&quot;\.rjs$&quot; . rhtml-mode))
 
 (define-key ruby-mode-map
   &quot;\C-c\C-v&quot; (lambda () (interactive) (toggle-buffer 'rails-view)))
 (define-key rhtml-mode-map
   &quot;\C-c\C-b&quot; 'rinari-find-by-context)
+(define-key rhtml-mode-map
+  &quot;\C-c\C-v&quot; 'rhtml-find-action)
 
 (defun extract-partial (begin end partial-name)
   (interactive &quot;r\nsName your partial: &quot;)
&lt;/pre&gt;</description>
      <pubDate>Tue, 26 Feb 2008 18:38:51 -0600</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/36</link>
      <category>emacs/rinari</category>
      <guid>http://beardendesigns.com/blogs/show?36</guid>
    </item>
    <item>
      <title>Ubuntu gutsy, fglrx and battery life</title>
      <description>&lt;p&gt;I have a Thinkpad T60p, which is a nice top-of-the-line laptop with a Core2Duo and an &lt;span class=&quot;caps&quot;&gt;ATI&lt;/span&gt; FireGL V5250 video card, but the battery life hasn&amp;#8217;t been so good, especially when compared to my older T40, which easily lasted through cross-country flights on those rare occasions when I traveled in that fashion.&lt;/p&gt;
&lt;p&gt;I updated to Ubuntu gutsy yesterday, which has Intel&amp;#8217;s nifty powertop utility included.  That revealed a number of power-hogging things I hadn&amp;#8217;t really been thinking about, but my power usage stayed up over 20W and powertop was showing nearly 150 wakeups per second, all the time.&lt;/p&gt;
&lt;p&gt;ATI&amp;#8217;s proprietary driver has been flagged as a power hog by the people behind powertop, but I didn&amp;#8217;t realize just how bad it was until I disabled it and tried powertop again.  I&amp;#8217;m down to 13.5W and 10-11 wakeups per second at idle; this extends my estimated battery life by over 2 hours!&lt;/p&gt;
&lt;p&gt;Other people have noticed that newer versions of the fglrx driver are much improved, but unfortunately the released versions don&amp;#8217;t yet support the FireGL cards.&lt;/p&gt;</description>
      <pubDate>Fri, 19 Oct 2007 13:53:45 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/25</link>
      <category>linux/power</category>
      <guid>http://beardendesigns.com/blogs/show?25</guid>
    </item>
    <item>
      <title>Hard drive recovery</title>
      <description>&lt;p&gt;My home server&amp;#8217;s hard drive and the backup drive failed on the same day, so I&amp;#8217;m trying to extract whatever I can from the bad disk.  Here are my notes so far:&lt;/p&gt;
&lt;p&gt;Boot the dead machine with a Linux live CD; the failed drive won&amp;#8217;t mount because the main superblock is one of the sectors that failed.&lt;/p&gt;
&lt;p&gt;Make a disk image on a remote machine:&lt;/p&gt;
&lt;p&gt;$sudo dd if=/dev/hda bs=512 conv=noerror,sync | ssh user@othermachine:server_hd_backup&lt;/p&gt;
&lt;p&gt;conv=noerror tells dd to skip over bad sectors; conv=sync tells it to pad the holes with zeros, so that the resulting disk image will still have everything that it can read in the right place.&lt;/p&gt;</description>
      <pubDate>Wed, 26 Sep 2007 11:19:11 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/24</link>
      <category>linux/datarecovery</category>
      <guid>http://beardendesigns.com/blogs/show?24</guid>
    </item>
    <item>
      <title>Fixture Scenarios update</title>
      <description>&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/fixture-scenarios/&quot;&gt;FixtureScenarios&lt;/a&gt; has moved.  I finally got it installed and I&amp;#8217;m impressed; out of the box, it fixes fixtures so that they clean up after themselves.&lt;/p&gt;</description>
      <pubDate>Wed, 04 Apr 2007 13:22:59 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/13</link>
      <category>rails</category>
      <guid>http://beardendesigns.com/blogs/show?13</guid>
    </item>
    <item>
      <title>Honest spam</title>
      <description>&lt;p&gt;I got a spam email this morning with a subject line of &amp;#8216;Our site doesn&amp;#8217;t make us look like credible professionals.&amp;#8217;&lt;/p&gt;
&lt;p&gt;Hey!  Somebody&amp;#8217;s being (unintentionally) honest about it!&lt;/p&gt;</description>
      <pubDate>Wed, 14 Mar 2007 10:45:58 -0500</pubDate>
      <link>http://beardendesigns.com/blogs/permalink/12</link>
      <category>funny</category>
      <guid>http://beardendesigns.com/blogs/show?12</guid>
    </item>
  </channel>
</rss>
