Mar 10

Are you curious, like me, about the new Single Window Mode (most excellent; see this article at Ars for more details) available in the newest unstable 2.7.x GIMP releases? Well, sadly, the final and stable GIMP 2.8 release won’t come out before the end of this year, and there are still no experimental 2.7.x binary releases available for Mac OS X (via X11). One could always try to compile everything from source, but that might be quite complicated and time-consuming.

So, let’s look at another, definitely easier way of running GIMP 2.7.x on Mac OS X: not (semi) natively through X11, but through virtualization. First of all, we need a virtual machine with the latest Ubuntu 9.10 (Karmic), or even 10.04 (Lucid, in Alpha at this time) installed: you can create a 32- or 64-bit Ubuntu VM in…

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 10

I have several sites that I access on both my iPhone and desktop, so I like to have quick access to them via the Bookmarks Bar. However, these sites have different versions for the desktop, for mobiles, and, in some cases, yet another version for the iPhone. Usually, the full version doesn’t work so well on the iPhone, and the iPhone version is undesirable on the desktop.

Instead of creating a plain bookmark, a little Javascript can make a bookmark context-sensitive, and allow you to have one bookmark that opens the right version of a page, depending on which platform you’re browsing from. The basic idea is to use some client-side Javascript to check the browser’s platform (a.k.a. operating system), and then tell the browser to access a URL based on that check.

The code looks like this:

javascrip...

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 10

Two poll updates today. First, I’ve posted a new poll about the mix of Macs you’re presently using — Intel (via Apple), Intel (via build-it-yourself), PowerPC, or some mix of the above. I’m curious to see not only the mix of Intel and PowerPC, but how many are using self-built Intel powered Macs.

The second poll update is that the iPad interest poll has now closed, with just over 10,000 votes. Of those who voted, nearly 44% are planning on buying iPad 1.0 when it comes out in April, with a virtual tie (two votes’ difference) between then cheapest and the most expensive versions for the most-popular spot (11.3% each). In total, Mac OS X Hints readers will be buying at least (as the poll didn’t allow for more than one purchase) $2.92 million worth of iPads!

An additional 29% claim they’ll buy the second gen…

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 09

At my office, I needed to find a way to turn of the wireless network when someone plugged in their network cable. I also did not want them to be able to turn the wireless network back on until the network cable was unplugged. I came up with the fallowing solution.

I created a launchDaemon called com.companyname.ethernetmonitor, and saved it in /System » Library » LaunchDaemons:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.companyname.ethernetmonitor</string>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/CompanyName/turnOffAirp...

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 09

Frequently we need to clean a directory before zipping it or copying it to an external USB drive to be used by Windows or Linux users.

Apple Finder has the custom of populating directories with those unavoidable .DS_Store files, volumes with .Trashes, and some files (especially pictures) with ._resources. The following interactive script will safely remove these files prior to copying.

#!/bin/sh
# bash script to clean (delete) Finder .DS_Store, .Trashes and ._resources
# Use cleandsstores.sh
# juanfc 2010-03-06

if [ $# != 1 ]
then
echo "ERROR: use\n\t`basename $0` dirtoclean"
exit 1
fi

res=`find "$@" \( -name ".DS_Store" -or -name ".Trashes" -or -name "._*" \) -print`

if [[ -z $res ]]; then
echo "nothing to delete"
exit 0
el...

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 08

I use a couple of shell scripts that use Growl to remind me to run SuperDuper backups. The first script (backupcompleted) is set to run after each SuperDuper backup. It writes a timestamp into an invisible file called .lastbackup in my home directory; here’s the script:

#!/bin/bash
# This script is run by SuperDuper each time a backup is completed.
date "+%s" > ~/.lastbackup

The second script (lastbackup) reads the .lastbackup file and calculates the time elapsed. It takes one argument: the desired number of hours to wait before showing an alert.

If the elapsed time is greater than the time suppled to the script, it shows a Growl notification. If the elapsed time is greater than twice the time suppled to the script, it also increases the priority of the alert (so you can set a diferent colour for it in Growl preferences). Here’s the script:

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 08

Snow Leopard only hintMost of us know that Quicktime X, included with Snow Leopard, can trim movie and audio files. However, this trim is less than precise, as you cannot specify an exact trim start and stop point. Worse yet, if you want to make 10 minute segments for YouTube, you have to write down the last trim end time, undo the previous trim after uploading, and hope the trim slider will let you select the same trim point to start your next clip. What a pain.

Enter AppleScript — trim is a scriptable function. Open your movie in Quicktime X, and open the AppleScript Editor in the Application » Utilities folder. In the AppleScript Editor enter this script:

tell application "QuickTime Player"
  activate
  trim document 1 from start_trim to end_trim
end tell

Replace start_trim and end_trim with the time, in seconds, at which you wish …

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 08

Over the weekend, I plugged in my old-style 80GB iPod for the first time in, well, a long time — so long that the battery needed to be charged a bit before it would even sync. Once the sync started, things seemed to go well, but near the end of the photos section, iTunes displayed a message telling me there wasn’t enough room to copy all my photos.

This was a bit odd, because best as I could recall, my iPod had about 20GB of free space the last time I synched. And while it had been a while, there’s no way I took enough photos to fill 20GB — especially at the iPod’s resolution (I don’t sync full-sized copies).

I noticed that the Other (orange) section of the Capacity gauge in iTunes was huge — basically all the remaining space was used up by Other. Switching to the Finder, I quickly scanned through the various folders with the Inspector open (Command-Option-I), and they all looked normal in size … until I got to Photos » Thumbs. This one was over 20GB! G…

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 05

I bought a new iMac and went crazy with Faces in iPhoto. Two days later I had a lot of tagged photos in Faces. Then I noticed that since I synced my Address Book with Google Contacts, Address Book entries were appearing as suggestions in Faces.
<br><br>
I didn’t want to re-tag all my existing Faces photos, but there didn’t seem to be an obvious way to link a new Address Book contact to an existing Face. So I took the only honorable course of action and starting messing around.
<br><br>
I discovered that you can transfer a Faces collection to an Address Book contact very quickly.
Assume you’re working on John in your Faces collection, who has the entry John Doe in your Address Book. Go into Faces and pick any photo of him, double-click to view it and then click name. Start retyping John and John Doe should be one of the suggested values, with an Address Book icon next to the name. Click to select it.
<br><br>
Go back to the Faces cork board and you…

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

Mar 05

Snow Leopard only hintIf you regularly use a language that requires letters with diacritics — such as á, ä, é, ë, í, ã, ñ, õ, etc. as they are used in Spanish, French or Portuguese — and you recently switched from Windows to Mac OS X as I have, you might find this hint useful.

In Windows, while there were various ways to enter these characters, the best one of them was just to enter a and then the vowel, and you would get the accented version of that letter (in this example, the letter with the acute diacritic).

In Mac OS X however, if you set the keyboard layout to a language that has these letters (such as Spanish), you cannot use this trick; the only way of inputting these letters is the standard way supplied in Mac OS X (Option-e then e for é; Option-e, then i for í; etc.). I personally found this very annoying, and searched for…

Add to digg
Add to Reddit
Add to Slashdot
Email this Article
Add to StumbleUpon



Go to Source

preload preload preload