Skip to content

Instantly share code, notes, and snippets.

@joho
Created June 30, 2009 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joho/138059 to your computer and use it in GitHub Desktop.
Save joho/138059 to your computer and use it in GitHub Desktop.
A little jquery script to show off your team's github repos, based heavily on http://github.com/benaskins/benaskins.github.com
<!DOCTYPE>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$('.repos').each(function() {
var current_e = this;
$(this).append('<li><a href="http://github.com/' + this.id + '">github.com/' + this.id + '</a></li>' );
$.getJSON('http://github.com/api/v1/json/' + this.id + '?callback=?', function(data) {
var repos = $.grep(data.user.repositories, function() {
return !this.fork
})
repos.sort(function(a,b) {
return b.watchers - a.watchers
})
$.each(repos, function() {
$(current_e).append('<li class="repo"><a href="' + this.url + '">&nbsp;- ' + this.name + '</a></li>');
})
})
})
})
</script>
</head>
<body>
<h3>John Barton</h3>
<ul id="joho" class="repos">
</ul>
<h3>Clinton Forbes</h3>
<ul id="clinton" class="repos">
</ul>
<h3>Stuart Richo</h3>
<ul id="sricho" class="repos">
</ul>
<h3>James Dowling</h3>
<ul id="jamesd" class="repos">
</ul>
<h3>Erin Francis</h3>
<ul id="ezza" class="repos">
</ul>
<h3>Ryan Allen - Developer Emeritus</h3>
<ul id="ryan-allen" class="repos">
</ul>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment