Created
September 6, 2013 14:35
-
-
Save djonsson/6464687 to your computer and use it in GitHub Desktop.
Get code from github repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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