Skip to content

Instantly share code, notes, and snippets.

@creationix
Created September 15, 2011 18:00

Revisions

  1. creationix created this gist Sep 15, 2011.
    11 changes: 11 additions & 0 deletions getMyCode.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    // Run this with node and then run the output with sh
    var Http = require('http')
    var ChildProcess = require('child_process');
    Http.cat("http://github.com/api/v2/json/repos/show/creationix", function (err, json) {
    if (err) throw err;
    var data = JSON.parse(json);
    data.repositories.forEach(function (repo) {
    console.log("echo " + JSON.stringify(repo.name + " - " + repo.description));
    console.log("git clone --bare " + repo.url);
    });
    });