Skip to content

Instantly share code, notes, and snippets.

View nzakas's full-sized avatar

Nicholas C. Zakas nzakas

View GitHub Profile
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 silly cache add args [ '.', null ]
6 verbose cache add spec .
7 silly cache add parsed spec { raw: '.',
@nzakas
nzakas / arrayproxy.js
Created February 16, 2016 20:46
A proxy that acts like an array
// target is the backing object
let target = { length: 0 },
proxy = new Proxy(target, {
set(trapTarget, key, value) {
let numericKey = Number(key),
keyIsInteger = Number.isInteger(numericKey);
// special case for length property - only need to worry if length is
// shorter than number of array items
@nzakas
nzakas / output.log
Last active January 8, 2016 18:48
Test failures
8721 passing (45s)
81 failing
1) CLIEngine executeOnFiles() should report zero messages when given a directory with a .js2 file:
AssertionError: expected 0 to equal 1
at Context.<anonymous> (C:\Users\Nicholas\projects\personal\eslint\tests\lib\cli-engine.js:309:20)
at callFn (C:\Users\Nicholas\projects\personal\eslint\node_modules\mocha\lib\runnable.js:286:21)
at Test.Runnable.run (C:\Users\Nicholas\projects\personal\eslint\node_modules\mocha\lib\runnable.js:279:7)
at Runner.runTest (C:\Users\Nicholas\projects\personal\eslint\node_modules\mocha\lib\runner.js:421:10)
at C:\Users\Nicholas\projects\personal\eslint\node_modules\mocha\lib\runner.js:528:12
@nzakas
nzakas / alias.md
Created September 11, 2015 17:59
Some simple scripts I use to manage open source branches

Usage:

To create a new branch that is up-to-date with the remote master:

$ ws 123

Creates the branch issue123

@nzakas
nzakas / inc.sh
Created July 2, 2015 18:07
Increment all numbers in the form "column: 1"
# This was used to update all column numbers in ESLint tests when we
# changed to 1-based columns from 0-based
$ perl -pi.bak -e "s/(column: *)([0-9]+)/\$1.(\$2+1)/e;" tests/lib/rules/*.js
@nzakas
nzakas / gist:b00ce7cf9e5d99935853
Created May 13, 2015 02:46
Avocado chocolate pudding
Ingredients:
* 1 ripe avocado (a bit soft)
* 3 tbsp pure cocoa powder (no sugar added)
* 3 tbsp coconut nectar
* 6 tbsp unsweetened coconut milk
Steps:
1. Scoop out avocado into blender/food processor
@nzakas
nzakas / job.md
Last active August 29, 2015 14:18
Staff Software Engineer, Front-end Frameworks, Box

Staff Software Engineer, Front-end Frameworks (Los Altos, CA)

Box's Front-end Frameworks team is looking for an experienced engineer to join us at our Los Altos, CA headquarters on our mission to make building web applications on top of the Box infrastructure easy, fast, and fun.

About the Team

Front-end Frameworks ensures that Box web applications are built on top of the best tools and frameworks available. We actively evaluate third-party libraries and frameworks, as well as building our own, to make sure our feature teams can be as effective and iterative as possible. In the past two years, we've led the establishment of front-end best practices, created a lightweight client-side framework that has improved developer experience by enforcing conventions and loose coupling, and started putting together a Node.js framework to power the next generation of Box web applications.

About the Job

@nzakas
nzakas / application.yml
Created November 13, 2014 23:23
Test for YAML config overrides
override: ./tests/fixtures/override.yml
http:
port.prod: 6000
port.dev: 7000
application:
mode.prod: prod
0 info it worked if it ends with ok
1 verbose cli [ 'c:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose read json c:\Users\nzakas\projects\phoenix\package.json
5 warn package.json [email protected] No README.md file found!
6 verbose readDependencies using package.json deps
7 verbose install where, deps [ 'c:\\Users\\nzakas\\projects\\phoenix',
0 info it worked if it ends with ok
1 verbose cli [ 'c:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'publish' ]
2 info using [email protected]
3 info using [email protected]
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,