How do I change the computer name of my Mac running OS X?

To change the computer name (machine name) of your mac do the following: