Skip to content

Instantly share code, notes, and snippets.

View benjaminapetersen's full-sized avatar
👾

Ben Petersen benjaminapetersen

👾
View GitHub Profile
@benjaminapetersen
benjaminapetersen / gist:dd136934e7304a7bb3a7730540ce0ce8
Created December 4, 2024 20:53 — forked from nilekhc/gist:f771f1cc5f0ad2e6119a37626a408d96
values.yaml for Secrets Store Sync Controller with Azure provider
# Default values for secrets-store-sync-controller.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
controllerName: secrets-store-sync-controller-manager
tokenRequestAudience:
- audience: api://AzureADTokenExchange # e.g. api://TokenAudienceExample
logVerbosity: 5
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: list-secrets
rules:
- apiGroups:
- ""
resources:
- secrets
verbs:
@benjaminapetersen
benjaminapetersen / .vimrc
Created June 18, 2024 19:36 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@benjaminapetersen
benjaminapetersen / homebrew-gnubin.md
Created June 18, 2024 17:11 — forked from skyzyx/homebrew-gnubin.md
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

# not much here still relevant to me currently, but might be useful to revive in the future.
authors:
# rr: Ryan Richard; richardry
# ak: Andrew Keesler; akeesler
mk: Monis Khan; mok
# ap: Aram Price; pricear
# mm: Matt Moyer; moyerm
# mc: Margo Crawford; margaretc
email:
# domain: vmware.com
[core]
# pager = delta
[interactive]
# diffFilter = delta --color-only
[delta]
side-by-side = true
#syntax-theme = Dracula
# Generated by Powerlevel10k configuration wizard on 2020-09-12 at 21:53 PDT.
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 49789.
# Wizard options: nerdfont-complete + powerline, small icons, classic, unicode, dark,
# 12h time, angled separators, sharp heads, flat tails, 2 lines, disconnected, no frame,
# compact, many icons, concise, transient_prompt, instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate
# your own config based on it.
#
# 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
export PATH=$HOME/go/bin:$PATH
# On linux also add the path to brew and a place to put chromedriver...
if [[ "$OSTYPE" != "darwin"* ]]; then

Laptop Setup Tips

Moving from an older laptop? Bring these files over.

  • In Safari, "File -> Export -> Bookmarks"
  • Make a copy of ~/.zsh_history
  • Make a copy of github public and private keys from ~/.ssh or wherever you kept them
  • Check your Downloads folder for anything worth keeping

Helpful Brew Casks

@benjaminapetersen
benjaminapetersen / jsonpath.md
Created May 27, 2022 20:05 — forked from navicore/jsonpath.md
for getting multiple fields from kubectl via jsonpath

get name and image and startTime

kubectl get pods -ao jsonpath='{range .items[*]}{@.metadata.name}{" "}{@.spec.containers[*].image}{" "}{@.status.phase}{" "}{@.status.startTime}{"\n"}{end}'| grep track