Skip to content

Instantly share code, notes, and snippets.

View RichardBronosky's full-sized avatar

Bruno Bronosky RichardBronosky

View GitHub Profile
@RichardBronosky
RichardBronosky / dependabot-merge.sh
Created April 10, 2022 07:38
CLI tool for merging dependabot PRs
#! /usr/bin/env bash
set -eu
_usage(){
cat<<EOF
Usage:
./dependabot-merge.sh get_branches | ./dependabot-merge.sh checkout_merge_push_delete
EOF
_funcs | sed $'1i Functions:\n; s/^/ /'
@RichardBronosky
RichardBronosky / imgist.sh
Last active August 17, 2023 15:07
Imgur was down, so I created Imgist
#! /usr/bin/env bash
set -eu
_main(){
input_file="$1"
file_path="$(realpath -s "$input_file")"
file_name="$(basename "$file_path")"
cd "$(dirname "$(realpath -s "${BASH_SOURCE[0]}")")"
cp "$file_path" ./
git add "$file_name"
@RichardBronosky
RichardBronosky / MICRenc.ttf.base64
Last active December 30, 2021 19:10
MICR Encoding font (base64 encoded) source: DigitalGraphicLabs.com
AAEAAAAKAIAAAwAgT1MvMhrDB94AAACsAAAATmNtYXBVqb7oAAAA/AAAA6ZnbHlmVzPUWAAABKQA
ADVAaGVhZODmvhYAADnkAAAANmhoZWEdMxCSAAA6HAAAACRobXR4ugQhhAAAOkAAAABcbG9jYYSU
k8YAADqcAAAAMG1heHAAHADwAAA6zAAAACBuYW1lCAdeTwAAOuwAAAHQcG9zdAADAAAAADy8AAAA
IAAACBYBkAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgsGAAUDAgICBAAAAAAAAAAAAAAAAAAA
AAAAAAAAAEAAIPACB38AAAiBB38AAAAAAAAAAgABAAAAAAAUAAMAAQAAARoAAAEGAAABAAAAAAAA
AAEDAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAMAAAAAAAAAAAAAAAAAAAAEBQYHCAkKCwwNAAAAAAAA
AA4REhUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxATFAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQCjAAAACIAIAAEAAIA/wFTAWEBeAGSAsYC3CAUIBogHiAi
@RichardBronosky
RichardBronosky / install_latest_tmux.sh
Last active August 17, 2023 15:09
TMUX added command prompt tab completion menus v3.2!
# SEE: https://github.com/tmux/tmux/blob/47923bd5f62f49924e20f3cabcff9350968449a2/CHANGES#L320-L323
# FROM: https://github.com/tmux/tmux#from-version-control
tmux -V
cd ~/src/
git clone https://github.com/tmux/tmux
cd tmux/
sudo apt install bison make pkg-config autotools-dev automake libevent-dev libncurses-dev
sh autogen.sh
@RichardBronosky
RichardBronosky / tmux-panes.sh
Last active August 17, 2023 15:10 — forked from dmckean/tmux-panes.sh
A combination of the tmux commands: list-sessions list-windows and list-panes
#! /usr/bin/env bash
hi_color=$(tput setaf 4) #blue
bold=$(tput bold)
underline=$(tput smul)
normal=$(tput sgr0)
read -r -d '' usage << DOC
Prints out a table of tmux sessons, windows, and panels.
#!/usr/bin/env bash
set -eu
declare -t _lastcmd; trap '_lastcmd="$BASH_COMMAND"' DEBUG; trap 'echo "LINE $LINENO: $_lastcmd"' EXIT;
# export CA PEM from Apple "Keychain Access" app and pass as ARG1
new_ca_cert="$1"
get_python_cert_chain(){
python -m certifi
}
#!/bin/bash
# gzip < hello_linux | base64 -b 76 > hello_linux.gz.base64
# :r !gzip < hello_linux | base64 -b 76
touch hello_linux; chmod +x hello_linux
( base64 -d | gunzip ) >hello_linux <<BASE64
H4sIAAGhdGAAA+1bb2gcxxWf+6N/kX06KXakWC6+OA5Rkmp9dmJFqe14T39XydlWHSltaZXJWXeS
Ltwf9W7PkVpobdS6HKlTlRLol0Ag+eBSAv1S4pSS2Mi1v5mEFmpoCsbEVG2aRIHWmEK0nZl9b29n
bpXaX0oL++Du7fvNezNv3s7evr2d9/3h5EgwECBIQfIk4ZIe1YWsA36u31FhWD9pZd9fIttJI5PD
Lj2d6BKfCxKJN4NeCOzOAn42qEt8O+ghD7h4mLhJl7gOjchJtGbX4JIJzA/5mzAAcred6CoGeEyX
@RichardBronosky
RichardBronosky / less
Last active December 21, 2022 12:22
A vim wrapper that allow you to use it for a pager, man reader, etc.
#!/usr/bin/env bash
set -eu
cache_file="/tmp/pager.cache"
[[ ! -p "$cache_file" ]] && touch "$cache_file" && trap "rm $cache_file" 0
cat > "$cache_file"
vim -R -c "terminal cat $cache_file"
@RichardBronosky
RichardBronosky / Dockerfile
Created January 11, 2021 22:50
Jupyter notebook with bash kernel and ability to `su -` to install software
# https://docs.docker.com/engine/reference/builder/
# /home/jovyan/work
ARG BASE_CONTAINER=jupyter/minimal-notebook
FROM $BASE_CONTAINER
LABEL maintainer="Bruno Bronosky <bruno@bronosky.com>"
USER root
# Install all OS dependencies for fully functional notebook server
RUN pip install bash_kernel && python -m bash_kernel.install
@RichardBronosky
RichardBronosky / README.md
Last active February 12, 2024 17:57
A homebrew formula to build vim with support for pyenv version of python

A homebrew formula to build vim with support for pyenv version of python

Build

  1. Patch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb
  2. Build
    brew reinstall --verbose --debug --build-from-source vim
  3. Locate your dynamic library with find /Users/bronoric/.pyenv/ -name '*libpython3*.dylib'
    • It's probably going to contain darwin in the path.