Skip to content

Instantly share code, notes, and snippets.

View indygwyn's full-sized avatar

Thomas W. Holt Jr. indygwyn

  • Indianapolis, IN US
View GitHub Profile
@indygwyn
indygwyn / script-template.sh
Created December 18, 2020 14:43 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@indygwyn
indygwyn / sync-history.sh
Created March 4, 2020 20:06 — forked from jan-warchol/sync-history.sh
Synchronize history across bash sessions
# Synchronize history between bash sessions
#
# Make history from other terminals available to the current one. However,
# don't mix all histories together - make sure that *all* commands from the
# current session are on top of its history, so that pressing up arrow will
# give you most recent command from this session, not from any session.
#
# Since history is saved on each prompt, this additionally protects it from
# terminal crashes.
add_newline = false
[character]
use_symbol_for_status = true
[cmd_duration]
min_time = 4
[directory]
truncation_length = 8
#!/bin/bash
# shellcheck disable=SC1090
shopt -s histappend # append to history instead of overwrite
shopt -s cmdhist # save multiline cmds in history
shopt -s cdspell # spellcheck cd
shopt -s extglob # bash extended globbing
set -o noclobber # no clobber of files on redirect >| override
set -o vi # use a vi-style command line editing interface
export LC_ALL="en_US.UTF-8"
podman-machine create box
eval $(podman-machine env)
eval $(podman-machine env --varlink)
podman run hello-world
podman run busybox echo "hello from busybox"
podman image ls -a
podman ps -a
@indygwyn
indygwyn / Podman-on-MacOS.md
Created January 25, 2020 03:30 — forked from rbo/Podman-on-MacOS.md
Podman on Mac OS
$ export PATH=$(pwd):$PATH
$ podman-machine create box
Podman machine "box" already exists
$ podman-machine start box
Starting "box"...
@indygwyn
indygwyn / tmux.md
Created December 26, 2019 18:11 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@indygwyn
indygwyn / pull-request-poetry.md
Created December 2, 2019 13:53 — forked from obscurerichard/pull-request-poetry.md
pull-request-poetry.md

Pull request poetry

by Richard Bullington-McGuire richard@obscure.org @obscurerichard on GitHub and Twitter

Use these as comments in pull requests in order to charm the project owner into taking action on the pull request.

Initial ticklers

lonely pull request
the completist in me pines
for its prompt closure
@indygwyn
indygwyn / setup-polipo-with-kitchen-on-osx.md
Created November 19, 2019 18:34 — forked from maoo/setup-polipo-with-kitchen-on-osx.md
Setting up polipo with Kitchen on OSX

How To setup polipo on OSX

  • Install polipo with brew install polipo

  • Edit your ~/.bashrc or ~/.zshrc and include

$PLIST_FILE=~/opt/homebrew.mxcl.polipo.plist
alias launch-polipo='launchctl load $PLIST_FILE'
alias stop-polipo='launchctl load $PLIST_FILE'
@indygwyn
indygwyn / README.md
Created November 19, 2019 17:54 — forked from fnichol/README.md
Auto-enable Local HTTP Caching in Test Kitchen

Auto-enable Local HTTP Caching in Test Kitchen

Note: total experiment and hack, looks nasty, could be awesome:

Setup

  • Drop the kitchen.local.yml into $HOME/.kitchen/config.yml
  • Install polipo (with Mac: brew install polipo, with Ubuntu: apt-get install polipo)
  • Drop polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)