Friday, June 7, 2013

Southwest Flight Auto Check-In

I've taken a few flights on Southwest over the last couple of months and have another coming up.
One thing I don't particularly enjoy is the day-before-flight ritual of watching the clock, waiting to click the check-in button so I can get a decent seat.  The early bird option at $12.95 each way doesn't seem like a great value, and besides, I'm too cheap anyway.

Not long ago there was a great website that allowed users to enter Southwest flight info and would automatically check them in for their flight. Southwest, not surprising, put an end to that. :(  With the success of my Pandora user script, I thought another go was in order.

Last night I spent about an hour putting this little user script together that *should* work. I tested all the way up to the actual printing your boarding pass page.  I saved a copy of all the check-in pages the last time I flew Southwest in anticipation of someday writing a script like this.  From those saved pages, I think I'm doing everything correctly.  Have to wait until my actual flight to find out - wish me luck.

The magic happens after you input your flight information and click the 'Check In' button.  The script keys off the oops message Southwest provides and inserts inputs for the date/time of your flight.  Make sure the oops is because you're over the 24-hour period and not for some other reason.

Date/Time Input

Monday, April 22, 2013

java.lang.VerifyError with Java 7 and Cobertura

I just added Cobertura to a Java 7 project and was disappointed that my unit tests started failing with:
 java.lang.VerifyError: Expecting a stackmap frame at branch target blah...  
Looks like cobertura's byte code instrumentation is not compatible with Java 7.  Java 7 changed the class format with the addition of a stack map used for verification and cobertura hasn't caught up yet - if ever.

Oracle does provide a way around the problem by using the -XX:UseSplitVerifier VM option.  I added it as an argument to the surefire-plugin configuration in my maven pom file.
 <plugin>  
    <groupId>org.apache.maven.plugins</groupId>  
    <artifactId>maven-surefire-plugin</artifactId>  
    <version>${surefire.plugin.version}</version>  
    <configuration>  
      <argLine>-XX:-UseSplitVerifier</argLine>  
    </configuration>    
 </plugin>  

Wednesday, April 10, 2013

Simple fix to missing tools.jar in JDK on Mac OS X

Today I ran into a situation where a 3rd-party pom.xml had a dependency on tools.jar.  I'm stuck using Java 6, due to project requirements, which means I have to use the Apple supplied JDK.  The problem is Apple bundled all the classes normally found in tools.tar into classes.jar.  Since I couldn't modify the pom file, I simply creating a symbolic link to classes.jar.
 $> sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/tools.jar  
 $> sudo ln -s /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/lib  
Problem solved!

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: