Skip to content

Instantly share code, notes, and snippets.

@ubergesundheit
ubergesundheit / create-kubeconfig.sh
Created May 30, 2022 08:14
RBAC namespace permissions
# The script returns a kubeconfig for the service account given
# you need to have kubectl on PATH with the context set to the cluster you want to create the config for
# Cosmetics for the created config
clusterName=....
# your server address goes here get it via `kubectl cluster-info`
server=https://....
# the Namespace and ServiceAccount name that is used for the config
namespace=mynamespace
serviceAccount=mynamespace-user
@ubergesundheit
ubergesundheit / ca_setup_with_certstrap.md
Last active December 31, 2023 00:44
CA setup with certstrap

Certificate Authority setup

Certificates used for the mTLS authentication can be generated using certstrap or any other means for generating TLS certificates (openssl, step cli).

Example CA generation with certstrap

We're following the advice of Mozilla of generating one long term root CA certificate with intermediate CA certificates signing the actual client certificates.

If your server and client supports Ed25519 certificates, add --curve=Ed25519 to init and request-cert commands. (Requires compilation CGO_ENABLED=0 go install github.com/square/certstrap@2a55ac3)

@ubergesundheit
ubergesundheit / README.md
Last active August 17, 2021 14:00
Glasfaser Münster

Glasfaser Münster

Name Downstream (Mbit/s) Upstream (Mbit/s) Preis (€)
Münster:Highspeed 50 50 20 42,69
Münster:Highspeed 100 100 40 49,69
Münster:Highspeed 250 250 50 59,69
Münster:Highspeed 500 500 100 67,69
Münster:Highspeed 1000 1000 200 84,69
@ubergesundheit
ubergesundheit / fix-logging.service
Created February 11, 2021 15:15
Crude fix for log2ram & journald
[Unit]
Description=start log2ram & restart systemd-journald
[Service]
ExecStart=/bin/systemctl start log2ram.service
ExecStartPost=/bin/systemctl restart systemd-journald
@ubergesundheit
ubergesundheit / REAME.md
Created February 8, 2021 18:40
ffmpeg timelapse from gopro images
  1. Copy files from sd card
cp -R /path/to/your/sd/card/mount/DCIM/1*/*.JPG .
  1. Convert to video
ffmpeg -y -framerate 50 -pattern_type glob -i '*.JPG' -s hd1080 -vcodec libx264 -b:v 2M -pix_fmt yuv420p -profile:v main -crf 18 -preset medium -an -movflags +faststart -filter:v fps=fps=25 timelapse_50.mp4
@ubergesundheit
ubergesundheit / install-restic.yaml
Last active January 3, 2021 12:57
ansible install restic tasks (for debian & ubuntu)
---
# requires the variable `restic_version` (only tested with `0.11.0`)
- name: Install installation requirements
apt:
name:
- gnupg
state: present
update_cache: yes
- name: Download checksum files
https://krunker.io/ -> shooter
https://sketchful.io/ -> like skribbl.io
https://www.dominion.games/ -> dominion
https://codenames.game/ -> codenames
https://colorify.io -> 2 player coloring of squares
https://stadtlandfluss.cool/
https://shellshock.io/ -> shooter
https://colonist.io/ -> siedler von catan
https://concarneau.herokuapp.com/ -> carcassone
http://el-artista.herokuapp.com/ -> malen
@ubergesundheit
ubergesundheit / index.js
Created December 15, 2020 14:13
Find station furthest from Münster on openSenseMap
// boxes.js is acquired by executing `curl "https://api.opensensemap.org/boxes?classify=true&minimal=true" > boxes.js`
// then prepend `export default ` in front of boxes.js
import { default as boxes } from "./boxes.js";
import { default as distance } from "@turf/distance";
import { default as helpers } from "@turf/helpers";
const muenster = helpers.point([7.62, 51.96]);
for (let i = 0; i < boxes.length ; i++) {
@ubergesundheit
ubergesundheit / latest-changes.html
Created June 30, 2020 08:27
GitInfo latest changes shortcode for hugo
{{/* Serve and compile your pages with --enableGitInfo for this to work */}}
{{/* Put the following lines into layouts/shortcodes/latest-changes.html */}}
{{/* then use {{< latest-changes >}} in your documents */}}
{{/* Empty dict for change storage where key is the github link & value is a slice with changed pages */}}
{{ $latest_changes := dict }}
{{/* Slice for storing github links with date because dict iteration is not sorted */}}
{{ $latest_changes_sorted := slice }}

73# First steps after installing Pop!_OS 19.10

Using ansible. Installs pyenv, nvm, keybase, keeweb, vs codium, riot-web, golang

Packages

Upgrade & install basics

sudo apt-get update && sudo apt-get upgrade -y