Go to GitHub
Enter Filename including extension (extension are .css .php .html). A good filename is a short form of description.
Click beside the 1 and paste your code, including any comments you have within your code. Be sure to check the WordPress coding standards so you’re sharing well written code. In addition, you can get ideas from other people’s gists or by clicking All Gists beside the search bar.
Congratulations! You’ve just published your gist! See how to embed this gist on your WordPress website.