Skip to content

Instantly share code, notes, and snippets.

View patrixr's full-sized avatar
🌱
Slow growth

Patrick R patrixr

🌱
Slow growth
View GitHub Profile
@patrixr
patrixr / ci-ember-test.js
Created November 30, 2018 04:30
Minimal EmberJS testing output for CI
const chalk = require('chalk');
const cli = require('ember-cli');
const fs = require('fs');
let enableLog = false;
let failures = 0;
function wrapStream(stream) {
const _write = stream.write.bind(stream);
const _print = (txt) => _write(txt + "\n");
@patrixr
patrixr / promisify.js
Created February 5, 2016 03:15
Promisify: from callback to promise
function promisify(func, scope) {
return function () {
var args = [].slice.call(arguments);
var deferred = Promise.defer();
args.push(function () {
if (arguments[0]) {
// There was an error
deferred.reject(arguments[0]);