http://etoileos.com/dev/docs/languages/obj-c/
To disable Macbook from automatically waking when screen is opened. Wise idea in case of inadvertant trigger while laptop is in bag, etc.
sudo pmset -a lidwake 0
For Leopard only. In terminal:
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
The default rsync will not include Mac metadata when the destination host is not using HFS+ as its filesystem. rsync+hfsmode will automatically create resource forks for the metadata and store them as dot files at the destination.
To backup:
$ rsync-hfs --archive --delete --verbose --hfs-mode=appledouble --delete-excluded \\
--exclude=.Trash --exclude=Cache --exclude=Caches source dest
To restore:
$ rsync -avz source dest
$ /System/Library/CoreServices/FixupResourceForks dest
Enable X11 forwarding by uncommenting the X11Forwarding field and setting the value to yes in /etc/sshd_config
In Leopard, enable option is under Edit menu in Directory Utility.app. In Tiger, under Netinfo Manager.app, go to Security→Enable Root User.
To set hostname, in /etc/hostconfig, change HOSTNAME=-AUTOMATIC- to HOSTNAME=host.domain.
To change DNS resolution order:
$ mkdir /etc/lookupd
$ echo LookupOrder FFAgent CacheAgent DNSAgent NIAgent DSAgent >/etc/lookupd/hosts
To add hostnames to NetInfo database:
http://docs.info.apple.com/article.html?artnum=301073
Can choose JRE version with /Applications/Utilities/Java/J2SE 5.0/Java Preferences applet
To change the native JDK used, as root:
$ cd /System/Library/Frameworks/JavaVM.framework/Versions
$ sudo rm CurrentJDK
$ sudo ln -s 1.5 CurrentJDK