MacBook 5.1

Reinstall SnowLeopard

1 - Eject stuck DVD

$ drutil tray eject;

2 - Create subdomains

Not so far…

3 - Grep only certain files

$ find . -name 'devise.rb'|xargs grep 'Devise.secret_key';

Much faster than:

$ grep -r 'Devise.secret_key' *;

$ grep -r –exclude='*.log' 'spree_bsc' *;

3b - Grep hidden files

$ grep -i path .*

4 - Vi

5 - Package management systems

5c - Homebrew auto-updates

Homebrew auto-updates (github.com/Homebrew/brew/issues/288)

but 1.1.0 requires CLI > 4.0 (github.com/Homebrew/brew/commit/4015d0465a975aaac26d5a47395ab61e29d1702f)

In order to keep SnowLeopard running a bit longer (although the death-sentence is looming…)

5c - Homebrew docs

(See 10 - Open file from Terminal)

5c - Homebrew commands

6 - Nested backticks

Use $(command) rather than `command`

eg:

$ pushd $(dirname $(which rails));

7 - Share files with linux

Accessing OSX fs from linux

(15/5/16)

Accessing linux fs from OSX

(4/11/16)

(osxdaily.com/2014/03/20/mount-ext-linux-file-system-mac/)

(github.com/alperakcan/fuse-ext2/issues/35#issuecomment-258617429)

8 - Booting MacBook 5.1 into 64-bit mode

(21/5/16)

Check whether EFI can boot 64-bit kernel:

$ ioreg -l -p IODeviceTree | grep firmware-abi
  | |   "firmware-abi" = <"EFI64">

Only MacBook “Pro” supports ability to boot 64-bit kernel with 64-bit EFI

macperformanceguide.com/SnowLeopard-64bit.html

forums.macrumors.com/threads/64-bit-kernel-macbook-5-1.1184959/

http://dl.dropbox.com/u/35856129/x64patch-10.6.8.tar.bz2

$ cd ~/Downloads/x64patch-10.6.8 ; more readme.txt

System Software Overview:

64-bit Kernel and Extensions: Yes

Holding down 3 + 2 until Apple appears gives:

64-bit Kernel and Extensions: No

9 - Disk commands

(14/11/16)

10 - Open file from Terminal

(11/12/16)

Like double clicking in Finder:

$ cd `brew --repository`/docs
$ open brew.1.html

11 - Time of suspend/wake

(2/4/17)

$ grep SleepWakeCallback /var/log/system.log
$ bzcat /var/log/system.log.*|grep SleepWakeCallback