Associative References in Objective-C

This is some preamble. ...

Feb 19, 2012 · 2 min

Transferring Preview app signatures in Lion

Lion introduced a great new feature that allows you to capture your signature via an attached camera and store it in an encrypted form for later use. Therein lies the problem; you must have an attached camera. I have a Mac Pro, and wanted to use the signatures I captured on my Macbook Pro. Following these steps, you can transfer the encrypted signatures over. On your machine endowed with the power of sight: ...

Aug 3, 2011 · 2 min

Eval Expression service for OS X

Eval Expression is a Mac OS X service to evaluate the selected text of any text field as a Ruby expression. My instinct was to choose Perl, however Ruby offers binary in addition to decimal, hex and octal numerical literals. The service becomes infinitely more useful if you assign it a global shortcut in Keyboard preferences. In my case I assigned a combination that seemed obvious, ⌘= It came about as I was working on some layout in Xcode 4 / Interface Builder, and needed to adjust the Y position of a view by a specific number of units. I’m lazy, and figured the computer should do the work, so I typed 768-35 and tabbed out. Unlike Acorn and Opacity, which evaluates the expression in numerical entries automatically, Xcode simply complained. Not happy, I created this service and it works like a charm. Some examples: ...

Apr 9, 2011 · 2 min

Renew Apple developer certificates with OpenSSL

I like to reuse the same private keys when generating a signing request to renew my Apple developer certificates. Unfortunately you can’t do this with Keychain Access, as it won’t save the signing request file after you step through the wizard. OpenSSL is your friend. Open Keychain Access, RMB on the key your wish to use and click Export “[Key Name]”. Save it as a .p12 file with a strong password. In my case it was StuartCarnie.p12. ...

Feb 2, 2011 · 1 min

Xcode Tip: Generate comments in your assembler output

To make it easier to find the assembly generated when you ‘Show Assembly Code’, embed comments using: asm("# your comment")

Mar 7, 2009 · 1 min