brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
function partition(inputArray, callback) { | |
const result = {}; | |
for (const [indexOfValue, value] of inputArray.entries()) { | |
const propertyKey = callback(value, indexOfValue); | |
if (propertyKey === null || propertyKey === '') { | |
continue; | |
} | |
if (!{}.hasOwnProperty.call(result, propertyKey)) { | |
result[propertyKey] = []; | |
} |
/** @return {number} Width of a scrollbar in pixels */ | |
function getScrollbarWidth() { | |
const div = document.createElement('div'); | |
div.style.visibility = 'hidden'; | |
div.style.overflow = 'scroll'; | |
div.style.width = '50px'; | |
div.style.height = '50px'; | |
div.style.position = 'absolute'; | |
document.body.appendChild(div); | |
const result = div.offsetWidth - div.clientWidth; |
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* | |
# Diagnostic reports (https://nodejs.org/api/report.html) | |
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json |
import {Dict} from '../interfaces'; | |
export interface XhrResponse { | |
data: any; | |
statusCode: number; | |
statusText: string; | |
headers: Dict; | |
request: XMLHttpRequest; | |
code?: string; | |
} |
import {forEach, isArray, isDate, isObject} from 'lodash'; | |
export interface XhrResponse { | |
data: any; | |
statusCode: number; | |
statusText: string; | |
headers: Dict; | |
request: XMLHttpRequest; | |
code?: string; | |
} |
(function () { | |
'use strict'; | |
var Touch = function (target, identifier, pos, deltaX, deltaY) { | |
deltaX = deltaX || 0; | |
deltaY = deltaY || 0; | |
this.identifier = identifier; | |
this.target = target; | |
this.clientX = pos.clientX + deltaX; |
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
const barker = (state) => ({ | |
bark: () => console.log('Woof, I am ' + state.name) | |
}); | |
const driver = (state) => ({ | |
drive: () => state.position = state.position + state.speed | |
}); | |
const murderRobotDog = (name) => { | |
let state = { | |
name, |
(function () { | |
var mixin = function () { | |
if (arguments.length === 0) { | |
return this; | |
} | |
var args = _.toArray(arguments); | |
args.unshift({}); |