lead.js
lead.js copied to clipboard
list gists
username = 'also'
gh = require 'github'
site = settings.get 'github', 'githubs', gh.default()
request = http.get gh.to_api_url site, "/users/#{username}/gists"
request.then (data) ->
notebooks = _.filter data, (gist) -> gist.files['notebook.lnb']?
_.each notebooks, (nb) ->
comment = if nb.description? then " # #{nb.description}" else ''
example "gist #{nb.id}#{comment}"