Skip to content

Instantly share code, notes, and snippets.

Created October 10, 2015 07:20
Show Gist options
  • Select an option

  • Save anonymous/080b48bd9306c1b81ab1 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/080b48bd9306c1b81ab1 to your computer and use it in GitHub Desktop.
List of github gists
$.getJSON('https://api.github.com/users/slowkow/gists', function(data) {
var items = []
$.each(data, function(i, val) {
items.push(
"<li id='" + i + "'>" +
"<a href='" + val.url + "'>" +
val.description +
"</a>" +
" (" + val.files[Object.keys(val.files)[0]].language + ")" +
'</li>'
)
})
$("<ul/>", {
"class": "gists",
"html": items.join("")
}).appendTo("body")
})
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment