This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Mimics the way Haskell function works */ | |
function cascade(fn, n) { | |
return (function helper(args) { | |
return function () { | |
args = args.concat(Array.prototype.slice.call(arguments)) | |
return (args.length >= n) ? fn.apply(null, args) : helper(args) | |
} | |
}([])) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use *repeat* instead of *setInterval* | |
function repeat(fn, interval) { | |
fn() | |
setTimeout(function () { | |
repeat(fn, interval) | |
}, interval) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"math/rand" | |
"runtime" | |
"fmt" | |
) | |
const TEST_COUNT = 100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
docker exec -it $1 /bin/bash |