David Brockman Smoliansky dbrockman

View StringBuilder.js
1 2 3 4 5 6 7 8 9 10
/* @flow */
 
export class StringBuilder {
encoding: string;
byte_length: number;
list: Array<Buffer>;
 
constructor(encoding?: string = 'utf8') {
this.encoding = encoding;
this.byte_length = 0;
View modulo.js
1 2 3 4 5 6 7 8
function modulo(a, b) {
var r = a % b;
return (r * b < 0) ? r + b : r;
}
 
function nthArrayItem(array, n) {
return array[modulo(n, array.length)];
}
View index.js
1 2 3 4 5 6 7 8 9
var joi = require('joi');
var joi_to_markdown = require('joi-to-markdown');
var event_util = require('dom-events');
var insertCSS = require('insert-css');
 
var container = document.createElement('div');
var input_textarea = document.createElement('textarea');
var convert_button = document.createElement('button');
var output = document.createElement('pre');
View async-dust-helper.js
1 2 3 4 5 6 7 8
dust.helpers.getValueAsync = function(chunk, context, bodies, params) {
return chunk.map(function(inner_chunk) {
// Simulate an async op with setImmediate
setImmediate(function() {
inner_chunk.write('It works!').end();
});
});
};
View node-test-alias.sh
1 2 3
alias t='NODE_ENV=test ./node_modules/.bin/istanbul cover --report lcov ./node_modules/.bin/_mocha -- --ui bdd --check-leaks --recursive --slow 200 --reporter dot test'
alias tm='NODE_ENV=test ./node_modules/.bin/mocha --bail --ui bdd --check-leaks --recursive --slow 200 --reporter dot test'
alias tc='NODE_ENV=test ./node_modules/.bin/mocha --bail --ui bdd --check-leaks --reporter dot $(git diff --name-only test | grep -E "(\.js)$")'
View breadcrumb-trail.js
1
console.log('BREADCRUMB TRAIL', new Error().stack.split('\n')[1].trim());
View flatten-array.js
1 2 3 4 5 6 7 8 9 10
function flatten(arr) {
var result = [], i, len, val;
if (arr) {
for (i = 0, len = arr.length; i < len; ++i) {
val = arr[i];
if (Array.isArray(val)) {
result.push.apply(result, flatten(val));
}
else {
result.push(val);
View object-utils.js
1 2 3 4 5 6 7 8 9 10
function merge() {
var dst = {}, src, keys, i = 0, j;
for (; i < arguments.length; i++) {
src = arguments[i];
keys = Object.keys(src);
for (j = 0; j < keys.length; j++) {
dst[keys[j]] = src[keys[j]];
}
}
return dst;
View alias.sh
1 2 3 4 5 6 7 8 9 10
### ALIAS
alias cd..='cd ..'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
 
alias §='exit'
 
# Get week number
alias week='date +%V'
View keybase.md

Keybase proof

I hereby claim:

  • I am dbrockman on github.
  • I am dbrckmn (https://keybase.io/dbrckmn) on keybase.
  • I have a public key whose fingerprint is 1D11 8D7A 9177 F946 DD3A C5A7 4EEA C966 0D82 F1EB

To claim this, I am signing this object:

Something went wrong with that request. Please try again.