Skip to content

Instantly share code, notes, and snippets.

View dwlf's full-sized avatar

Lloyd Dewolf dwlf

View GitHub Profile
@termie
termie / killprocess.go
Created July 14, 2015 20:43
kill stuff in a container
// killProcesses sends a signal to all the processes on the machine except
// for PID 1, somewhat naive but seems to work
func (s *WatchStep) killProcesses(containerID string, signal string) error {
client, err := NewDockerClient(s.options.DockerOptions)
if err != nil {
return err
}
cmd := []string{`/bin/sh`, `-c`, fmt.Sprintf(`ps | grep -v PID | awk "{if (\$1 != 1) print \$1}" | xargs -n 1 kill -s %s`, signal)}
err = client.ExecOne(containerID, cmd, os.Stdout)
if err != nil {
@bcantrill
bcantrill / unmarshal.d
Created April 25, 2015 02:43
DTrace on Go running in an LX branded zone on Triton
#pragma D option flowindent
pid$1::encoding*json.Unmarshal:entry
{
self->in = vtimestamp;
}
pid$1::encoding*:entry,
pid$1::encoding*:return
/self->in/

Preview build: Container grouping and stack composition

NOTE: this is out of date - refer to moby/moby#9694

Here is a preview build of two new features we’re working on concurrently: container grouping (docker groups) and stack composition (docker up). Together, they will eventually form a complete replacement for Fig.

@joshuamckenty
joshuamckenty / COUNTING.rst
Last active December 21, 2015 03:29
COUNTING.RST Our community (being OpenStack) is guided primarily by aspirational standards, rather than expository regulations. We have HACKING.rst for coding style. This is a proposed COUNTING.rst to talk about how we measure ourselves. It's based on conversations I had with Stefano Maffuli and others, after the launch of Stackalytics.com and s…

COUNTING.RST

Open Source projects and communities, like most things, are full of humans. Humans have egos.

WE FOCUS ON the CARROT, and not the STICK
  • COUNT things in a way to PRAISE many, without CONDEMNING some.
0. Count all the things
  • Don't report on just coding