Skip to content

Instantly share code, notes, and snippets.

View michaelkosir's full-sized avatar

Michael Kosir michaelkosir

View GitHub Profile
# .zshrc
autoload -Uz compinit
compinit
VAULT_ENCRYPTION_KEY="example"
# export
export PATH="$PATH:/Users/michael.kosir/.hcv/bin"
export DOCKER_HOST="unix:///Users/$USER/.colima/docker.sock"
@michaelkosir
michaelkosir / Dockerfile
Last active March 6, 2025 05:56
An example Python web application distroless image using uv. An extremely fast Python package and project manager, written in Rust.
# Stage 0
# Installs dependencies and builds the application
# Artifacts will be copied to the final image
FROM debian:12-slim AS build
ARG PYTHON_VERSION="3.13"
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin
ENV UV_COMPILE_BYTECODE="1"
@michaelkosir
michaelkosir / pgp-fingerprints.sh
Created December 11, 2024 18:44
Get PGP fingerprints
export URL="https://apt.releases.hashicorp.com/gpg"
curl -fs $URL | gpg --with-colons --with-fingerprint --quiet | grep -oE "[0-9A-F]{40}"
@michaelkosir
michaelkosir / vault-operator-init-unseal.tf
Last active October 30, 2024 16:16
This is an example Terraform configuration to automatically initialize Vault and unseal it through Terraform. NOTE: This will store unseal keys and root token in the Terraform state. Highly recommend manually rotating unseal keys and root token after additional Vault configs have been deployed.
terraform {
required_providers {
terracurl = {
source = "devops-rob/terracurl"
version = "~> 1.2"
}
}
}
provider "terracurl" {}
@michaelkosir
michaelkosir / multipass-base.yml
Last active April 12, 2024 14:25
My base configuration for Multipass
# cloud-config
# Get PGP fingerprint
# export URL="https://apt.releases.hashicorp.com/gpg"
# curl -fs $URL | gpg --with-colons --with-fingerprint --quiet | grep -oE "[0-9A-F]{40}"
package_update: true
package_upgrade: true
apt: