erikwb.net Whatever escapes

Earth from Orbit 2012

Only NASA can produce somthing as gorgeous as this compilation of images of the earth. Let’s hope it’ll be just as beautiful next year.

Secure your Mac with Keycard

Image of KeyCard in action
You do password protect your Mac, don’t you? You don’t have automatic login, and you’ve set your computer to require password after sleep or screen saver kicks in? Right? That’s a good start1.

I often leave my Mac in the office whilst doing other stuff at work, and I don’t like the idea that someone might sit down and do things on my computer. I’ve come to the habit of invoking the screen saver with Alfred or LaunchBar (long time LaunchBar user, but trying Alfred 2 beta at the moment). Well, such habits are too easy to forget. Fortunately I came across Keycard.

Keycard connect with your iPhone or other Bluetooth device.. When leaving the office (with the phone in my pocket, of course), Keycard kicks in and locks my Mac. Upon return, Keycard detects the phone, and unlocks. Easy principle, and it works like a charm.

What if I loose my phone, or the batteries drain out? Keycard got you covered. You can set a 4-digit pin as a failsafe.

Keycard is available on the Mac App Store (Link to Norwegian App Store)

  1. Now go enable Filevault 2.

Invoke PopClip from the Keyboard

Image of PopClip in action

PopClip from Pilotmoon Software is a handy utility for working with text. PopClip appears when you select text with your mouse, much the same way as you see on iOS.

Now a pop up with cut, copy and paste wouldn’t be too much to be exited about, but PopClip can be customized with extensions. The selected text can be run through a plethora of services; text editing and transformation, web search, sending it to different applications, convert between html and Markdown and many more.

PopClip has quickly become one of my favorite utilities, the only problem being that it would only appear when you select text with your mouse. When writing, my hands are mostly on the keyboard, and text selections are done using the keyboard. PopClip does not appear when selecting text this way.

Fortunately, PopClip has AppleScript support, and the user guide states you can activate PopClip using:

tell application "PopClip" to appear

There are many ways to trigger this AppleScript. George Coghill shows one option using Automator and Services. I chose to use the exellent Keyboard Maestro. Create a new macro with the AppleScript action, and assign it a keyboard shortcut.

![KeyboardMaestro macro for invoking PopClip](/assets/img/20130310-km-macro-show-pop-clip.png “”)

Now whenever I select some text and press ⌃+⌥+P, PopClip appears, and I can use the arrow-keys and space/return to execute the action.

Some Defaults

Some settings I just like to apply on my Macs. There are lots of resources for finding these “hidden” preferences. A good place to start is Secrets. You can download a Preference Pane for easy access to tweaking your settings. An application like MacPilot can also be used.

The Pragmatic Programmers has also published Mac Kung Fu which contain a lot of defaults write tips.

Expanding the Save Dialog​

I just hate the collapsed Save dialog box. Enter this in the Terminal to make the expanded view default

defaults write -g NSNavPanelExpandedStateForSaveMode -bool TRUE

Expanding the Print Dialog

The same goes for the collapsed Print Dialog Box

defaults write -g PMPrintingExpandedStateForPrint -bool TRUE

The iCloud default

Apple’s iCloud is great for a number of things, and not so great for others. I don’t like saving my documents to iCloud (I use Dropbox instead), so making the default save location to not beeing iCloud, type

defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false

UTF-8 in Mail.app

I use Apple’s Mail.app. Back in the days I was a Eudora user, but I took the plunge to Mail.app in 2002. I’ve tried a number of other applications (Thunderbird, Entourage, Outlook, Postbox, MailMate), but I always return to Mail.app. As I often write in Norwegian (with æ, ø and å) to recipients on Windows, I tend to set the default text encoding in Mail.app to UTF-8.

defaults write com.apple.mail NSPreferredMailCharset "UTF-8"

St. Mary’s Square

St. Mary's Square, San Francisco

From a trip to WWDC i San Francisco in August 2006. I did a lot of walking in the mornings and afternoons, and came across these two ladies having a morning chat in St. Mary’s Square.

Created with SilverEfex Pro