Skip to content

Instantly share code, notes, and snippets.

@nodkz
nodkz / server.js
Created February 7, 2017 08:09
Sentry/raven manual config
import path from 'path';
import express from 'express';
import { merge } from 'lodash';
import graphqlHTTP from 'express-graphql';
import PrettyError from 'pretty-error';
import expressHttpProxy from 'express-http-proxy';
import bodyParser from 'body-parser';
import raven from 'raven';
import morgan from 'morgan';
import { PORT, PUBLIC_URL } from 'config';
@inflammable
inflammable / base58.js
Created June 14, 2012 09:50
Base58 (and other) Encoding and Decoding in Javascript
/*
* base58.js
* - encodes integers to and decodes from a base58 (or your own) base58 alphabet
* - based on Flickr's url shortening
*
* usage:
* base58.encode(integer);
* base58.decode(string);
*
* (c) 2012 inflammable/raromachine
@simenbrekken
simenbrekken / uploader.js
Created May 2, 2012 13:38
Fetch, resize via ImageMagick and store image on Amazon S3 with node.js
var spawn = require('child_process').spawn,
aws2js = require('aws2js'),
http = require('http'),
urlutil = require('url')
mime = require('mime'),
Buffers = require('buffers');
var settings = {
s3: {
key: 'key',
@kaareal
kaareal / less-middleware
Created April 15, 2012 16:02
Less middleware for compiling less files that working nicely with @import and updates when you change the imported files
/*!
* Lifted from https://github.com/LearnBoost/stylus/blob/master/lib/middleware.js
* Refactored to work with less instead of stylus and invoking compile when you change a "@import file"
*/
/*!
* Stylus - middleware
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/