You'll often find yourself going through a tutorial where you need to copy some code from a webpage and create a file and paste the contents onto your local machine. Your terminal has a useful tool called "pbpaste" which allows you to paste contents into a file using a standard redirect.