I hereby claim:
- I am en0 on github.
- I am irlaird (https://keybase.io/irlaird) on keybase.
- I have a public key ASCzVEanCrduuo0vHWY1xnGAneMkHGIkA5UdakQnwzvsuQo
To claim this, I am signing this object:
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: etcd | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Init for etcd | |
# Description: etcd 2.0 distributed key-value store | |
### END INIT INFO |
I hereby claim:
To claim this, I am signing this object:
from binascii import a2b_base64 as b64decode, b2a_base64 as b64encode | |
a, b = 13, 7 | |
PUB = 5 | |
PRIV = 29 | |
MAX = a * b | |
def cycleBit(v, c, m): | |
v2 = v | |
for i in range(c - 1): |
function findClosest(haystack, needle, comp, lo, hi) { | |
var mid, cmp; | |
lo = lo || 0; | |
hi = hi || haystack.length - 1; | |
while(lo <= hi) { | |
mid = lo + (hi - lo>>1); | |
cmp = comp(haystack[mid], needle); |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
#!/usr/bin/env node | |
const fs = require("fs"); | |
const path = process.argv.pop(); | |
const code = fs.readFileSync(path, "utf8"); | |
const lines = code.split("\n"); | |
const ret = JSON.stringify(lines, null, 2); | |
process.stdout.write(ret); |
def sort(s): | |
for i in range(len(s) - 1): | |
j = len(s) - 1 | |
while j > i: | |
if s[i] > s[j]: | |
s[i], s[j] = s[j], s[i] | |
j -= 1 | |
return s |
void eqish(f1, f2) { | |
static float e = 1.0e-nf; // where n is the precision | |
return abs((f1 - f2) < e); | |
} |
def is_prime(p): | |
"""Not Perfect - Do not use.""" | |
if p > 2: | |
return ((2**(p-1)) % p) == 1 | |
return p == 2 |
class BreakOutStack(Exception): | |
"""Raised to clear stack frame and reset""" | |
def __init__(self, *args): | |
self.args = args | |
def tail_recursive(fn): | |
def _wrapped_tail_recursive(*args): | |
while True: | |
try: |