Tech Diary
Holy shift

Once you learn that shift/unshift are like push/pop on the other end of the array, you can mentally drop the ‘f’ from the name of the methods to remember which one ‘dumps’ elements and which one ‘inserts’ them. :)

Stack Overflow

Better than lsof

sudo opensnoop -n installd

git symbolic refs

are like dynamic tags — tags always reference commits but symbolic refs can reference other refs.

TodoTxtMac is a minimalist, keyboard-driven to-do manager for Mac OS X… that conforms to the todo.txt format spec.

GitPrep is Github clone. you can install portable github system into unix/linux. You can create users and repositories without limitation


  • / for files required at startup, /usr for files that are part of the operating system but not required for startup, /usr/local for files that are not part of the operating system
  • sbin (vs bin) for root-only programs
  • opt for self-contained programs

Gonna be using this to copy/paste code into emails.

Gonna be using this to copy/paste code into emails.

The way to make this less of an issue, at least when examining output, is to use something that prints escape codes instead of unicode. By the way, since no one has mentioned it, here’s why these variations exist:

  • - Use hyphens for hyphenated words, hyphenated line breaks, and grouping: follow-up, em-dash, heavily-affected servers.

  • − Use the minus sign for math. (Also see the multiplication sign ×.)

  • — Use em-dashes for appositives—kind of like this.

  • – Use en-dashes to indicate ranges: I’m free today 2–7am. Also, if you like spaces before and after your em-dashes, use an en-dash instead – like this.

The hyphen is the only ASCII character in this set, so it’s the one used in programming. If you want to convey meaning without typing special characters:

  • Use a single dash for minus (like in programming)
  • Use a single dash for ranges
  • Use two dashes for appositives

If you’re using a text preprocessor or autocorrect that “smartens” hyphens [exs], two hyphens usually becomes an en-dash and three becomes an em-dash.

[exs]: MS Word and

Recovery Partition

Creating a new Recovery HD volume

The Recovery HD volume is approximately 650MB, so to create a new Recovery HD volume, you must choose a volume on your disk that has at least 1GB of free space available. This documentation will refer to the chosen disk as the “donor” disk. No data will be harmed on the donor disk, it will simply be resized so some space can be allocated for the new Recovery HD volume. When you click the button to create a new Recovery HD volume, CCC will do the following:

  1. Unmount the donor disk
  2. Perform the equivalent of Disk Utility’s “Verify disk” tool
  3. Resize the donor volume to (size of the donor volume) - 1GB
  4. Create a new volume named Recovery HD using the 1GB of borrowed space
  5. Clone a suitable Recovery HD volume from another disk (such as the startup disk) or an archive of the Recovery HD volume onto the newly-created Recovery HD volume
  6. Remount the donor volume

When the task has completed, the Recovery HD volume will not be mounted on your Desktop, nor will it appear in Disk Utility (it’s a very special, very hidden volume!). You can verify the functionality of this Recovery HD volume by holding down the Option key on startup, then selecting the Recovery HD volume as the startup disk.

/usr/sbin/diskutil unmount /dev/disk?s?
/usr/sbin/asr adjust --target /dev/disk?s? -settype Apple_Boot