Skip to content

Instantly share code, notes, and snippets.

View billglover's full-sized avatar
🎶
tap tap tapping tanzu tapping

Bill Glover billglover

🎶
tap tap tapping tanzu tapping
View GitHub Profile
@billglover
billglover / proof.md
Last active January 29, 2024 20:45
Keyoxide proof

aspe:keyoxide.org:X6BUHU5SV7RC3V5HAQQLWTR6HY

@billglover
billglover / rsh-pleco-flash-cards-fixed
Created October 17, 2021 19:36 — forked from underscoreHao/rsh-pleco-flash-cards-fixed
This is a Pleco flash card list containing every character in both tomes of Remembering Simplified Hanzi by James Heisig and Timothy W. Richardson
// Remembering Simplified Hanzi/RSH1_01
一[一] yi1 [1] one
二[二] er4 [2] two
三[三] san1 [3] three
四[四] si4 [4] four
五[五] wu3 [5] five
六[六] liu4 [6] six
七[七] qi1 [7] seven
八[八] ba1 [8] eight
九[九] jiu3 [9] nine
@billglover
billglover / main.go
Created June 17, 2020 18:57
Cross Compilation Demo
import (
"fmt"
"sync/atomic"
)
type T struct {
a byte
b int64
}
@billglover
billglover / set-kubeconfig.sh
Created June 10, 2020 19:02
Set the KUBECONFIG envar with all YAML files in the specified folder.
#!/bin/sh
DEFAULT_CONTEXTS="$HOME/.kube/config"
if test -f "${DEFAULT_CONTEXTS}"
then
export KUBECONFIG="$DEFAULT_CONTEXTS"
fi
CUSTOM_CONTEXTS="$HOME/.kube/custom-contexts"
mkdir -p "${CUSTOM_CONTEXTS}"
@billglover
billglover / config.yaml
Created December 20, 2019 15:29
Get Clair up and running using Docker Compose
clair:
database:
type: pgsql
options:
source: host=clair_postgres port=5432 user=postgres sslmode=disable statement_timeout=60000
cachesize: 16384
maxopenconnections: 10
api:
addr: "0.0.0.0:6060"
healthaddr: "0.0.0.0:6061"
@billglover
billglover / Dockerfile
Created November 19, 2019 14:23
A minimal Dockerfile for Go applications
FROM golang:alpine as build
RUN apk add --update --no-cache ca-certificates git
RUN adduser -D -g '' appuser
RUN mkdir /src
WORKDIR /src
COPY . .
RUN go mod download
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 737,
"digest": "sha256:c604e3508da0da4ba367c3a55dab35f8f45f71111e267b967e0a2680cd0e858a",
"platform": {
"architecture": "amd64",
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 737,
"digest": "sha256:c604e3508da0da4ba367c3a55dab35f8f45f71111e267b967e0a2680cd0e858a",
"platform": {
"architecture": "amd64",
FROM golang:1.11.1-alpine as build
RUN apk add --update --no-cache ca-certificates git
RUN mkdir /app
WORKDIR /app
COPY . .
RUN GOOS=linux GOARCH=arm go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/app
FROM scratch
FROM golang:1.11.1-alpine as build
RUN apk add --update --no-cache ca-certificates git
RUN mkdir /app
WORKDIR /app
COPY . .
RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-w -s" -o /go/bin/app
FROM scratch