I hereby claim:
- I am igor47 on github.
- I am igor47 (https://keybase.io/igor47) on keybase.
- I have a public key whose fingerprint is 9F5D ADC0 1FB0 4BE0 9AA4 8808 5725 5CA7 693C 0FF9
To claim this, I am signing this object:
from collections import defaultdict | |
import random | |
def left_or_right(): | |
return 'l' if random.randint(0, 9) == 0 else 'r' | |
def make_group(): | |
d = defaultdict(lambda: 0) | |
for i in range(45): | |
d[left_or_right()] += 1 |
I hereby claim:
To claim this, I am signing this object:
[ | |
{"kScreenSaverURL":"https://app.datadoghq.com/screen/board/2582?fullscreen=true","kScreenSaverTime":"5"}, | |
{"kScreenSaverURL":"https://rpm.newrelic.com/accounts/7358/applications/2237","kScreenSaverTime":"5"}, | |
{"kScreenSaverURL":"https://dashboards.airbnb.com/screens/1","kScreenSaverTime":"5"} | |
] |
#!/bin/bash -eu | |
repo="/etc/chef/src" | |
origin=`cat /etc/chef/origin` | |
branch=`cat /etc/chef/branch` | |
role=`cat /etc/chef/role` | |
env=`cat /etc/chef/environment` | |
# create temporary files | |
git_clone=`mktemp -d` |
#!/usr/bin/env python | |
from collections import defaultdict | |
import json | |
import requests | |
config_url = "http://haproxy.1wt.eu/download/1.5/doc/configuration.txt" | |
longest_keyword = 42 #works for haproxy 1.5 docs, but might need to be adjusted | |
# first, get the lines that pertain to the matrix |
We connect our REST services together using smartstack. Smartstack is mainly the combination of nerve and synapse. Nerve lets your service be discovered by other services, and synapse lets you discover services you yourself need.
In order to play well with smartstack, you need to define two special resources in your service.
Both should return Content-type: text/plain
.
#!/usr/bin/python | |
def water(levels, second_pass = False): | |
# sanity check | |
if len(levels) < 2: | |
return 0 | |
# state machine | |
filling = False | |
h = 0 |
class Chef | |
class Node | |
class ImmutableMash | |
def to_hash | |
h = {} | |
self.each do |k,v| | |
if v.respond_to?('to_hash') | |
h[k] = v.to_hash | |
elsif v.respond_to?('each') | |
h[k] = [] |