/
index.html
64 lines (60 loc) · 2.23 KB
/
index.html
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<html>
<head>
<title></title>
<style type="text/css">
* { padding: 0; margin: 0; }
body { background: #FAFAFA; }
h1, h2, h3, h4 { padding: 10px 0; }
h1 { font-size: 1.4em; }
h2 { font-size: 1.2em; }
h4 { font-size: .9em; }
li { margin-left: 30px; }
a:link, a:hover, a:visited { color: #18476F; }
#wrapper { width: 90%; margin: 20px auto; }
</style>
<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 = 'trptcolin' // your username
var sorter = function(a, b) {
if ( b.pushed_at <= a.pushed_at ) {return a;}
else {return b;}
};
$.getJSON('http://github.com/api/v1/json/' + login + '?callback=?', function(data) {
var repos = $.grep(data.user.repositories, function(item) {
return !item.fork
})
var forks = $.grep(data.user.repositories, function(item) {
return item.fork
})
repos.sort(sorter);
forks.sort(sorter);
$.each(repos.slice(0, limit), function() {
$('#repos').append('<li><a href="' + this.url + '">' + this.name + '</a></li>')
})
$.each(forks.slice(0, limit), function() {
$('#forks').append('<li><a href="' + this.url + '">' + this.name + '</a></li>')
})
})
})
</script>
</head>
<body><div id="wrapper">
<h1>trptcolin's stuff</h1>
<h2>
<a href="http://github.com/downloads/trptcolin/trptcolin.github.com/functional-koans.zip">
Clojure Functional Koans
</a>
</h2>
<h2><a href="http://softwareapprenticeship.wordpress.com">Software Apprenticeship Blog</a></h2>
<h2><a href="http://www.twitter.com/trptcolin">Twitter</a></h2>
<h2><a href="http://www.github.com/trptcolin">Github</a></h2>
<h4>(originals)</h4>
<ol id="repos"</ol>
<h4>(forks)</h4>
<ol id="forks"</ol>
<h2>About</h2>
<p>Software Craftsman at <a href="http://8thlight.com">8th Light</a></p>
</div></body>
</html>