lead.js icon indicating copy to clipboard operation
lead.js copied to clipboard

list gists

Open also opened this issue 12 years ago • 1 comments

also avatar Aug 26 '13 20:08 also

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}"

also avatar Oct 11 '13 01:10 also