@schl3ck has already provided an approach to importing from gists.
And @simonbs has provided one for exporting to gists.