Thursday, March 14, 2013

Building Growl 2.0.1 to Save $4.99


Today I figured it was time that I bit the bullet and upgraded my instillation of Growl from 1.2.2 to the latest - 2.0.1.  I resisted upgrading before because 1.2.2 was the last free compiled version available.   I am way too cheap to pay for an Open Source project but I never had the ambition to build it.  Hello Mr. Ambition!

Building Growl...how hard can it be?  The Growl developers even have a little write up here on how to do it.  Let's find out.

Requirements


The official build notes list the following requirements:

  • OS X Lion - 10.8
  • Xcode
  • A tool to pull down a clone of the repo, the mercurial client
  • A working Git client
  • A working subversion client

How many different version control systems does one project need?  I'm running OS X Lion 10.7.5 so it looks like I meet all the requirements.  No version of Xcode is recommended so I'm going with the latest that I have - 4.6 (4H127).

Wednesday, March 13, 2013

Yes, Pandora, I'm Still Listening

Lately I've been listening to Pandora as background noise while coding.  Like you, I've clicked the "I'm still listening" button more times than I'd care too.  Today I decided to do something about it; I'm not talking about paying to upgrade Pandora either.

I'm sure someone out there has already written a perfectly good Greasemonkey script that I could use, but where is the fun in that.  It has been a while since I wrote anything in JavaScript so I figured this would be a great opportunity to clear away any cobwebs.

The first thing that needs to happen is to be notified of any changes to the DOM.  This is quite easy using MutationObserver defined in the DOM4 specification.  The callback is provided with a MutationRecord that contains the addedNodes as a property.  We can then search the addedNodes for the "I'm still listening" button.

Sunday, March 10, 2013

Adding CPU Temperature Monitoring to pfSense

One thing that I noticed after installing pfSense 2.0.2-RELEASE was that temperature was conspicuously absent from the Dashboard System Information widget.  Since the pfSense widgets are built using PHP, I figured it wouldn't be too hard to add the required functionality.  The first step was figuring out how to read the CPU temperatures.  My pfSense setup is a repurposed 2.4 GHz Pentium 4 computer w/ 1 GB memory I built circa 2003.  Pretty ancient.

FreeBSD provides modules for reading motherboard temperatures on late model Intel (Core Duo) and AMD CPUs.  The modules can be found in /boot/kernel as coretemp.ko and amdtemp.ko respectfully.  Use kdload to install the appropriate module and sysctl to access the temperature values.

 $> kldload coretemp # amdtemp  
 $> sysctl -a | grep -i temperature  

For my motherboard I need to go a little more old school and use mbmon (MotherBoard Monitor).  pfSense does not include the mbmon package by default so we need to install it.  Unfortunately I got the following error when I tried installing mbmon: