Skip to content

Instantly share code, notes, and snippets.

View dnephin's full-sized avatar

Daniel Nephin dnephin

View GitHub Profile
commit 99cbcd6031c5d09d32798457af0b44bce7e8473d
Author: Daniel Nephin <[email protected]>
Date: Wed Aug 17 12:30:47 2016 -0400
WIP adding cpu profiling to integration test suite runner.
Signed-off-by: Daniel Nephin <[email protected]>
diff --git a/hack/make/.integration-test-helpers b/hack/make/.integration-test-helpers
index af7cfed..fcc1641 100644
@dnephin
dnephin / dobi.yaml
Last active July 21, 2016 21:44
Build a minimal image for a go binary - uses files from https://github.com/dnephin/dobi
#
# Reference: http://dnephin.github.io/dobi/config.html
#
# To build the minimal dist image:
#
# dobi dist-img
#
mount=source:
bind: .
@dnephin
dnephin / compose-hooks.sh
Last active October 21, 2022 20:44
Execute a hook in './hooks/<service>/<action>' when that event is received
#!/bin/bash
set -e
function handle_event() {
local entry="$1"
local action=$(echo $entry | jq -r '.action')
local service=$(echo $entry | jq -r '.service')
local hook="./hooks/$service/$action"
if [ -x "$hook" ]; then
"$hook" "$entry"
#!/bin/bash
set -x
cat > tmp.py <<EOF
import os, signal
print os.getpid()
@dnephin
dnephin / Dockerfile
Created December 29, 2015 21:47
Panic in `glide up`
FROM golang:1.5
ARG GLIDE_VERSION=0.8.2
RUN curl -sL \
https://github.com/Masterminds/glide/releases/download/${GLIDE_VERSION}/glide-${GLIDE_VERSION}-linux-amd64.tar.gz | \
tar -xz linux-amd64/glide && \
mv linux-amd64/glide /usr/bin/glide && \
chmod +x /usr/bin/glide
@dnephin
dnephin / list-prs.sh
Last active December 4, 2015 02:11
List github PRs from a milestone
#!/bin/bash
set -e
VERSION=1.6.0
GITHUB_API=https://api.github.com/repos/
REPO=docker/compose
function handle_failure() {
echo "Cherry-pick failed. Entering a new shell to merge."
javascript: (function(e, a, g, h, f, c, b, d) {
if (!(f = e.jQuery) || g > f.fn.jquery || h(f)) {
c = a.createElement("script");
c.type = "text/javascript";
c.src = "//ajax.googleapis.com/ajax/libs/jquery/" + g + "/jquery.min.js";
c.onload = c.onreadystatechange = function() {
if (!b && (!(d = this.readyState) || d == "loaded" || d == "complete")) {
h((f = e.jQuery).noConflict(1), b = 1);
f(c).remove()
}
@dnephin
dnephin / common.env
Last active January 7, 2022 06:48
docker-compose extends and environment variables
TEST_ONE=common-env-file
TEST_TWO=common-env-file
TEST_TREE=common-env-file
TEST_FOUR=common-env-file
@dnephin
dnephin / __init__.py
Created November 18, 2015 22:42
py.test autouse session fixture in conftest.py
#
web:
image: alpine:edge
environment:
- NAME: thename
command: echo $NAME