This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am kjvalencik on github. | |
* I am kjvalencik (https://keybase.io/kjvalencik) on keybase. | |
* I have a public key whose fingerprint is A38B A193 03A3 C812 243B DFE7 1C89 98B6 F905 0CC9 | |
To claim this, I am signing this object: |
This file contains hidden or 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
node_modules/ | |
npm-debug.log | |
.m2/ |
This file contains hidden or 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
// TODO: Implement `forEach` and `reduce` | |
class P extends Promise { | |
constructor(fn) { | |
super(fn); | |
} | |
tap(fn) { | |
return this.then(res => { | |
return Promise |
This file contains hidden or 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
function promiseRetry(_fn, _attempts, backoff /* , errTypes */) { | |
var fn = Bluebird.method(_fn), | |
attempts = parseInt(_attempts, 10); | |
var argsLen = arguments.length, | |
retryLen = promiseRetry.length, | |
catchArgs = new Array(Math.max(1, argsLen - retryLen + 1)); | |
for (var i = retryLen; i < argsLen; i += 1) { | |
catchArgs[i - retryLen] = arguments[i]; |
This file contains hidden or 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
#content a[href^="/"]:not([href^="//"]) { | |
pointer-events: none; | |
color: inherit; | |
} |
This file contains hidden or 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
/* | |
Three farmers were selling chickens at the local market. | |
One farmer had 10 chickens to sell, another had 16 chickens to sell, and the last had 26 chickens to sell. | |
In order not to compete with each other, they agreed to all sell their chickens at the same price. | |
But by lunchtime, they decided that sales were not going so well, and they all decided to lower their | |
prices to the same lower price point. By the end of the day, they had sold all their chickens. It turned | |
out that they all collected the same amount of money, $35, from the day's chicken sales. | |
What was the price of the chickens before lunchtime and after lunchtime? | |
*/ |
This file contains hidden or 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
/* global _ */ | |
// Based on https://github.com/es-shims/es5-shim | |
;(function () { | |
"use strict"; | |
/* Provides the following polyfills | |
* | |
* Array.isArray | |
* Array.prototype.forEach | |
* Array.prototype.indexOf |
This file contains hidden or 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
#!/bin/bash | |
JAVA=$(readlink -f `which java`) | |
JAVA32=$(echo $JAVA | sed 's/\/jvm\//\/jvm\/ia32-/ig') | |
if [ -a $JAVA.orig ] | |
then | |
echo "Binary already patched" | |
else | |
echo "Patching binary..." |
This file contains hidden or 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
// You have 1,024 coins. One of those coins is double headed, | |
// but the rest are fair. You pick a coin at random and flip | |
// it 10 times and get 10 heads. What is the probability that | |
// the next flip will be heads? | |
// Constants | |
var TOTAL_COINS = 1024, | |
NUM_DOUBLE = 1, | |
NUM_FLIPS = 10, | |
PROB_FAIR = .5, |
This file contains hidden or 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
# update | |
apt-get update | |
apt-get upgrade | |
# update manager for dist upgrades | |
apt-get install update-manager-core | |
# install recompiled libc, not available in repo | |
mkdir updateOpenVZ |