Rename file extension to match file header
Create file from Gist
Replace temporary file with mktemp