Skip to content

Instantly share code, notes, and snippets.

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

Peter Vandenberk pvdb

🖥️
Making computers do things!
View GitHub Profile
@pvdb
pvdb / obfuscate
Last active February 24, 2024 09:55
Obfuscate sensitive input read from STDIN and write to STDOUT
#!/usr/bin/env sh
#
# INSTALLATION
#
# ln -s ${PWD}/obfuscate $(brew --prefix)/bin/
# sudo ln -s ${PWD}/obfuscate /usr/local/bin/
#
# ALIAS
#
@pvdb
pvdb / pack-recurse
Last active February 12, 2024 13:44
#!/bin/sh
#
# INSTALLATION
#
# ln -s ${PWD}/pack-recurse $(brew --prefix)/bin/
# sudo ln -s ${PWD}/pack-recurse /usr/local/bin/
#
find "${HOME}/.vim/pack" -mindepth 2 -maxdepth 2 -type d \( -name start -or -name opt \) | while read -r pack_dir; do
@pvdb
pvdb / git-branch--list--recent
Last active April 18, 2023 08:47
list branches (refs, really) ordered by "recency"
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/git-branch--list--recent $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-branch--list--recent /usr/local/bin/
#
# INSPIRATION
#!/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/
#
@pvdb
pvdb / repl
Last active September 6, 2023 10:47
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
#
# brew install rlwrap
@pvdb
pvdb / xdiff
Last active March 14, 2023 12:28
#!/usr/bin/env zsh
#
# INSTALLATION
#
# ln -s ${PWD}/xdiff $(brew --prefix)/bin/
# sudo ln -s ${PWD}/xdiff /usr/local/bin/
#
REPORT="$1" ; shift ;
@pvdb
pvdb / square_fit
Last active March 12, 2024 12:36
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
@pvdb
pvdb / git-hub
Last active February 27, 2023 08:55
#!/usr/bin/ruby
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/git-hub $(brew --prefix)/bin/
# sudo ln -s ${PWD}/git-hub /usr/local/bin/
#
# CONFIGURATION
#!/usr/bin/env ruby
#
# INSTALLATION
#
# ln -s ${PWD}/git-stash-switcher $(brew --prefix)/bin/
#
# COMING SOON!
@pvdb
pvdb / rbenv-upgrade
Last active November 16, 2023 10:09
#!/usr/bin/env ruby -r semantic -r consenter
# frozen_string_literal: true
#
# INSTALLATION
#
# ln -s ${PWD}/rbenv-upgrade $(brew --prefix)/bin/
# sudo ln -s ${PWD}/rbenv-upgrade /usr/local/bin/
#