I hereby claim:
- I am tehshrike on github.
- I am tehshrike (https://keybase.io/tehshrike) on keybase.
- I have a public key whose fingerprint is 3B94 CC2A 2C46 7B35 2F61 F71F 545D 7CD7 3324 13D2
To claim this, I am signing this object:
var functionThatCallsItselfMultipleTimes = function(starting_number) { | |
if (starting_number === 1) { | |
console.log("THING DONE!") | |
} else { | |
var roughly_half_the_number = Math.floor(starting_number / 2) | |
functionThatCallsItselfMultipleTimes(starting_number - roughly_half_the_number) | |
functionThatCallsItselfMultipleTimes(roughly_half_the_number) | |
} | |
} |
var variable = function() { | |
console.log(this.var || "NO U") | |
} | |
variable.variable = variable | |
variable.var = "lol" | |
variable() | |
variable.variable.variable.variable.variable() |
// Imagine that this is somebody else's async tool that you're using | |
var doAsyncThing = function(thing, cb) { | |
cb(thing + '!') | |
} | |
// So you have this utility function | |
var callThisWhenTheThingsAreDone = function(callback, number_of_things_to_do) { | |
var things_done = 0 | |
return function() { | |
things_done++ |
var encloseifNecessary = function(value) { | |
if (typeof value === 'string') { | |
return "'" + escape(value) + "'" | |
} else { | |
// TODO: add further handling for arrays or whatever maybe | |
return value | |
} | |
} | |
var escape = function(value) { |
function singleNumberToXY(number, boardWidth) { | |
var x = number % boardWidth | |
var y = (number - x) / boardWidth | |
return { | |
x: x, | |
y: y | |
} | |
} | |
function test(number, width) { |
I hereby claim:
To claim this, I am signing this object:
[diff] | |
tool = bcomp | |
[difftool] | |
prompt = false | |
[difftool "bcomp"] | |
trustExitCode = true | |
cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE" | |
[merge] | |
tool = bcomp | |
[mergetool] |
function escape(str) { | |
return str.replace(/\\/g, '\\\\').replace(/'/g, "\\'").replace(/\n/g, "\\n") | |
} | |
console.log(escape(require('fs').readFileSync('index.js', { encoding: 'utf8' }))) |
function getNames(key) { | |
var parts = key.split('_') | |
return { | |
type: parts.shift(), | |
property: parts.join('') | |
} | |
} | |
function rowToObjects(obj) { |
source /Users/josh/scripts/git-completion.bash | |
C_DEFAULT="\[\033[m\]" | |
C_WHITE="\[\033[1m\]" | |
C_BLACK="\[\033[30m\]" | |
C_RED="\[\033[31m\]" | |
C_GREEN="\[\033[32m\]" | |
C_YELLOW="\[\033[33m\]" | |
C_BLUE="\[\033[34m\]" | |
C_PURPLE="\[\033[35m\]" |