Skip to content

Instantly share code, notes, and snippets.

View sahensley's full-sized avatar
🐍

Shawn Hensley sahensley

🐍
View GitHub Profile
@sahensley
sahensley / bash_strict_mode.md
Created May 16, 2025 20:17 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@sahensley
sahensley / README.md
Created May 15, 2025 04:00 — forked from aamnah/README.md
Cheats and helpers for creating a custom oh-my-zsh theme and git prompt

Zsh custom git prompt cheatsheet

Everything you need for customizing your git prompt in oh-my-zsh

  • print and echo commands for all functions in the git plugin. Printing and echoing because then i can check what values are outputted. Massively helpful when creating a theme.
  • a list of all the variables that you can use to customize $(git_prompt_info), thanks to vergenzt
grep -o "ZSH_THEME_GIT_[A-Z_]\+" lib/git.zsh| sort | uniq
# tailscale under podman on fedora
# tested on Fedora IOT (arm64 and amd64) and Silverblue (amd64).
# ensure the tun module is loaded by default
modprobe run
echo tun > /etc/modules-load.d/tun.conf
# ensure iptables xt_mark module is enabled and loaded
modprobe xt_mark
echo xt_mark > /etc/modules-load.d/xt_mark.conf
# ensure iptables ip6table_filter module is enabled and loaded
modprobe ip6tables_filter
@sahensley
sahensley / tmux-conf-copy-to-windows-clipboard.md
Created July 26, 2019 05:34
Tmux config to copy to the Windows system clipboard

About

Tmux 2.4 (April 2017) added a very useful copy-pipe-and-cancel command.

The config below configures copying to the tmux buffer and the Windows system clipboard in one command, including click-and-drag copying (without holding shift). I'm sure there's a way to get this to work with copy-mode (emacs style) but I'm not familiar enough with it to offer any advice. I've tested the config successfully both in WSL via PowerShell and WSL via MinTTY.

Config

# Configure copying
@sahensley
sahensley / keybase.md
Last active October 8, 2018 02:08
Keybase

Keybase proof

I hereby claim:

  • I am sahensley on github.
  • I am sahensley (https://keybase.io/sahensley) on keybase.
  • I have a public key ASCICHtAsGVoMUN3wA0HjAFn0nRWR5jUwongE9G1Zz35mgo

To claim this, I am signing this object: