See More

").text(repoDescription(repo))); var $watchers = $("").attr("href", repo.html_url + "/watchers").text(repo.watchers + " stargazers"); $item.append($("").addClass("watchers").append($watchers)); $item.append('⋅'); var $forks = $("").attr("href", repo.html_url + "/network").text(repo.forks + " forks"); $item.append($("").addClass("forks").append($forks)); $item.appendTo("#repos"); } function addRepos(repos, page) { repos = repos || []; page = page || 1; var uri = "https://api.github.com/orgs/fsprojects/repos?callback=?" + "&per_page=100" + "&page="+page; $.getJSON(uri, function (result) { if (result.data && result.data.length > 0) { repos = repos.concat(result.data); addRepos(repos, page + 1); } else { $(function () { $("#num-repos").text(repos.length); // Convert pushed_at to Date. $.each(repos, function (i, repo) { repo.pushed_at = new Date(repo.pushed_at); var weekHalfLife = 1.146 * Math.pow(10, -9); var pushDelta = (new Date) - Date.parse(repo.pushed_at); var createdDelta = (new Date) - Date.parse(repo.created_at); var weightForPush = 1; var weightForWatchers = 1.314 * Math.pow(10, 7); repo.hotness = weightForPush * Math.pow(Math.E, -1 * weekHalfLife * pushDelta); repo.hotness += weightForWatchers * repo.watchers / createdDelta; }); // Sort by highest # of watchers. repos.sort(function (a, b) { if (a.hotness < b.hotness) return 1; if (b.hotness < a.hotness) return -1; return 0; }); $.each(repos, function (i, repo) { if (!repo.name.startsWith('zzarchive-')) { addRepo(repo); } }); // Sort by most-recently pushed to. repos.sort(function (a, b) { if (a.pushed_at < b.pushed_at) return 1; if (b.pushed_at < a.pushed_at) return -1; return 0; }); $.each(repos.slice(0, 3), function (i, repo) { addRecentlyUpdatedRepo(repo); }); }); } }); } addRepos(); $.getJSON("https://api.github.com/orgs/fsprojects/members?callback=?", function (result) { var members = result.data; $(function () { $("#num-members").text(members.length); }); }); function randomItem(array) { return array[Math.floor(Math.random() * array.length)]; } var $flyzone; function flyzone() { if (!$flyzone) { $flyzone = $("

").attr("id", "flyzone").prependTo(document.body); } return $flyzone; } var sizes = ["smaller", "small", "medium", "large", "fat"]; var sizeDimensions = { "smaller": 50, "small": 80, "medium": 130, "large": 200, "fat": 300 }; })(jQuery);
    From Twitter's GitHub page, under the Apache license.