Skip to content

Instantly share code, notes, and snippets.

View carrollgt91's full-sized avatar

Grayson Carroll carrollgt91

View GitHub Profile
@carrollgt91
carrollgt91 / gist:407eb4ac91e835380de4
Last active August 29, 2015 14:18
Composing and parameterizing Mocha Suites (Unsuccessfully)
// This solution won't work - if you run it with `mocha debug path/to/file.js,
// it will fail to actually run the tests in Workflow2.
var expect = require("chai").expect,
Q = require("q");
var Workflow1 = {},
Workflow2 = {};
Workflow1.run = function(param) {
var deferred = Q.defer();
@carrollgt91
carrollgt91 / gist:9f2a74a9b8faf31a93da
Created April 8, 2015 14:20
Composing and parameterizing Mocha suites (Somewhat successfully)
// This will correctly run both workflows on my machine.
// However, it requires the hack of putting the resolution
// of the deferred in the nested describe block.
var expect = require("chai").expect,
Q = require("q");
var Workflow1 = {},
Workflow2 = {};
var expect = require("chai").expect,
Q = require("q");
var Workflow1 = {},
Workflow2 = {};
Workflow1.run = function(param) {
var deferred = Q.defer();
describe("Example workflow1", function() {
@carrollgt91
carrollgt91 / Dockerfile
Created May 21, 2015 19:42
Drake Dockerfile
FROM clojure
# Install Drake
WORKDIR /usr/share/
RUN git clone https://github.com/Factual/drake.git
WORKDIR /usr/share/drake
RUN lein uberjar
ENV DRAKE_HOME=/usr/share/drake
ENV PATH=$PATH:$DRAKE_HOME/bin
FORMAT: 1A8
HOST: http://api.example.com
# API
This is an API with about 480 endpoints
# Group 329F2A0BC56148E5BD5E3BD2AA767188
## 329F2A0BC56148E5BD5E3BD2AA767188 [/2223715AC2F845F89E6E34F4A20928A5/86EA55EB6B89484294C35C3F8F517BEB]
@carrollgt91
carrollgt91 / gist:b292db16a80b56248190
Created June 17, 2015 21:32
Maximum stack exceeded error in dredd stack trace
This file has been truncated, but you can view the full file.
var req = new WriteWrap();
^
RangeError: Maximum call stack size exceeded
at Socket._writeGeneric (net.js:660:13)
at Socket._write (net.js:709:8)
at doWrite (_stream_writable.js:301:12)
at writeOrBuffer (_stream_writable.js:288:5)
at Socket.Writable.write (_stream_writable.js:217:11)
at Socket.write (net.js:634:40)
at [object Object].Console.log (/usr/local/lib/node_modules/dredd/node_modules/winston/lib/winston/transports/console.js:88:20)