Skip to content

Instantly share code, notes, and snippets.

@worldofgeese
worldofgeese / getting_started_with_openshift.org
Last active June 12, 2020 12:14
Getting started with OpenShift

Getting Started with OpenShift

I’m going to show the basics of how to manage an OpenShift cluster using the command-line tool, oc.

Download the tool

Replace linux-aarch64 in the following command with your architecture: linux or macosx

wget https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux-aarch64/oc.tar.gz
@worldofgeese
worldofgeese / using-secrets-with-gopass-and-summon.org
Last active June 15, 2020 10:04
How to secure secrets with gopass and summon

Using Gopass and Summon to Secure Secrets Inside the Enterprise and Out

*Gopass cheatsheet*

Windows user?

Install scoop

Set-ExecutionPolicy RemoteSigned -scope CurrentUser
@worldofgeese
worldofgeese / quick-gen-gpg-keys.bash
Last active September 6, 2022 09:11
Script to generate gpg keys quickly
echo "This script generates GPG keys valid for 1 year for macOS, Linux, and WSL2 users automatically. The email attached to the resulting key will only be valid if you have an garden.io email domain with a local-part of your first name."
if [ "Darwin" = $(uname) ]; then
FULLNAME=$(id -P $USER | awk -F '[:]' '{print $8}')
EMAIL=$(id -P "$USER" | cut -d: -f5 | cut -d, -f1 | sed s/'\w*$'// | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]' | sed 's/$/@garden.io/')
else
FULLNAME=$(getent passwd $USER | cut -d: -f5 | cut -d, -f1)
EMAIL=$(getent passwd "$USER" | cut -d: -f5 | cut -d, -f1 | sed s/'\w*$'// | tr '[:upper:]' '[:lower:]' | tr -d '[:space:]' | sed 's/$/@garden.io/')
fi
gpg --batch --passphrase '' \
--quick-generate-key "$FULLNAME <$EMAIL>" ed25519 cert 1y
@worldofgeese
worldofgeese / Dockerfile
Last active June 6, 2022 14:15
Nix source Dockerfile example
FROM nixos/nix as builder
WORKDIR /app
ENV NIXPKGS_ALLOW_UNFREE=1
RUN nix-env -iA nixpkgs.gitMinimal
RUN git clone https://gitlab.com/theoretical-chemistry-jena/nixwithchemistry \
$HOME/.config/nixpkgs/overlays/nixwithchemistry
RUN nix-channel --update
RUN nix-build \

Keybase proof

I hereby claim:

  • I am worldofgeese on github.
  • I am worldofgeese (https://keybase.io/worldofgeese) on keybase.
  • I have a public key ASBcQcdqvboWhZCigbFVexMv8WT-IqzXaMOV_RLGo54ziwo

To claim this, I am signing this object:

From doomemacs/doomemacs#2575 (comment):

Here are easy steps to get that done

  • Start emacs
  • M-x all-the-icons-install-fonts Provide a temp directory where you'd like the fonts to be downloaded (let's call it $tempFonts)

Then, using Powershell, you can install them for your user with this:

@worldofgeese
worldofgeese / compose-roachless.yml
Created November 17, 2022 12:09
Kompose-d Python application
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert -f compose-roachless.yml -f compose-roachless.override.yml -o kompose.yml
kompose.version: 1.26.1 (a9d05d509)
creationTimestamp: null
labels:
@worldofgeese
worldofgeese / gardened-external-dns-helm-chart.yaml
Created December 30, 2022 12:35
External DNS chart as a drop-in module for Garden
kind: Module
type: helm
name: my-external-dns
repo: https://kubernetes-sigs.github.io/external-dns/
chart: external-dns
version: 1.12.0
values:
provider: google
domainFilters: ["worldofgeese.devrel.demo.garden"]
txt-owner-id: "worldofgeese"
@worldofgeese
worldofgeese / gke-provider-example-kaniko-buildkit.yaml
Last active December 30, 2022 13:29
Provider example with Kaniko and cluster-buildkit vars set
- name: kubernetes
context: ${providers.terraform.outputs.cluster_name}
kubeconfig: ${var.terraformInitRoot}/${providers.terraform.outputs.kubeconfig_path}
namespace: ${environment.namespace}
defaultHostname: dev.worldofgeese.devrel.demo.garden
deploymentRegistry:
hostname: europe-north1-docker.pkg.dev
namespace: devrel-348008/worldofgeese-repo
# buildMode: cluster-buildkit
buildMode: kaniko
@worldofgeese
worldofgeese / multipass-garden-devenv.md
Last active March 2, 2023 13:35
A developer environment for Garden created with Canonical's Multipass

Multipass Garden Devenv

Launch a Minikube blueprint

multipass launch minikube --name garden-dev --memory 4G --disk 60G --cpus 2

Install Homebrew for Linux