Skip to content

Instantly share code, notes, and snippets.

View bshephar's full-sized avatar

Brendan Shephard bshephar

  • 08:06 (UTC +10:00)
View GitHub Profile
import = ["~/.config/alacritty/themes/themes/tokyo-night.toml"]
#[colors.bright]
#black = "#424242"
#blue = "#3E7FEE"
#cyan = "#0CBACD"
#green = "#0ED9A5"
#magenta = "#D48DFC"
#red = "#EC3D63"
#white = "#F0F1F1"
ARG FEDORA_MAJOR_VERSION=rawhide
FROM quay.io/fedora/fedora-bootc:${FEDORA_MAJOR_VERSION}
COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq
RUN dnf up -y && curl -s -o /etc/yum.repos.d/tailscale.repo https://pkgs.tailscale.com/stable/centos/9/tailscale.repo
RUN dnf group install gnome-desktop -y
#RUN bash <(curl -sSf https://raw.githubusercontent.com/bshephar/fedora-sb/main/nordvpn-install.sh)
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
❯ cat install-config.yaml
apiVersion: v1
baseDomain: bne-shift.net
compute:
- hyperthreading: Enabled
name: worker
replicas: 0
controlPlane:
hyperthreading: Enabled
name: master
@bshephar
bshephar / generics
Created June 15, 2023 11:42
Trying to use generics instead of two seperate functions that do exactly the same thing
type GenericDataPlaneObject interface {
*dataplanev1beta1.OpenStackDataPlaneRole | *dataplanev1beta1.OpenStackDataPlaneNode
}
// removeControllerManagedAnnotations will check for and remove annotations on Role objects that are managed by a OpenStackDataPlane controller.
func removeControllerManagedAnnotations[T GenericDataPlaneObject](ctx context.Context, instance T, helper *helper.Helper, annotation map[string]string) error {
client := helper.GetClient()
// Get all of the current annotations
annotations := instance.ObjectMeta.GetAnnotations()