Clone all your gists locally with R

I really like gists as a quick way to include more lengthly code snippets into my blog posts. However, I am not a git user as such, and so I was quite concerned when I noticed that all my gists on this blog had vanished after Christmas. I suppose this was a result of Github’s downtime on December 22nd.

Thankfully an email to the support guys at Github resolved the issue within a few hours. Still, I thought it might be a good idea to download my gists locally.

I can see all my gists as a JSON file online here: https://api.github.com/users/MYUSERLOGIN/gists

Thus, I downloaded the file and thanks to the RJSONIO package I was able to clone all my gists locally with a few lines of R:
> sessionInfo()
R Under development (unstable) (2012-10-19 r60974)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RJSONIO_0.98-1

Citation

For attribution, please cite this work as:

Markus Gesmann (Jan 02, 2013) Clone all your gists locally with R. Retrieved from https://magesblog.com/post/2013-01-02-clone-all-your-gists-locally-with-r/

BibTeX citation:

@misc{ 2013-clone-all-your-gists-locally-with-r,
 author = { Markus Gesmann },
 title = { Clone all your gists locally with R },
 url = { https://magesblog.com/post/2013-01-02-clone-all-your-gists-locally-with-r/ },
 year = { 2013 }
 updated = { Jan 02, 2013 }
}

Related