Monthly Archives: June 2007

PowerBook AC adapter extension cords

One of the annoyances of moving a laptop between home and work is having to plug the AC adapter into the wall outlet (which is often inconvenient to reach). You get one 6′ cable with the AC adapter and a “wall adapter” plug so it is feasible to leave the AC cable plugged in at one location and use the wall adapter at the other. But what if you need to plug in your PowerBook on the road?I found that you can use this RadioShack cable, model 61-2876 as a replacement for the Apple AC cable. It’s thinner so it’s easier to pack, and it’s quite cheap (I think I paid around $5 when I bought it at a retail store). You just plug it into the AC adapter, and it works. YMMV.One time I misplaced my Tivo’s power cable, and I found that RadioShack also made a power cable that had the right connector (I can’t remember the part number). A lot cheaper and easier to get it from RatShack than to mail order it from Tivo or someone else. 

Wind Power vs. Fossil Fuels

I heard about this MS thesis by Christina M. Jarvis from the University of Delaware that compares the wildlife impacts of wind power to a coal-fired power plant. It finds (unsurprisingly) that wind is far better for wildlife than coal. I wonder how long the “wind power kills birds” meme will continue?

HECO IRP session on Global Warming

Last Friday I attended HECO’s Integrated Resource Planning Advisory Group Technical Session on Global Warming. There were a variety of presenters talking about economic, environmental, and social aspects of global warming.One striking presentation was by Chip Fletcher that discussed the impact of global warming on Hawaii’s coastline. He said that planning for a 1 meter rise in sea level by the end of the century is a conservative estimate (this is a combination of sea level rise and the effects of heavy rains). He had some compelling slides showing what would be underwater with a 1m rise, including parts of the Campbell industrial area, downtown Honolulu, and Waikiki. Unfortunately, the presentation isn’t available on HECO’s site yet, but this Honolulu Advertiser story has one image at the end. He also says that Hawaii’s beaches will be gone for the most part by the end of the century, which is sobering.A couple of other tidbits: a presentation by DBEDT’s energy group estimates that Hawaii’s greenhouse gas emissions increased by 7.5% from 1990 to 2005. The at which people recycle beverage containers is closely related to how big the deposit is on them. That’s not too surprising, but apparently Germany has a deposit of $0.25 € (US $0.33 today) and their recycling rate is close to 100%!

Securing MySQL for development

When developing in Rails, the canonical thing to do is to have a root MySQL account with no password. While this makes the Rails configuration automagic, it leaves things somewhat open because MySQL accepts TCP/IP connections by default. Note that this is separate from the webserver hosting the Rails application on localhost. It turns out that MySQL has a nice command line option --skip-networking, which will turn off all TCP/IP networking. Database connections from the local webserver will go through a Unix socket, so they will continue to work and that’s all you need for development.

I installed MySQL using the MySQL AB official binary distribution. However, I have been starting and stopping MySQL using the conveniently supplied panel for Mac OS X System Preferences, thus preventing my from adding any command line arguments. After some fiddling, it turns out that the preference panel is just calling the shell script /usr/local/mysql/support-files/mysql.server. This file (or one of the scripts that it calls) will read ~/.my.cnf or /etc/my.cnf for MySQL configuration options. To make it work with the pref pane, I had to put the following options in /etc/my.cnf:

# MySQL options file
# turn off all networking, for safety during development

After that, MySQL is no longer listening via TCP, as confirmed with CocoaMySQL’s Show Variables, and via netstat -a. I feel safer already. 🙂

Google Gears

Google just released a beta version of Gears, which is a plugin for Firefox that allows web applications to work offline. It even synchronizes data manipulated offline when you go back online. Not sure if there is an immediate Hackystat application. 

New MacBook Pros released

As expected, Apple released the new MacBook Pros today. Mostly they have faster CPUs, can expand to 4 GB of RAM, and have LED backlights (no mercury, theoretically longer battery life).

Also as expected, Apple’s Back to School promotion started today. Buy a new Mac, get a $199 rebate on an iPod (which means you can get a free 4 GB iPod nano).

I made a spreadsheet on price comparisons (done with Google Documents). Sadly, the hosted version of WordPress (which I use for this blog) does not allow iframe tags, so I cannot embed the spreadsheet directly in this entry.

So it looks like the cheapest is the student developer deal by about $70, though that involves more hassle. However, if I choose not to get an iPod nano then the developer deal is substantially better (free nano is only for educational purchases). Also with the developer deal I can customize the MBP, upgrading to a 7200 rpm drive for $120, which is not possible through the bookstore.

I guess I’ll wait to see what next week’s WWDC has in store, since I’m not in a rush.