Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
trust me, i'm a ca.crt.

Mike Danese mikedanese

🤔
trust me, i'm a ca.crt.
View GitHub Profile
View go.mod
module k8s.io/kubectx/migrate
go 1.13
require golang.org/x/tools v0.0.0-20200206010605-531cc8856e55
View conditions.go
// pseudo-code sketch of condition support in Kubernetes authorization
package conditions
// authorization.k8s.io changes
type SubjectAccessReviewSpec struct {
// ...
ExtraAttributes map[string]string
}
@mikedanese
mikedanese / test.jsonnet
Last active Dec 25, 2020
types.jsonnet
View test.jsonnet
local types = import 'types.jsonnet';
local mytypes = {
foo: types.define('foo', {
a: types.number,
}),
bar: types.define('bar', {
foo: mytypes.foo,
foos: types.array(mytypes.foo),
foom: types.map(mytypes.foo),
View keybase.md

Keybase proof

I hereby claim:

  • I am mikedanese on github.
  • I am mikedanese (https://keybase.io/mikedanese) on keybase.
  • I have a public key whose fingerprint is 94C5 4574 CCE8 3CC3 F1A7 DDC4 1A86 D476 DB22 E91C

To claim this, I am signing this object:

View foo.yaml
kind: Role
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
namespace: default
name: pod-reader
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
---
@mikedanese
mikedanese / deepcopy.lua
Created Mar 26, 2016 — forked from Deco/deepcopy.lua
Lua Non-recursive Deep-copy
View deepcopy.lua
--[[ deepcopy.lua
Deep-copy function for Lua - v0.2
==============================
- Does not overflow the stack.
- Maintains cyclic-references
- Copies metatables
- Maintains common upvalues between copied functions (for Lua 5.2 only)
TODO
View gist:20059c7f89ca0aaf63e5
#! /bin/bash
# requires jsonnet. there's a homebrew package and it's pretty easy to build from source.
set -o nounset
set -o errexit
set -o pipefail
if [[ -z "${K8S_MASTER:-}" ]]; then
echo "Please set K8S_MASTER before running this" > /dev/stderr
View 0001-linux-fastbuild.patch
From 11d7ff0ddf413f1cb8939dce19bc94ed4d956145 Mon Sep 17 00:00:00 2001
From: Mike Danese <mikedanese@google.com>
Date: Thu, 18 Feb 2016 14:25:50 -0800
Subject: [PATCH] linux fastbuild
---
build/common.sh | 2 --
hack/lib/golang.sh | 10 ----------
2 files changed, 12 deletions(-)
View graceful.sh
#! /bin/bash
set -o pipefail
set -o nounset
service::log() {
msg="$1"
timestamp=$(date +"[%m%d %H:%M:%S]")
printf "+++ %s: %s\n" "${timestamp}" "${msg}" > /dev/stderr
}