Useful things to know

1. The utility “plutil” is a great way of validating the integrity of your property list (i.e., *.plist) files. Run it with the -lint option for best results.

2. OS X apps written using AppKit can be launched in such a way as to write to console the NSString objects that have not been localized, i.e.:


> /Applications/TextEdit.app/Contents/MacOS/TextEdit -NSShowNonLocalizedStrings YES

On my system, the above command results in:


> /Applications/TextEdit.app/Contents/MacOS/TextEdit -NSShowNonLocalizedStrings YES
2014-11-29 23:58:05.493 TextEdit[12330:507] Localizable string "648.title" not found in strings table "Edit" of bundle CFBundle 0x7fc3a86078d0 (executable, loaded).
2014-11-29 23:58:09.944 TextEdit[12330:507] NSShowNonLocalizedStrings=YES
2014-11-29 23:58:09.945 TextEdit[12330:507] NSCell: Drew non-localizable string "Plain Text Encoding:".
2014-11-29 23:58:10.062 TextEdit[12330:507] NSCell: Drew non-localizable string "Ignore rich text commands".
2014-11-29 23:58:10.063 TextEdit[12330:507] NSCell: Drew non-localizable string "Automatic".

Endian Byte Order in Objective C

    CFByteOrder order = CFByteOrderGetCurrent();
    switch ( order )
    {
        case CFByteOrderBigEndian:
            NSLog(@"Big");
            break;
        case CFByteOrderLittleEndian:
            NSLog(@"Little");
            break;
        case CFByteOrderUnknown:
            NSLog(@"Order");
            break;
    }

Erlang Mode for Emacs

I always forget this when moving to a comp, and it’s worth remembering:


(setq load-path (cons "/usr/local/lib/erlang/lib/tools-2.5.3/emacs"
load-path))
(setq erlang-root-dir "/usr/local/lib/erlang")
(setq exec-path (cons "/usr/local/lib/erlang/bin" exec-path))
(require 'erlang-start)
(defvar inferior-erlang-prompt-timeout t)

Of course, update “tools-2.5.3” with whatever is current on your system.