Skip to content

Instantly share code, notes, and snippets.

View mamachanko's full-sized avatar
🐙
deep sea work

Max Brauer mamachanko

🐙
deep sea work
View GitHub Profile
@pivotaljohn
pivotaljohn / merge.lib.yaml
Created August 30, 2022 16:43
Deep merge of dictionaries
#@ load("@ytt:yaml", "yaml")
#@ load("@ytt:overlay", "overlay")
#@ load("@ytt:struct", "struct")
#@ def _doc(map):
--- #@ map
#@ end
---
#@ def _missing_ok(map):
@mamachanko
mamachanko / README.md
Last active August 8, 2022 07:58
kctrl edit

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

@muesli
muesli / .golangci.yml
Created January 8, 2022 07:00
Extensive golangci-lint config
run:
tests: false
issues:
include:
- EXC0001
- EXC0005
- EXC0011
- EXC0012
- EXC0013

Cheetsheet for Luan's Tmux config

Disclaimer: this is gds' mental model of how tmux with Luan's config works. While they try to use terminology consistent with the rest of the world, they could easily be wrong. Corrections welcome.

Commands that work "normally"

Most of the time in tmux, you're in normal mode. When you type things, they go

@ojhughes
ojhughes / bootstrap-k8s-spring-project.md
Last active January 25, 2024 21:51
Bootstrapping a Spring project for deployment on Kubernetes with a few commands.

This is my current "dev workflow" for quickly bootstrapping an Spring app on a Kubernetes cluster. The general approach is polyglot but you will need to use something like https://buildpacks.io instead of Jib to support non-JVM projects

This example uses skaffold and kapp so you will need to install from https://skaffold.dev/docs/install/ & https://k14s.io/ You will also need kubectl installed and a Kubernetes cluster targetted. You can use Minikube, Kind or K3S for lightweight, local Kubernetes environment

export APPNAME=bootstrap-k8s
export DOCKER_REGISTRY=ojhughes
@mamachanko
mamachanko / README.md
Last active January 10, 2017 08:31
List DriveNow car coordinates for Berlin

DriveNow car coordinates

This is a script to return all DriveNow car locations for Berlin, Germany. It is easily changed to work with any other city DriveNow provides service in.

You need a DriveNow API key and auth token. It's easiest to get your's by logging into the DriveNow website and using your browser's dev tools.

Usage

@marszall87
marszall87 / docker-compose-install.sh
Created September 25, 2015 13:14
Simple script for installing latest Docker Compose on CoreOS >= 717.0.0
#!/bin/bash
mkdir -p /opt/bin
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@denji
denji / golang-tls.md
Last active May 29, 2024 10:16 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@nanki
nanki / grayscale.py
Last active December 16, 2015 04:39
display an image with xterm-256/unicode braille patterns.
import sys
import math
from random import random
from PIL import Image, ImageOps, ImageEnhance
def dot(bits):
bits = bits & 7 | (bits & 112) >> 1 | (bits & 8) << 3 | bits & 128
return unichr(0x2800 + bits)
class Grayscale24: