Category Archives: Mac

Safari Extensions

or: the line between nifty and useful.

Safari 5.0.1 introduced, at long last, support for extensions. Naturally, I almost immediately downloaded a slew of the new toys to play with. In the interest of not overloading my browser with a bunch of marginally-useful gadgets, I uninstalled a good percentage of the candidate extensions after the obligatory test spin. What remains are the ones whose features I find useful on something resembling a regular basis.


This is quite possibly my single favorite extension, simply because it works so well across a wide swath of the web, and requires no special behavior on the user’s part. It detects when you’re viewing a page that’s part of a series and, as your scrolling nears the bottom of the page, automatically loads the next page and attaches it to what was previously the page bottom.

Imagine that you’re in a library reading a document written on a long scroll. AutoPagerize is like a silent but observant attendant who, as your eyes near the bottom of the unrolled scroll, discretely and unobtrusively rolls it out further. I’ve been using it for over a month now, and I still smile when I catch it in action.


Invoke Safari’s built-in View → View Source command, and you’ll be rewarded with a new window of monochromatic text. Invoke BetterSource by clicking its toolbar button, and you get a new tab of syntax-colored, line-numbered source code. If you ever need to debug a page, or are even just curious about its structure, this is the way to go.


It’s been a convention ever since the days when browsers first learned to load images — and yes, I’m old enough to remember those days, thankyouverymuch — to place those images in the upper left corner. As with many a convention, there’s no particularly compelling reason for it. It’s just what everyone else has done. CenterImages, as its name suggests, instead centers the image within the current browser window, placing it against a neutrally gray background for good measure. Maybe it’s not for everyone, but I find myself wondering why browsers haven’t always done it this way. A recent update adds the ability to contrast-enhance chromatically “flat” images.


At the risk of sounding like an Apple fanboy who does whatever Steve Jobs says to, I am not a huge fan of Flash, mainly because it tends to behave as though it’s entitled to all free CPU cycles, which it bloody well isn’t. Load more than a few pages containing Flash elements into separate Safari tabs, and you’ll find Flash bogging things down even when those Flash elements aren’t actively doing anything useful.

ClickToFlash doesn’t systematically block Flash, but it does prevent Flash elements from automatically launching upon page load, instead replacing them with placeholder images. Click on those images, and the Flash is loaded. It’s a good way of staving off Flash’s limitless CPU appetite without completely forgoing the use of sites that employ Flash.

As a bonus, it’s smart enough offer the option of replacing Flash-based movies with their H.264 counterparts on sites like YouTube, yielding improved video quality and reduced CPU usage at once. In addition, it lets you categorically permit or block Flash from different domains.

Flickr Original

When you’re browsing Flickr, it normally presents you with scaled-down thumbnail versions of large images, which is only reasonable: you don’t necessarily want to download the original 4000-by-3000-pixel version of every image as you’re perusing a library. Once you do find an image you like, though, the process of getting the original is a touch tedious. Click on the image in the photostream, then click on the image in the slideshow view, then click on the “View all sizes” button in the top right, then click on the “Original” link. Feh.

Flickr Original lets you sidestep all of that. It adds two options to the context menu that appears when you right-click on an image: View Original Flickr Image and Download Original Flickr Image.

It’s hardly something I use every day, but it is certainly nice to have when I need it.


The web has put us into contact with our fellow human beings as few innovations before it have. Unfortunately, this accomplishment comes with an unpleasant realization: most of our fellow human beings are egocentric, mean-spirited, borderline-illiterate morons, or at least choose, for some inscrutable reason, to behave as such while online. (Penny Arcade noted as much years ago.)

If you find yourself vaguely annoyed every time you realize that the interesting article you’re reading only occupies the first fourth or so of the page in question, the remaining three quarters consisting of variations on “first post!!!!1!”, “u r so gay!”, trolling, and similar noise, then perhaps you, too will appreciate ShutUp. It adds a toolbar button which lets you toggle the appearance of comments with a single click. This may only be further proof that I’m a snooty, short-tempered pedant, but I find myself appreciating its handiwork.

Ultimate Status Bar

This is a very simple extension which, when you hover your pointer over a link, tells you where that link will take you. “But wait,” you say. “Isn’t that functionality already built into Safari?” Well, yes. But Ultimate Status Bar knows a few tricks Safari has yet to learn, nicely summarized on its own page. My single favorite is its ability to expand the shortened URLs popularized by Twitter and its ilk. Its way of discreetly hiding when not in use is a nice bonus.

What the extension’s page will not tell you, but which is nonetheless true, is that its developers are some of the nicest people you will ever cross paths with online. I sent them an appreciative comment a while back, and they not only replied, but commented on portions of my blog they’d clearly read. I could not help but be pleasantly shocked.

Mac CLI Hacks

or: Just for the shell of it

These are probably not of any interest unless you’re the odd sort of mutant who is simultaneously a Mac fan yet relishes the power of the Bourne shell and its relatives. But since I am, and have a number of friends with similar tendencies, I thought I’d share.

First off, I have an external CD/DVD drive for ripping media, just because it tends to be both faster and less finicky than the MacBook Pro’s internal drive. Unlike the built-in slot-loading drive, it has a tray, and some combination of its design and the way it’s sitting on my desk is such that when the tray is open, the button is pretty much impossible to reach. So while it’s easy to open the closed drive, it’s not quite so easy to close it when open, regardless of whether or not it has a disc in the tray.

Yes, I know I could just shove the tray shut. But doing so’s always made me feel vaguely Neanderthal. I also know that It’s possible to use the built-in Disk Utility to this end, and that’s what I’ve done in the past. However, that means firing up Disk Utility, waiting a second or two while it surveys the attached-volume landscape, selecting the volume of interest from the list, and finally clicking the close button. A few more steps than I’d like.

Fortunately, as with most minor annoyances, I’m not the first one to encounter it. One David Morse came up with a solution to more-or-less the same problem. However, his solution actually involves more work, and is more configuration-specific, than necessary. The current version of drutil supports “Drive Selection Criteria”, meaning that if your target drive has a unique contribution of attributes, you can select it without having to obtain and then grep a device-list first. In my case, the drive I care about is the only external CD/DVD drive, so specifying “external” suffices.

function close () {
    drutil -drive external tray close

Still on my personal To-Do list: find a way to make this work within OnMyCommand, so that I can invoke it from within the Finder itself. Still, for now the one-liner is good enough.

Moving on, the Mac OS Finder lets you toggle the visibility of a file’s extension in various ways. (Cleverly, as is typical — if you try to rename a file within the Finder so as to remove its extension, the Finder simply hides the extension instead, so as to refrain from needlessly altering the system’s understanding of the file’s type.)

You can of course also toggle extension visibility using the Get Info/Show Inspector Options. Even so, there are times when you want to tweak the extension-visibility of a slew of items at once, and selecting the set from the Finder under such circumstances can be more than a bit exasperating. Fortunately, there’s a command-line tool that lets you manipulate a file’s extension-visibility, among other things: SetFile. This leads to two functions, one to hide an extension, the other to show it:

function hidex () {
    SetFile -a E "$@"
function showex () {
    SetFile -a e "$@"

("$@", complete with quotes, is your friend. Really. Failure to use it, particularly when attempting to manipulate files which have spaces in their names, is known to the State of California to cause cancer and reproductive harm.)