Skip to content

Instantly share code, notes, and snippets.

@safinsingh
Last active June 12, 2020 23:42
Show Gist options
  • Save safinsingh/135d8ccbfaf8bfd90d7b15bbe5a8429d to your computer and use it in GitHub Desktop.
Save safinsingh/135d8ccbfaf8bfd90d7b15bbe5a8429d to your computer and use it in GitHub Desktop.
Pulls your starred repositories from GitHub and inserts them into a table with jQuery
$.ajax({url:"https://api.github.com/users/{USER}/starred",success:function(s){for(i=0;i<=3;i++)$("#el").append('<div class="row">\n<div class="col-md-6 acv">\n<div class="colcont">\n<h2><a href = '+s[2*i].html_url+">"+s[2*i].name+"</a></h2>\n<p>"+s[2*i].description+'</p>\n<p></p>\n</div>\n</div>\n<div class="col-md-6 acv">\n<div class="colcont">\n<h2><a href = '+s[2*i+1].html_url+">"+s[2*i+1].name+"</a></h2>\n<p>"+s[2*i+1].description+'</p>\n<p></p>\n</div>\n</div>')}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment