Aug 092012
 

Given a working Perl 5.12 install (via MacPorts), doing a sudo port install perl5.16 does not update the perl symlink:

% ls -alF /opt/local/bin/perl
lrwxr-xr-x 1 root admin 8 Jun 6 15:19 /opt/local/bin/perl@ -> perl5.12

The magic incantation is to install a the perl5_16 variant of the perl5 package:

sudo port install perl5 +perl5_16

With this done, the symlink is updated and perl loads the expected version.

% ls -alF /opt/local/bin/perl                                                                                                    
lrwxr-xr-x  1 root  admin  8 Aug  9 12:45 /opt/local/bin/perl@ -> perl5.16
% perl -v
This is perl 5, version 16, subversion 0 (v5.16.0) built for darwin-thread-multi-2level
Mar 282012
 

There are two tricks to using VNC from a non Mac to connect to a Mac running OS X Lion.

  1. Turn on the VNC server by enabling System Preferences -> Sharing ->  Screen Sharing. Even though it provides little security, a VNC password must be set so that OS X will present an authentication scheme that makes sense to a standard VNC client. Enable “VNC viewers may control screen with password
  2. After connecting, you will see a grey linen-backgrounded desktop with nothing in it. Type your user name and password. After logging in, your desktop contents will display!
Mar 022012
 

Starting with OS X Lion, holding down a key will bring up a menu of alternate characters rather than repeating the key. (This is a feature). There are many tips on how to re-enable key-repeat globally. But you can also control the behavior per-application (thanks, Egor Ushakov). This is handy for e.g. IntelliJ or RubyMine, or any other app that provides Vim-style keyboard bindings. The magic commands are:

% defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool false
% defaults write com.jetbrains.rubymine ApplePressAndHoldEnabled -bool false

But how do you figure out what the magic identifier for your application is? Simple: defaults domains will list them all:

defaults domains | gsed -e 's/, /\n/g' | grep jetbrains
com.jetbrains.intellij
com.jetbrains.intellij.ce
com.jetbrains.rubymine
jetbrains.communicator.core

Note that in order to munge the commas into newlines for grep, gsed was required because OS X default sed cannot (easily) insert newlines.