Skip to content

Instantly share code, notes, and snippets.

View NickHeiner's full-sized avatar
💭
Wubba lubba dub dub!!

Nick Heiner NickHeiner

💭
Wubba lubba dub dub!!
View GitHub Profile
const arr = [
{id: 'a', val: 0},
{id: 'b', val: 1},
{id: 'c', val: 1},
{id: 'd', val: 1},
{id: 'e', val: 1},
{id: 'f', val: 1},
{id: 'g', val: 1},
{id: 'h', val: 1},
{id: 'i', val: 1},
// Run with Node.js v9.11.1
const _ = require('lodash');
const partsOfIpAddr = 4;
const bitsPerIpPart = 8;
const numberBitLength = partsOfIpAddr * bitsPerIpPart;
const getValueFromFlippingTrailingZeros = countZeros => Math.pow(2, countZeros) - 1;
.-''-.
/ , \
.-'`(o) ;
'-==. |
`._...-;-.
)--""" `-.
/ . `-.
/ / `. `-.
yarn install v1.5.1
verbose 0.462 Checking for configuration file "/Users/nickheiner/Code/camelot-web/.npmrc".
verbose 0.462 Checking for configuration file "/Users/nickheiner/.npmrc".
verbose 0.462 Found configuration file "/Users/nickheiner/.npmrc".
verbose 0.463 Checking for configuration file "/usr/local/etc/npmrc".
verbose 0.464 Checking for configuration file "/Users/nickheiner/Code/camelot-web/.npmrc".
verbose 0.464 Checking for configuration file "/Users/nickheiner/Code/.npmrc".
verbose 0.464 Checking for configuration file "/Users/nickheiner/.npmrc".
verbose 0.464 Found configuration file "/Users/nickheiner/.npmrc".
verbose 0.464 Checking for configuration file "/Users/.npmrc".
@NickHeiner
NickHeiner / npm-ls-std-err.txt
Created October 9, 2017 18:47
npm error report files
npm ERR! missing: prop-types@https://registry.npmjs.org/prop-types/-/prop-types-15.5.8.tgz, required by caseflow-frontend@0.0.1
npm ERR! missing: babel-code-frame@https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.22.0.tgz, required by babel-core@6.24.1
npm ERR! missing: babel-messages@https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz, required by babel-core@6.24.1
npm ERR! missing: babel-traverse@https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.24.1.tgz, required by babel-core@6.24.1
npm ERR! missing: babel-types@https://registry.npmjs.org/babel-types/-/babel-types-6.24.1.tgz, required by babel-core@6.24.1
npm ERR! missing: babylon@https://registry.npmjs.org/babylon/-/babylon-6.16.1.tgz, required by babel-core@6.24.1
npm ERR! missing: convert-source-map@https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz, required by babel-core@6.24.1
npm ERR! missing: debug@https://registry.npmjs.org/debug/-/debug-2.6.3.tgz, required by babel-core@6.24.1
@NickHeiner
NickHeiner / npm-shrinkwrap.diff
Created October 5, 2017 16:39
npm shrinkwrap modification issues
diff --git a/client/npm-shrinkwrap.json b/client/npm-shrinkwrap.json
index 4f1d53183..4edf9a27d 100644
--- a/client/npm-shrinkwrap.json
+++ b/client/npm-shrinkwrap.json
@@ -4,6 +4,11 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "abab": {
+ "version": "1.0.4",
@NickHeiner
NickHeiner / accessibility.md
Created August 17, 2017 19:47
Accessibility Talk Snippets
<p>Commits</p>
<p>Commit 1</p>
<p>Commit 2</p>
<h3>Commits</h3>
<ol>
 Commit 1
@NickHeiner
NickHeiner / talks.md
Last active August 11, 2021 15:16
Talks
@NickHeiner
NickHeiner / functions-in-functions.js
Created November 15, 2015 18:39
Examples of functions returning functions
// One classic purpose of a function returning a function is to do partial application.
// Let's say we have a function that adds two numbers:
function add(x, y) {
return x + y;
}
// Then, we want to make a function that adds 9000 to the argument:
function itsOver9000(x) {
return add(9000, x);
}
@NickHeiner
NickHeiner / Lessons Learned from Corpionage.md
Created October 17, 2015 14:00
Lessons Learned from Corpionage

** Originally written in Fall 2011. **

Lessons Learned from Corpionage

This semester, I worked on Corpionage, a Facebook game for people who like to mess with their friends. I thought it turned out pretty well, but there are a few key take-aways.

Our general architecture:

Server, UI, and Engine