Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get code from github repository
var repository = 'https://api.github.com/repos/fredr/silex-html5-boilerplate/contents/README?ref=master';
$.getJSON(repository, function(data) {
var code = data.content;
var codeArray = code.split("\n");
var output;
for (var i = 0; i < codeArray.length; i++) {
output += window.atob(codeArray[i]);
}
console.log(output);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.