Skip to content

Instantly share code, notes, and snippets.

View thomaspeitz's full-sized avatar
🌍
Traveling weeks

Thomas Peitz thomaspeitz

🌍
Traveling weeks
View GitHub Profile
@thomaspeitz
thomaspeitz / gist:eaef87c714418eb1fe1a732655d4637b
Last active March 30, 2025 03:22
Karpenter EC2NodeClass aws mount nvme /var/lib/containerd
apiVersion: karpenter.k8s.aws/v1beta1
kind: EC2NodeClass
metadata:
name: gitlab-runner
spec:
amiFamily: AL2023
blockDeviceMappings: []
userData: |
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="BOUNDARY"
@thomaspeitz
thomaspeitz / google-meet
Created November 4, 2020 12:46
Script to switch from terminal to google meet session
#!/bin/bash
# Just a slightly modified https://github.com/aezell/mutemeet/blob/master/MuteMeet.scpt - Thanks!
osascript <<'END'
tell application "Google Chrome"
activate
set i to 0
repeat with w in (windows) -- loop over each window
set j to 1 -- tabs are not zeroeth
repeat with t in (tabs of w) -- loop over each tab
if title of t starts with "Meet " then
require 'influxdb'
require 'aws-sdk-timestreamwrite'
client = Aws::TimestreamWrite::Client.new(
region: 'eu-west-1',
)
database = 'site_development'
for c in staging production infra thomas
do
alias k${c:0:1}="kubectl --context ${c}"
for ns in default monitoring kube-system "nginx-ingress" oauth "cert-manager"
do
shortcut=""
namespace=""
if [ "$ns" != "default" ]

Keybase proof

I hereby claim:

  • I am thomaspeitz on github.
  • I am tsupertramp (https://keybase.io/tsupertramp) on keybase.
  • I have a public key whose fingerprint is 75B2 40BE 8E2F B53C 7DCA 4CF4 7871 1674 974C 8F23

To claim this, I am signing this object:

for app in `kubectl get deploy | cut -d ' ' -f 1 |grep -v NAME`;do kubectl get deploy $app -o json | tee backup-$app.json | jq '.spec.template.spec += { "dnsConfig": { "options": [{"name": "ndots", "value": "1"}]} }' | kubectl apply -f -;done

Keybase proof

I hereby claim:

  • I am tsupertramp on github.
  • I am tsupertramp (https://keybase.io/tsupertramp) on keybase.
  • I have a public key whose fingerprint is 75B2 40BE 8E2F B53C 7DCA 4CF4 7871 1674 974C 8F23

To claim this, I am signing this object:

@thomaspeitz
thomaspeitz / crypto-price
Created October 8, 2017 17:11
crypto-better-touch-bar
#!/usr/local/bin/ruby
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("http://crypto.nerdswords.de/markets/summaries")
resp = Net::HTTP.get_response(uri)
json = JSON.parse(resp.body)
@thomaspeitz
thomaspeitz / gist:525458fe1bb9f1dcb63bf445a36a1785
Last active January 7, 2017 21:00
bitcoin.de api golang GET example
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"log"
"net/http"
@thomaspeitz
thomaspeitz / Pokemon Go ZSH
Last active July 16, 2016 11:49
Is pokemon Go ready in my country? ZSH Theme + Script
Place Theme: ~/.oh-my-zsh/themes/nanotech.zsh-theme
Start Script in your first terminal tab with your country name
bash script.sh Germany
Add to ~/.zshrc
ZSH_THEME="nanotech"