How to Reset Dock Items in Mac OS X
Your Dock is meant to be customized, so don’t worry about removing items.
If you do want to reset the Dock to its original configuration, launch Activity Monitor and navigate to ~/Library/Preferences/ in the Finder. Trash com.apple.dock.db and com.apple.dock.plist, then immediately quit the Dock from Activity Monitor.
You do this all at once with this command line (but note that it will delete the files instead of trashing them, so it is not reversible):
rm ~/Library/Preferences/com.apple.dock.{db,plist}; killall Dock
How to Enable TRIM Support For All SSDs in OS X Lion
Ever since the release of OS X 10.6.8, Apple has been selectively enabling the TRIM command for SSD’s in OS X. This support continues on on Mac OS X Lion, but as many have noted, it only seems to work for Apple SSDs. Here’s how to enable TRIM across the board:
The TRIM command is an important disk command for SSDs that keeps your flash memory appropriately cycled so that you can achieve faster read and write speeds, as well as a longer lifespan for your SSD. As such, TRIM support is not the trivial matter that some make it out to be (although certain manufacturers, such as Other World Computing, include firmware that eliminates the need for OS-level TRIM support).
In you have an SSD that supports TRIM, and you’re running OS X 10.6.8 or Lion, follow the below instructions to enable TRIM. Note: This involves the use of terminal commands, so proceed at your own risk.
Backup the file that you’re about to patch:
sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /IOAHCIBlockStorage.original
Patch the file to enable TRIM support:
sudo perl -pi -e ‘s|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg’ /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
Clear the kext caches:
sudo kextcache -system-prelinked-kernel sudo kextcache -system-caches
Important: reboot your Mac!
To disable TRIM support in the future:
sudo perl -pi -e ‘s|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg’ /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
Finally, if this does not work as expected, or if something goes wrong, simply restore the backup:
sudo cp /IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage
This patch simply edits a file called IOAHCIBlockStoage, removing a string that makes TRIM work for only Apple SSDs.
