Skip to content

Instantly share code, notes, and snippets.

View mamachanko's full-sized avatar
🔧
clank clank ...

Max Brauer mamachanko

🔧
clank clank ...
View GitHub Profile
#@ load("@ytt:data", "data")
#@ load("@ytt:overlay", "overlay")
#@ missing = ["{}.{}.yaml".format(data.values.namespace, data.values.project)]
#@ def complete(existing, _):
#@ return sorted(set(list(existing) + list(missing)))
#@ end
#@overlay/match by=overlay.subset({"kind": "Kustomization"})
@mamachanko
mamachanko / README.md
Last active August 8, 2022 07:58
kctrl edit

kctrl cannot update package installations interactively. This helps. Needs gum.

❯ uname -a
Darwin <redacted username> 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
❯ go version
go version go1.17.5 darwin/amd64
❯ cat *go
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ File: main.go
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────
@mamachanko
mamachanko / Authentication failed
Last active July 5, 2021 08:17
setting up eduk8s
GET /oauth_handshake?next=%2F 302 1.527 ms - 646
{
options: {
redirect_uri: 'http://lab-k8s-fundamentals-w01-s001.demo-127-0-0-1.nip.io/oauth_callback',
scope: 'user:info',
code: 'akHssOixfNNnjm2GY1YcbIjVSIeYRg'
},
level: 'debug',
message: 'token_options',
timestamp: '2021-07-05T08:06:04.228Z'
@mamachanko
mamachanko / README.md
Created June 11, 2021 08:36
Carvel, default images and optional preresolution

Render with latest or default:

ytt -f image-config.yaml | kbld -f - -f pod-template.yaml

Render with specific version:

ytt -f image-config.yaml -v nginxVersion=1.20 | kbld -f - -f pod-template.yaml
@mamachanko
mamachanko / kind-with-registry-and-ingress.sh
Created April 20, 2021 13:47
kind with registry and ingress
#!/bin/sh
set -o errexit
# create registry container unless it already exists
reg_name='kind-registry'
reg_port='5000'
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
if [ "${running}" != 'true' ]; then
docker run \
-d --restart=always -p "127.0.0.1:${reg_port}:5000" --name "${reg_name}" \
def name():
return "mamachanko"
end
@mamachanko
mamachanko / one.txt
Created March 21, 2020 11:25
iso-git test
hello1
@mamachanko
mamachanko / index.html
Created March 21, 2020 10:57
isomorphic-git demo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>isomorphic-git demo</title>
</head>
<body>
<h1>Hello, this is a demo of isomorphic-git.</h1>
<script src="https://unpkg.com/@isomorphic-git/lightning-fs"></script>
@mamachanko
mamachanko / output
Last active January 10, 2020 09:11
TAOP db restore
$ ./taop_init.sh
...
Get:3 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease [46.2 kB]
Get:4 http://deb.debian.org/debian buster-updates InRelease [49.3 kB]
Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [168 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 Packages [7,908 kB]
Get:7 http://apt.postgresql.org/pub/repos/apt buster-pgdg/12 amd64 Packages [861 B]
Get:8 http://apt.postgresql.org/pub/repos/apt buster-pgdg/main amd64 Packages [156 kB]
Get:9 http://deb.debian.org/debian buster-updates/main amd64 Packages [5,792 B]
Fetched 8,522 kB in 2s (4,145 kB/s)