Skip to content

Instantly share code, notes, and snippets.

View pvdb's full-sized avatar
🖥️
Busy making computers do things!

Peter Vandenberk pvdb

🖥️
Busy making computers do things!
View GitHub Profile
@pvdb
pvdb / kubektl
Last active March 13, 2026 16:47
kubectl wrapper
#!/usr/bin/env bash
#
# WHAT
#
# kubektl - interactive kubectl wrapper, with caching and history
#
# Dixit "Claude Snonnet 4" -- This is a well-designed utility that significantly improves the developer experience
# when working with Kubernetes clusters, especially in environments with many contexts, namespaces, and resources!
#
@pvdb
pvdb / git-branch--list--recent.rb
Last active November 4, 2025 17:08
list branches (refs, really) ordered by "recency"
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/git-branch--list--recent.rb $(brew --prefix)/bin/git-branch--list--recent
# sudo ln -s ${PWD}/git-branch--list--recent.rb /usr/local/bin/git-branch--list--recent
#
# CONFIGURATION
@pvdb
pvdb / subst
Last active October 8, 2025 15:57
#!/usr/bin/env bash
#
# INSTALLATION
#
# ln -s ${PWD}/subst $(brew --prefix)/bin/
# sudo ln -s ${PWD}/subst /usr/local/bin/
#
# ALTERNATIVE IMPLEMENTATION
#
@pvdb
pvdb / square_fit
Last active September 28, 2025 09:48
convert images to "squared" PNGs
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/square_fit $(brew --prefix)/bin/
# sudo ln -s ${PWD}/square_fit /usr/local/bin/
#
# PREREQUISITES
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# INSTALLATION (2 aliases)
#
# ln -s ${PWD}/git-branch---stray $(brew --prefix)/bin/git-branch--delete--stray
# sudo ln -s ${PWD}/git-branch---stray /usr/local/bin/git-branch--delete--stray
#
# ln -s ${PWD}/git-branch---stray $(brew --prefix)/bin/git-branch--list--stray
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/git-multi $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-multi /usr/local/bin/
#
# DEPENDENCIES
#!/bin/sh
#
# INSTALLATION
#
# ln -s ${PWD}/git-recurse $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-recurse /usr/local/bin/
#
# NOTE: works with both GNU and BSD find
#
#!/usr/bin/env bash
#
# INSTALLATION
#
# ln -s ${PWD}/brew-browse $(brew --prefix)/bin/
# sudo ln -s ${PWD}/brew-browse /usr/local/bin/
#
# PREREQUISITES
#
@pvdb
pvdb / git-ctags
Last active April 23, 2025 07:50
#!/bin/sh
#
# INSTALLATION
#
# ln -s ${PWD}/git-ctags $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-ctags /usr/local/bin/
#
# https://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
@pvdb
pvdb / repl
Last active February 16, 2025 17:42
wrap a non-interactive command in an interactive REPL _(read-eval-print loop)_
#!/usr/bin/env ruby
# frozen_string_literal: true
REPL_NAME = 'repl'
REPL_VERSION = '1.0.0'
#
# INSTALLATION
#
# ln -s ${PWD}/repl $(brew --prefix)/bin/