Skip to content

Instantly share code, notes, and snippets.

View mkm29's full-sized avatar

Mitch Murphy mkm29

View GitHub Profile
@mkm29
mkm29 / debug_k8s.sh
Created August 14, 2025 14:59
Kubernetes troubleshooting shell functions
#!/bin/bash
function find_non_running_pods() {
kubectl get pods --all-namespaces \
--field-selector=status.phase!=Running,status.phase!=Succeeded \
-o wide
}
function restart_pods() {
# first argument should be the namespace (default to the default namespace)
@mkm29
mkm29 / setup_dod_certs.sh
Created March 24, 2025 14:31
Configure DoD Certificates on Mac
#!/bin/bash
set -eu -o pipefail
export CERT_URL='https://dl.dod.cyber.mil/wp-content/uploads/pki-pke/zip/unclass-certificates_pkcs7_DoD.zip'
WORK_DIR="/Users/Shared/dod_certs"
DOWNLOAD_DIR="${WORK_DIR}/downloads"
ZIP_FILE="${DOWNLOAD_DIR}/dod_certs.zip"
# Create working directories
@mkm29
mkm29 / config.alloy
Created October 26, 2024 17:11
alloy config
logging {
level = "debug"
format = "logfmt"
}
discovery.kubernetes "pods" {
role = "pod"
}
discovery.kubernetes "nodes" {
@mkm29
mkm29 / .wezterm.lua
Last active October 16, 2024 14:04
Wezterm Configuration
local wezterm = require 'wezterm'
local act = wezterm.action
-- https://github.com/MLFlexer/resurrect.wezterm
local resurrect = wezterm.plugin.require("https://github.com/MLFlexer/resurrect.wezterm")
local mux = wezterm.mux
local tabline = wezterm.plugin.require("https://github.com/michaelbrusegard/tabline.wez")
local resurrect_event_listeners = {
"resurrect.error",
"resurrect.save_state.finished",
}
@mkm29
mkm29 / .zshrc
Created December 17, 2023 17:10
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/mitchellmurphy/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
unlock_bw_if_locked() {
if [[ -z $BW_SESSION ]] ; then
>&2 echo 'bw locked - unlocking into a new session'
export BW_SESSION="$(bw unlock --raw)"
fi
}
load_openai() {
unlock_bw_if_locked
# Note that this openai_api_key_id value will be different for you!
unlock_bw_if_locked() {
if [[ -z $BW_SESSION ]] ; then
>&2 echo 'bw locked - unlocking into a new session'
export BW_SESSION="$(bw unlock --raw)"
fi
}
load_mcs_gitlab() {
unlock_bw_if_locked
# Note that this gitlab_pat_id value will be different for you!
unlock_bw_if_locked() {
if [[ -z $BW_SESSION ]] ; then
>&2 echo 'bw locked - unlocking into a new session'
export BW_SESSION="$(bw unlock --raw)"
fi
}
load_ironbank() {
unlock_bw_if_locked
# Note that this ironbank_pat_id value will be different for you!
unlock_bw_if_locked() {
if [[ -z $BW_SESSION ]] ; then
>&2 echo 'bw locked - unlocking into a new session'
export BW_SESSION="$(bw unlock --raw)"
fi
}
load_darkwolf_gitlab() {
unlock_bw_if_locked
# Note that this gitlab_pat_id value will be different for you!
@mkm29
mkm29 / keybase.md
Created November 3, 2023 23:11
keybase

Keybase proof

I hereby claim:

  • I am mkm29 on github.
  • I am smigula (https://keybase.io/smigula) on keybase.
  • I have a public key ASB4QlARprRoB1AOiyw8L6nal_Fv71qcj3nFk3crZ4cqNQo

To claim this, I am signing this object: