Skip to content

Instantly share code, notes, and snippets.

View stevenklar's full-sized avatar
:shipit:

Steven Klar stevenklar

:shipit:
  • Lyft @lyft
  • Potsdam
  • 20:17 (UTC -12:00)
View GitHub Profile
@dwmkerr
dwmkerr / k8s-patch.go
Last active June 11, 2025 10:43
Example showing how to patch Kubernetes resources in Golang. Companion to the article 'https://dwmkerr.com/patching-kubernetes-resources-in-golang/'.
// Example showing how to patch kubernetes resources.
// This is the companion to my article 'Patching Kubernetes Resources in Golang':
// https://dwmkerr.com/patching-kubernetes-resources-in-golang/
package main
import (
"encoding/json"
"fmt"
types "k8s.io/apimachinery/pkg/types"
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@mattiaslundberg
mattiaslundberg / arch-linux-install
Last active December 17, 2025 21:09
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap
@rochacbruno
rochacbruno / pcat
Created May 7, 2013 14:45
pcat cat with syntax highlihg
sudo apt-get install python-pygments && alias pcat="pygmentize -f terminal256 -O style=native -g"