Skip to content

Instantly share code, notes, and snippets.

View javayhu's full-sized avatar
🚀
Indie Hacking

javayhu javayhu

🚀
Indie Hacking
View GitHub Profile
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
gists = $('a.gist').map(function(n, a) {
a = $(a);
var href = a.attr('href');