I hereby claim:
- I am samalba on github.
- I am samalba (https://keybase.io/samalba) on keybase.
- I have a public key whose fingerprint is B411 50C3 439F 0404 0B18 7512 C92D F665 EE29 B29B
To claim this, I am signing this object:
var escapeInput = function (str) { | |
return str.replace(/['"<>]|^\s+|\s+$/g, ''); | |
}; |
import StringIO | |
from paramiko import DSSKey | |
def generate_ssh_key(): | |
dss = DSSKey.generate() | |
out = StringIO.StringIO() | |
dss.write_private_key(out) | |
private_key = out.getvalue() | |
out.close() | |
public_key = 'ssh-dss {0}'.format(dss.get_base64()) |
#!/bin/bash | |
cd $SERVICE_APPROOT | |
[ -d ~/env ] || | |
virtualenv --python=python2.7 ~/env || exit 1 | |
. ~/env/bin/activate | |
[ -f requirements.txt ] && | |
pip install --download-cache=~/.pip-cache -r requirements.txt || exit 1 |
echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event | |
cat /sys/kernel/debug/tracing/trace_pipe > out.txt | |
(Leave it running a couple of seconds, then Ctrl+C; this is just to flush the buffer) | |
cat /sys/kernel/debug/tracing/trace_pipe > out.txt | |
(Leave it running a couple of seconds, then Ctrl+C; this is to recover the data) | |
cut -d- -f2 out.txt | awk '{print $1}' | sort | uniq -c | sort -n |
# Add this to your ~/.bashrc (or ~/.zshrc) | |
pycheck () { | |
type flake8 > /dev/null || { | |
echo "pip install flake8" | |
return | |
} | |
find . -name '*.py' -type f -exec flake8 {} \; | |
} |
package main | |
import ( | |
"fmt" | |
"testing" | |
) | |
func assertEqual(t *testing.T, a interface{}, b interface{}, message string) { | |
if a == b { | |
return |
#!/usr/bin/env python | |
import sys | |
if __name__ == '__main__': | |
fname = sys.argv[1] | |
with open(fname) as f: | |
print '[' | |
while True: | |
b = f.read(14) |
#!/bin/sh | |
# NOTE: Run from the docker-registry root directory | |
# Setup the environment | |
export SETTINGS_FLAVOR=test | |
export DOCKER_REGISTRY_CONFIG=config_test.yml | |
export DOCKER_CREDS=REPLACE:ME | |
export S3_ACCESS_KEY=REPLACEME | |
export S3_SECRET_KEY=REPLACEME |
dev: | |
# This assumes the Redis info are in environment variables | |
cache: | |
host: _env:REDIS_HOST | |
port: _env:REDIS_PORT | |
password: _env:REDIS_PASSWORD |
I hereby claim:
To claim this, I am signing this object: