Skip to content

Instantly share code, notes, and snippets.

View nzakas's full-sized avatar
💭
GitHub time is limited currently. Please be patient.

Nicholas C. Zakas nzakas

💭
GitHub time is limited currently. Please be patient.
View GitHub Profile
@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 npm@1.2.18
3 info using node@v0.10.5
4 verbose read json c:\Users\nzakas\projects\phoenix\package.json
5 warn package.json phoenix@0.0.0 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 npm@1.4.3
3 info using node@v0.10.26
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
@nzakas
nzakas / simplemap.js
Created April 3, 2014 17:38
A simple map implementation for JavaScript (not intended to be an ES6 polyfill)
function SimpleMap() {
this._data = {};
}
SimpleMap.prototype = {
get: function(key) {
return this.has(key) ? this._data[key] : null;
},
@nzakas
nzakas / codepoints.js
Created March 9, 2014 01:17
Will this do what it claims to do in ES6?
// will this work for getting the number of code points in an ES6 string?
function codePointLength(text) {
var result = text.match(/./gu);
return result ? result.length : 0;
}
console.log(codePointLength("abc")); // 3
console.log(codePointLength("𠮷bc")); // 3
@nzakas
nzakas / pull_request.json
Last active August 29, 2015 13:57
GitHub WebHook Payloads
{
"action": "opened",
"number": 3,
"pull_request": {
"url": "https://api.github.com/repos/nzakas/APITest/pulls/3",
"id": 13182048,
"html_url": "https://github.com/nzakas/APITest/pull/3",
"diff_url": "https://github.com/nzakas/APITest/pull/3.diff",
"patch_url": "https://github.com/nzakas/APITest/pull/3.patch",
"issue_url": "https://api.github.com/repos/nzakas/APITest/issues/3",