Set Software Update Server
Works best when run as root using Sudo.
defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "<url/ip address>:<tcp port>"
Turn Off NFS Automounting
This fixes some login issues when binding to Active Directory in 10.4 and 10.5.
Source: http://www.afp548.com/forum/viewtopic.php?showtopic=17096#17440
`perl -p -i.bak -e 's/AUTOMOUNT=-YES-/AUTOMOUNT=-NO-/' /etc/hostconfig`;
Disable IPv6 on all network 802. based interfaces.
#!/usr/bin/perl
$ntwksetup = "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Content
s/Support/networksetup";
@services=split(/\n/,`$ntwksetup -listallnetworkservices | grep -e Air -e 'Built
-in Ether'`);
foreach $service (@services) {
print LOGFILE "Turning off IPv6 for $service...";
$result=`/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Cont
ents/Support/networksetup -setv6off '$service'`;
if ($result == 0){
print LOGFILE "Done\n";
} else {
print LOGFILE "\n*******Error********\n...$result\n\n";
}
}
SSH Tricks
Build a config file
SSH allows you to define a config file at ~/.ssh/config that you can use to set defaults for a variety of connections. I use mine mostly to define alternate ports and usernames for specific hosts:
Host hostname.domain.tld
User
Port
Enabling ssh known_hosts as auto complete entries
SSH keeps a list of known hosts and their associated keys in ~/.ssh/known_hosts. You can benefit from this by having bash index those hostnames as part of its autocomplete library:
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh
Now you can tab-complete hostnames!
source: Mac OS X Hints
Fix Tab-completion in >10.5
echo "set mark-symlinked-directories on" >> ~/.inputrc
the version of Bash included in Leopard and beyond doesn’t automatically add the / after symlinked directories, which i find stupid as hell. I complained about it to Apple and that’s what i got back from engineering as the fix.