Here are a list of cool OSX Terminal commands we came across and found worth sharing. Just run the commands in your Terminal.app and see what happens...
If you have reconfigured the F9 and F10 keys to something different you may want to use exposè. This hack adds a bigish blue button onto the desktop to enable you to use exposè. Clicking on it shows all the windows from one application (F10 default), option clicking it shows all windows (F9 default).
This little hack enables the double arrow set for up and down, left or right, to be at both ends of the scroll bar. Handy if you like the double arrows. Use System Preferences to reset.
Make sure the above is pasted as a single line. On restarting the Dock, you'll see a stack next to Trash. Click-hold and you can set it to show recent apps, documents or servers, or 'favorite' volumes or items. Run the command again for further instances that can be set to different display options.
If you are constantly mis-clicking and launching the wrong application (xchat instead of terminal, since they have similar icons...), adding spacers into your dock to visually separate the icons can be a big help. By adding spaces, you can group related icons together for ease of use, but have just enough of a visual difference to prevent you from spastically clicking on the wrong ones.
When your dock restarts, you’ll see a spacer in the right-side. You can click and drag this spacer to wherever you need, and you can re-run that command in your Terminal window to create as many spacers as you want. And just like any other dock icon, you can right+click and remove, or just drag it off the dock to get rid of it.Remember to type killall Dock to restart your dock before the changes will take effect.
This command activates developer mode for Dashboard. Once it's active, click-hold a widget and close Dashboard. The widget will stay put, floating above other windows. To put it back, click-hold, open Dashboard and 'drop' the widget.
This will make your desktop background as your initial screen saver. After you've entered that one line of command, Terminal will you the process ID. For example,  478, which 478 is the process ID.
As shown in example above, the process ID is 478. Therefore, in order to stop using screen saver as desktop wallpaper, the above one line of command is used. Note : 478 is the process ID.
Here is the easiest way to end this : Quitting Terminal.
This hack enables you to put a small gradient behind an icon.
If your Spotlights results don’t seem to add up, try these two commands to re-index the drive.
Replace '[string]' with some words to make your Mac talk.
This shows hidden files in Finder. Take care to not trash something you shouldn't. Replace 'true' with 'false' to put things back to normal.
A simple hack that removes the alternating stripes in list view in finder.
Lets you see the current path of the Finder window.