Generating a self-signed SSL Certificate, commands only

This post is one of those quick notes to myself, so I can stop searching this info everytime I need it. This is the sequence of commands to create a self-signed SSL certificate. If you need to know what you are doing please go read this post. I suggest you to paste them one by one, and by you I mean the future me, that will try to paste them all at once and do something stupid.