Entries from February 2007 ↓

The earliest pop-culture Peace Corps reference?

The Peace Corps is a household name. You can ask almost anyone in America if they’ve heard of it, and they’ll probably answer in the affirmative. I’ve always wondered how this small federal agency could have such a huge impact on American culture, but I think it comes down to three basic factors:

  1. It’s exotic. Although many have heard of the Peace Corps, most don’t know exactly what it’s all about. There seems to be a romantic stereotype that Peace Corps volunteers are sent to some tropical village to live in a mud hut and teach the natives animal husbandry or some such skill. (The reality these days is that volunteers are more likely to end up in a city teaching computer literacy, but the stereotype lives on.)
  2. It’s old. Established in 1961, America has had plenty of time to learn about the Peace Corps, and nearly 200,000 returned volunteers have had ample opportunity to spread the word around. In fact, the Peace Corps has been around long enough that it’s even had its own postage stamp.

    Peace Corps stamp

  3. Hollywood loves it. I suspect this factor has had the single greatest impact on making the Peace Corps a household name. I’ve lost count of how many references to it I’ve seen on TV and in movies, each one helping to cement a place for the Peace Corps in American culture. My favorite is this segment from the movie Airplane!.

Get the Flash Player to see this content.

Filmed in 1978, I had thought that Airplane! was perhaps the earliest pop-culture reference to the Peace Corps. Last week, when I happened to rent The Pink Panther from GreenCine, I discovered I was wrong.

Playing a supporting role in the film was Robert Wagner, better known to today’s audiences as Number Two from the Austin Powers series.

Number Two

In the scene below, note how Wagner casually mentions the Peace Corps. Moments later, David Niven enters and also drops the Peace Corps name as if it were common knowledge.

Get the Flash Player to see this content.

What shocked me about this scene was the date: The Pink Panther was filmed in 1963, just two years after the Peace Corps was established! It could very well be the first reference to the Peace Corps—ever—in mainstream popular culture. Perhaps even more surprising is how nonchalantly the Peace Corps is mentioned, as if everyone knows what it is.

So, contrary to what I had assumed, the longevity of the Peace Corps may have had little to do with its status as a household name. Judging by this clip, it became well-known almost as soon as it was created.

A set of scripts to unmount drives before sleeping

When I’m at home, my MacBook Pro is hooked up to an external display, a couple of hard drives, and other peripherals. When I need to go on the road, I put it to sleep, unplug all the peripherals, and away I go.

There’s only one problem: Unplugging a hard drive can corrupt its filesystem if it’s still mounted. To prevent that from happening, I wrote a script that automatically unmounts all drives. As an added bonus, the script fails if any of those drives are busy and can’t be unmounted, warning me to take additional action before hitting the road. Here it is:

tell application “Finder”
    eject (every disk whose ejectable is true)
end tell

In most cases, this simple script works great, but it suffers from a few drawbacks:

  1. It ejects not only hard drives, but optical discs as well, which is usually not what I want.
  2. It won’t eject remotely mounted drives, such as NFS or AFP mounts.
  3. It won’t work if Finder is not running, which may be the case for PathFinder users like myself.

To fix these issues, I split the script into two parts, one for local drives and one for remote drives, and I rewrote it so that optical discs would be left alone. Here’s the part that unmounts local drives:

-- Set this list to the names of the local drives
-- you want to unmount
set local_drives to [“Backup drive”, “Clone”]

repeat with drive in local_drives
   
   set drive to “/Volumes/” & drive
   set driveExists to false
   
   try -- Ignore AppleScript warnings
      do shell script “test -d ” & ¬
            quoted form of drive
      
      -- Test completed successfully; drive exists
      set driveExists to true
   end try
   
   if driveExists then
      -- Eject the drive
      do shell script "umount " & ¬
            quoted form of drive
   end if
   
end repeat

And here’s the part that unmounts the remote drives:

-- Set this list to the names of the remote drives
-- you want to unmount
set remote_drives to [“DreamHost”, “DOC”]

repeat with drive in remote_drives
   
   set drive to “/Volumes/” & drive
   do shell script “umount ” & ¬
         quoted form of drive
   
end repeat

I don’t eject optical drives, but if for some reason you need to do so, here’s how:

-- This will eject the optical disc in the
-- primary (built-in) drive
do shell script “drutil -drive 1 eject”

-- This will eject all discs in all optical drives
do shell script “drutil eject”

For a downloadable version of these scripts, see my AppleScript page.