goatslacker

  • Archive
  • RSS
  • Ask me anything

Introducing gister

A nodejs module for programmatic access to create, edit and retrieve gists from github.

There are quite a few gist libraries available from npm. Most were CLI apps to create new gists, others didn’t exactly meet my needs. So I set out to create gister which provides what I think is a simple API. It follows the observer pattern and uses request to talk to GitHub.

Read the annotated source or check out the code.

Using it is really simple. Here’s how you retrieve a gist with gist_id = 1:

var gist = new Gist({ gist_id: 1 });
gist.on('get', function (data) {
  // do something with data
});
gist.get();

Creating a new gist is similar, although you’ll need to provide Gist with your GitHub username and Secret API Token which can be found in your Account Settings

var gist = new Gist({ username: 'goatslacker', token: 'abc123' });
gist.on('created', function (data, gist_id) {
  // gist_id is the newly created gist id
  // data is what github returns in it's reply
});
gist.create();

Available on npm. Install:

npm install gister
    • #cli
    • #gist
    • #github
    • #javascript
    • #node.js
    • #npm
  • 5 months ago
  • 14
  • Comments
  • Permalink
  • Share
    Tweet

Introducing Fly!

Pretty colors for your console applications written using NodeJS

Easily output some styles to console from your NodeJS application.

  • 256 colors! (for the cool terminals that support it)
  • Show your output in style, it’s dead simple
  • Variables, Functions, Interpolation
  • Easy to write templates
  • Small library
  • Did I mention it was easy to use?

Get it via npm:

npm install fly

And checkout the README on GitHub

    • #fly
    • #nodejs
    • #github
    • #open-source
    • #javascript
    • #templates
    • #console
    • #terminal
    • #linux
    • #unix
    • #npm
  • 10 months ago
  • 5
  • Comments
  • Permalink
  • Share
    Tweet

About

Software Engineering, Music, Sports
  • @goatslacker on Twitter
  • Facebook Profile
  • goatslacker on Last.fm
  • goatslacker on Grooveshark
  • Linkedin Profile
  • goatslacker on github

Twitter

loading tweets…

Posts I like

See more →
  • Video via izs
    Video

    Watch this video. I really like a lot of what he has to say. Two main comments:

    1. 165 Exceptions in the standard library, is enough!? Are you...
    Video via izs
  • RSS
  • Random
  • Archive
  • Ask me anything
  • Mobile

Josh Perez. Effector Theme by Carlo Franco.

Powered by Tumblr