Side Project: Slotted Pig ¬
2008-08-25
This weekend I whipped up and launched a new side project: Slotted Pig.
I’ll be regularly posting about my quest to get out of debt and what I’m learning on the way. I’ll highly encourage discussion along the way because what works for me may not work for everyone and I’d like to hear what others are trying.
Sysmon Startup Item with Leopard Launchd Support ¬
2008-08-20
I’ve been sitting on, and tweaking infrequently, a launchd plist for Mac OS X 10.5 Leopard (and Server, of course) for launching the Sysmon daemon at boot and keeping it running. Well, it’s time to release it out into the wild, so without further ado:
This is an update to my Sysmon StartupItem in that I’ve rewritten the install script to install either the StartupItem or the launchd plist file where appropriate (utilizing the little trick I wrote about a few days ago), plus updates to the documentation and such. It should support Panther & Tiger via the StartupItem and Leopard via the launchd plist. Of course, more details and previous versions can be found on the Development page.
Let me know how it goes if you use it.
Securing Mac OS X Leopard (10.5) White Paper [PDF] ¬
2008-08-20
[A]n updated version of the Securing Mac OS X Tiger (10.4) and includes the new security features offered by Mac OS X Leopard (10.5).
Considered a must-read in addition to Apple’s documentation. Previous versions can be found on Corsair’s Technical White Papers page.
[Via TUAW]
Testing the OS Version on Darwin/Mac OS X in bash ¬
2008-08-14
I’ve been updating an installer bash script that needs to install different files depending on the version of Mac OS X (and Darwin, for that matter) that the machine is running and so set out to find the easiest, most straightforward way to check the OS version.
Of course, the hostinfo command shows you most of the juicy details one would need, but it’s not worth trying to parse it. sysctl lets you query various kernel states, including the OS release version:
sysctl -n kern.osrelease
Which will spit back something like the following (on Mac OS X 10.5.4, in this example):
9.4.0
This is the Darwin release number. To convert a darwin release version number to a Mac OS X version number just subtract 4 from the major revision (9, in this case) and then prepend the ’10.’ to the entire thing. So, 9.4.0 becomes 10.5.4.0.
You can also use uname -r to get the OS release version, but I’m going to stick with sysctl for now.
Of course, you can’t do a direct comparison, so you’ll want to compare either the major or the minor revision (the last release field is always zero, so it can be ignored). The easiest way to do that is to pipe the output from sysctl through the cut command.
The following will give you the major release number (again, 9, in this case):
sysctl -n kern.osrelease | cut -d . -f 1
It cuts the output of sysctl on the ‘.’ delimiter and returns the first field. We can return the second field (the minor revision; 4, in our example) like so:
sysctl -n kern.osrelease | cut -d . -f 2
In my script, I simply needed to test if the machine was running Tiger or earlier, or Leopard or newer. Here’s a quick example of getting that functionality:
#!/bin/bash
if [ `sysctl -n kern.osrelease | cut -d . -f 1` -lt 9 ]; then
echo "Tiger or earlier"
else
echo "Leopard or newer"
fi
If you’re doing something more advanced, it might be easier to set variables first:
darwinos_major=`sysctl -n kern.osrelease | cut -d . -f 1`
darwinos_minor=`sysctl -n kern.osrelease | cut -d . -f 2`
Then just reference $darwinos_major & $darwinos_minor whenever needed.
How To Tell People They Sound Racist ¬
2008-08-01
The most important thing that you’ve got to do is remember the difference between the “what they did” conversation and the “what they are” conversation.
[Via Laughing Squid]
The Tesla Roadster's Touch-Screen Interface ¬
2008-08-01
CNET’s quick little video that demonstrates the Tesla Roadster’s touch screen interface. Especially noteworthy is the following tidbit:
It also lets people schedule the charging for late at night, when rates can be lower because demand on the power grid is lower[…]
[Via engadget]
Ultimate Aero EV Electric Supercar ¬
2008-07-21
The Ultimate Aero EV, one of the first ‘green’ supercars, will begin testing in February next year and is expected to be in full production by the fourth quarter of 2009. “I think we can do it faster, leaner and cleaner than any other manufacturer,” said SSC founder Jerod Shelby, who incidentally bears no relation to legendary race driver and sports car developer Carroll Shelby.
Just in case the Tesla Roadster wasn’t nearly expensive enough or fast enough for your taste. Of course, a little competition in the market is welcome.
While final specifications are yet to be fully disclosed, the company claims the drive train under development employs a revolutionary new technology that will allow the car to travel for extended periods – years, in some cases – without needing to be recharged.
Call me skeptical, but this sounds just a little too much like a generator-on-the-wheel plan to me. One would hope, for their sake, that they’re referring to the need to be plugged in and are looking at onboard electricity generation like solar.
[Via engadget]

