This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.clear(); | |
const loop = (arrayOfPromises, guard) => { | |
if (arrayOfPromises.length && (!guard || guard(arrayOfPromises[0]))) { | |
return arrayOfPromises.shift()().then(() => { | |
return loop(arrayOfPromises, guard); | |
}) | |
} | |
return Promise.resolve(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const unWrapMobxInjectedComponent = <T extends {}>(component: IWrappedComponent<T>): T => { | |
let last: any = component; | |
while (component.wrappedComponent) { | |
last = component.wrappedComponent; | |
} | |
return last as T; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsof -i tcp:{{port}} | |
// find PID from list | |
kill -9 {{PID}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Primitive example of creating a helper library to describe elements | |
var m = require('mithril'); | |
var materialElements = ['textfield']; | |
var mt = function(selector, options, children) { | |
if (selector === 'textfield') { | |
return m('div.mdl-textfield.mdl-js-textfield.mdl-textfield--floating-label', [ | |
m('input.mdl-textfield__input', { | |
id: options.id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Primitive example of creating a helper library to describe elements | |
var m = require('mithril'); | |
var materialElements = ['textfield']; | |
var mt = function(selector, options, children) { | |
if (selector === 'textfield') { | |
return m('div.mdl-textfield.mdl-js-textfield.mdl-textfield--floating-label', [ | |
m('input.mdl-textfield__input', { | |
id: options.id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Lifted from: https://github.com/adrienthebo/git-tools/blob/master/git-truncate | |
# Note: seem to be finding the need to run this twice over to commit the truncate | |
if [ -z "$1" -o -z "$2" ]; then | |
echo "Usage: $0 <drop before SHA1 commit> <branch>" | |
exit | |
fi | |
git filter-branch --parent-filter "sed -e 's/-p $1[0-9a-f]*//'" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Karma configuration | |
// Generated on Fri Jan 23 2015 17:22:58 GMT-0500 (EST) | |
var proxyquire = require('proxyquireify'); | |
module.exports = function(config) { | |
config.set({ | |
// base path that will be used to resolve all patterns (eg. files, exclude) | |
basePath: '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular | |
.module('ampAppHostNotifier', []) | |
.factory('appHostNotifier', [ | |
'$rootScope', | |
'$window', | |
'$location', | |
function($rootScope, $window, $location) { | |
return { | |
init: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
// validate args | |
if (process.argv.length < 3) { | |
console.log('usage:'); | |
console.log('\tnode svg-cleaner.js <path>') | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /Users/Stephen/.npm -type d -print0 | xargs -0 chown Stephen |
NewerOlder