Tech Diary
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

distinctions

  • / 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

http://askubuntu.com/questions/130186/what-is-the-rationale-for-the-usr-directory

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

http://markup.su/highlighter/

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

http://markup.su/highlighter/

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 http://daringfireball.net/projects/smartypants/

Recovery Partition

http://bombich.com/software/docs/CCC/en.lproj/advanced-strategies/the-disk-center.html

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.

http://automatica.com.au/2013/11/hide-recovery-hd-after-cloning-an-os-x-installation/

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

checking if -1:

wordList.some (word) -> ~tweet.indexOf word

~ is not a special operator in CoffeeScript, just a dirty trick. It is the bitwise NOT operator, which inverts the bits of it’s operand. In practice it equates to -x-1. Here it works on the basis that we want to check for an index greater than -1, and -(-1)-1 == 0 evaluates to false.

I just went to a conference and it was bad. I forgot the names of people I met not more than 15 minutes later. I felt terrible that I didn’t know their name while they knew mine.

Do you all know of any good tips for remembering names?

screen as a ssh-oops prevention tool
  • screen starts a new virtual screen session
  • screen -list lists virtual screens
  • ^A, D disconnects the current screen
  • screen -d -r <screen name> reattaches (-r) to a screen after disconnecting it from its current terminal, if one exists (-d)

Screen supports logging, but on multiple machines it can get weird. Might be better to use > redirection from inside screen. Advantage is that the output file can be tail -f'd from outside screen.