Skip to content

Instantly share code, notes, and snippets.

afuchs

  • New York, NY
Block or report user

Report or block afuchs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@afuchs
afuchs / API.md
Created Mar 23, 2016 — forked from iros/API.md
Documenting your REST API
View API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

View winston-stacktrace.js
var logger = require('winston');
// override winston.logger.log to add stacktrace along errors included
// 4 ways to include some errors in a log:
// - logger.warn('message', myError)
// - logger.warn('message', [myError1, myError2])
// - logger.warn('message', { error: myError })
// - logger.warn('message', { errors: [myError1, myError2] })
(function(logger) {
var _log = logger.log;
View setup-statsd.sh
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install
# install the Node package manager for later use
You can’t perform that action at this time.