downgrade safari 5.1 to 5.0.x on lion 11. Oct 2011
If you want to downgrade Safari 5.1 to Safari 5.0.x on Lion you can download Safari 5.0.3 from the original Apple servers and extract just the Browser with Pacifist. The installation image is called Safari5.0.3SnowLeopard.dmg but it works just fine on Lion. Have fun!
recursive chmod and chown on files 07. Oct 2011
If you want to recursively apply permissions to files it’s best to use GNU parallel because it handles obscure filenames robustly:
find directory -type f | parallel -m chmod mode
If you want to change ownership of the files, you can use a root subshell:
sudo bash -c "find directory -type f | parallel -m chown user:group"
floating point bash calculator 30. Sep 2011
$ alias calc='bash -c '\''set -f; echo "scale=3;$0 $@" | bc -l '\'
$ calc 4/3
1.333
tell lions resume feature to go to hell 28. Sep 2011
rm -r ~/Library/Saved\ Application\ State/*
chmod -w ~/Library/Saved\ Application\ State
make ard work with dynamic dns 22. Sep 2011
With its default settings Apple Remote Desktop doesn’t play well with dynamic DNS services. If you add a domain with a dynamic IP address it retrieves the IP address only once and if the IP address changes, the connect fails. A temporary workaround is to remove the IP address from the computer information window or to remove and readd the computer, but that certainly sucks for the long term.
A permanent solution is to disable reverse IP lookups:
defaults write com.apple.RemoteDesktop \
DisableReverseIPLookup -bool yes
Now Apple Remote Desktop will update the IPs upon launch.