Skip to content

Instantly share code, notes, and snippets.

View crosbymichael's full-sized avatar

Michael Crosby crosbymichael

View GitHub Profile
@crosbymichael
crosbymichael / docker.sh
Created January 2, 2020 16:52
Docker v2 PoC Run
> docker run --rm -t -i --logger d2-syslog --profile privileged --net d2 --net b2 alpine ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eth0@if28: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether b2:da:6d:61:18:56 brd ff:ff:ff:ff:ff:ff
inet 10.10.0.52/24 brd 10.10.0.255 scope global eth0
@crosbymichael
crosbymichael / alpine.md
Created November 2, 2019 13:29
Apine Desktop

Alpine

apk-tools 2.10.4, compiled for x86_64.

Installing and removing packages:
  add       Add PACKAGEs to 'world' and install
            (or upgrade) them, while ensuring
            that all dependencies are met
  del       Remove PACKAGEs from 'world' and
package main
import (
"context"
"syscall"
"time"
"github.com/Sirupsen/logrus"
"github.com/containerd/containerd"
"github.com/containerd/containerd/cio"
#!/bin/bash
mkdir -p /sys/fs/cgroup/cpuset/buildkit
echo 5-7 >> /sys/fs/cgroup/cpuset/buildkit/cpuset.cpus
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 2.1686e-05
go_gc_duration_seconds{quantile="0.25"} 5.9681e-05
go_gc_duration_seconds{quantile="0.5"} 7.8483e-05
go_gc_duration_seconds{quantile="0.75"} 9.5376e-05
go_gc_duration_seconds{quantile="1"} 0.000303761
go_gc_duration_seconds_sum 0.064228354
go_gc_duration_seconds_count 802
# HELP go_goroutines Number of goroutines that currently exist.
package main
import (
"bufio"
"flag"
"fmt"
"log"
"os"
"sort"
"strconv"
package main
import (
"context"
"syscall"
"time"
"github.com/Sirupsen/logrus"
"github.com/containerd/containerd"
"github.com/containerd/containerd/namespaces"
package main
import (
_ "context"
_ "math"
_ "net/http"
_ "github.com/containerd/console"
@crosbymichael
crosbymichael / init.c
Last active August 26, 2016 21:02
Simple Container Pid 1
#define _GNU_SOURCE
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/resource.h>
@crosbymichael
crosbymichael / keybase.md
Created August 15, 2016 19:58
keybase.md

Keybase proof

I hereby claim:

  • I am crosbymichael on github.
  • I am crosbymichael (https://keybase.io/crosbymichael) on keybase.
  • I have a public key whose fingerprint is 03AC FE05 5FF8 E919 F278 00FA 0930 0471 AA36 D4B3

To claim this, I am signing this object: