Skip to content

Instantly share code, notes, and snippets.

@lalyos
lalyos / 0README.md
Last active October 18, 2020 17:36
socker cli bash completion

Usage

This is what I can remember:

curl -L j.mp/bash-completion-docker | sh 

or if you dont like curl-pipe, do it by hand:

ln -s /Applications/Docker.app/Contents/Resources/etc/docker.bash-completion /usr/local/etc/bash_completion.d/docker
@lalyos
lalyos / dinner.json
Created December 3, 2019 15:33
dinner poc
{
"orders":[
{
"id": 1,
"user": "lalyos",
"food": "pacal"
},
{
"id": 2,
"user": "geza",
@lalyos
lalyos / 0README.md
Last active November 28, 2019 22:37
Kustomize illustrated

Kustomize illustrated

Its much easier to understand how kustomize work if you see some pictures ...

@lalyos
lalyos / 00-k8s-prompt.md
Last active March 31, 2025 15:03
simple shell based prompt generated with promptline.vim

Sometimes a very simple prompt is useful - like creating documentation, or github issues. In those cases its still important to be able to tell the k8s context/ns

white [ctx/ns]

PS1='[$(kubectl config view --minify -o jsonpath="{.contexts[0].name}:{.contexts[0].context.namespace}")]$ '

orange [ns]

Fake/Quick rest api prototype by combinig:

docker run -d \
  --name json-server \
  -p 3000:3000 \
  lalyos/json-server https://gist.githubusercontent.com/lalyos/2be21105e3607b4981c85a542cedc7fc/raw/issues.json
@lalyos
lalyos / README.md
Last active July 31, 2019 20:53
k8s basic auth for nginx ingress
apiVersion: apps/v1
kind: Deployment
metadata:
name: bad-app
spec:
replicas: 0
selector:
matchLabels:
app: bad
template:
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
app: lunch
name: lunch
spec:
type: NodePort
ports:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: web
spec:
rules:
- host: web.$NS.ing.k8z.eu
http:
paths:
- backend:
@lalyos
lalyos / list-fonts.md
Last active June 20, 2019 15:09
mac osx list fonts from cli

listing osx fonts from cli:

curl -LO https://gist.githubusercontent.com/lalyos/eca62800093d9352474ad5140f6d1f0f/raw/list-fonts.swift
chmod +x list-fonts.swift
./list-fonts.swift

tldr; installing fonts via brew: