public
Description: My githubpages page
Homepage: http://acf.github.com/
Clone URL: git://github.com/acf/acf.github.com.git
acf.github.com / index.html
100644 31 lines (28 sloc) 0.935 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript">
      $(function() {
        var limit = 10 // how many repos to list
        var login = 'acf' // your username
 
        $.getJSON('http://github.com/api/v1/json/' + login + '?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.slice(0, limit), function() {
            $('#repos').append('<li><a href="' + this.url + '">' + this.name + '</a></li>')
          })
        })
      })
    </script>
</head>
<body>
<p>You probably want <a href="http://github.com/acf">this</a>.</p>
<p>But here's the repos.</p>
<ul id="repos">
</ul>
</body>
</html>