Monday, December 8, 2008
MenuMeters & Text
Wednesday, November 19, 2008
Open in Terminal (4 Ways)
One of the cool little helpers I talk about in The Productive Programmer is "Command Prompt Here" or "Bash Here": little context menu items for Windows that allow you to select a folder in Explorer, right click, and open a command prompt (or bash shell, if you are using Cygwin) at that location. Someone recently asked me if you can do this on the Mac, and it turns out you can, in a surprisingly large number of ways.
The first way leverages Automator to create a little script that makes an Automator plug-in for Finder. This trick appears here. The cool thing about this tip is the stuff it teaches about building Finder extension via Automator, which is a pretty cool subject unto itself. However, the bad thing about the final solution proffered by this tip is the location where the context menu appears: 2 levels down in the right-click menu, under Automator. Too much clicking.
Not being satisfied with the above, I found an alternative, which creates a toolbar icon at the top of Finder that opens the current selected folder (or the folder of the currently selected file) when you click on it. This trick appears here. The only downside of this version is the number of windows it spawns: one per request, instead of opening new tabs (it was created before Terminal supported tabs in Leopard). So, not to be outdone, the author describes the steps to upgrade it to tabbed terminal in Leopard here. One gotcha exists in his instructions: he says to replace the original script with the one found on this page, but I assumed you could do that with a text editor. It turns out that you need to use the script editor that launches when you double-click the main.scpt file. Otherwise, it works like a charm.
The reason I haven't pursued this before on the Mac? I generally use PathFinder, which includes not only a context menu for "Open in Terminal", it also has an embedded Terminal, which opens in the current folder. Highly recommended, but it you don't want to spend the money, you can get the same effect by harvesting the links in this entry.
Tuesday, August 19, 2008
The New Backup Strategy
- I had to handle the "package" files (the ones created by Apple iWork, like Keynote and Numbers) files specially, because Subversion didn't like the way the applications managed the contents. Basically, I had to zip/unzip them for version control. This wasn't terrible (I automated the process to a large degree), but still a little annoying.
- My Subversion repository was huge, because I had my entire Documents folder in it. However, most of the documents were there just so that I could have a backup, not because I wanted to version them. The only files I really versioned where the source files and related content.
- I want the hourly, behind the scenes backup provided by Time Machine.
- I want to be able to browse backwards in time to look at previous versions of those files, and the Time Machine UI is gorgeous for that.
- Time Machine alone isn't sufficient. To restore from Time Machine, you have to boot your machine from a startup disk, then restore the backup. Yuck! I still like SuperDuper's snapshot approach, which I've proven to myself works flawlessly (see Don't Crack Open Your Mac for the story).
- SuperDuper and Time Machine can share the same drive, so I have a single 500 GB drive that has all my backups on it.
- It's now easier to replicate the source code in more places (IOW, more machines) because it's much smaller.
- You can tell Time Machine to only backup certain directories (or, more specifically, exclude directories you don't want backed up). Because I only use Time Machine for my Documents folder, it takes only a little space.
- Because SuperDuper creates a bootable drive image, and my external drive is FireWire, I can boot another MacBook Pro with the external drive. Yes, it's slow, but if the worst happened while on the road, and I've got to present at a conference, as long as I can borrow/steal another machine, I can boot into my machine from backup and do my presentation.
Monday, August 11, 2008
Keyboard Zoom
This works well because almost all Mac applications include the Zoom menu item on the Window menu.
Thanks, Jack.
Thursday, August 7, 2008
Quick Blank
The keychord CTRL-SHIFT-EJECT instantly blanks the screen, without invoking the screen saver. It's just instant blank. Note that it will not lock the screen if you have passwords turned on for the screen saver, it just makes the screen blank. Still, pretty cool.
Saturday, August 2, 2008
Keynote Mode for Keynote
The other settings appear on the the Slideshow Preferences dialog, shown here:
This is the dialog that controls Keynote's projection options. The important options here are the Allow Epose, Dashboard, and others to use screen, which allows you to see the mouse cursor and interact with the screen even when slides are showing, and the Present on secondary display, which uses the projector (i.e., the external monitor) to show the slides.
There are a couple of caveats to using Keynote mode. First, you must un-mirror your display (found on Display Preferences, under System Prefereces). I usually use the option in Display Options to place them on my menu bar, so that I have easy access to the Display Prefereces. When you un-mirror your display, it is exactly the same as using an external monitor. That means that you can't really do code demos and such unless you want to look over your shoulder. That's why most of my slides how have source code embedded on the slide, so that I can use Keynote mode.
Wednesday, July 23, 2008
Quick Sleep
But I recently ran across a better combination: Apple-Alt-Eject provides instant sleep (the Eject key is the one that ejects CD's, just above the delete key). One keyboard chord, and I have a sleeping laptop. I love it when I can cut a 2-step process down to a single keychord!