Skip to content

Instantly share code, notes, and snippets.

View skchronicles's full-sized avatar
🔬
"There's no place like ${HOME:-/dev/null}"

Skyler Kuhn skchronicles

🔬
"There's no place like ${HOME:-/dev/null}"
View GitHub Profile
@skchronicles
skchronicles / retry.sh
Last active July 8, 2022 22:10
Retry a BASH command
#!/usr/bin/env bash
function err() { cat <<< "$@" 1>&2; }
function fatal() { cat <<< "$@" 1>&2; exit 1; }
function retry() {
# Tries to run a cmd 5 times before failing
# If a command is successful, it will break out of attempt loop
# Failed attempts are padding with the following exponential
# back-off strategy {4, 16, 64, 256, 1024} in seconds
# @INPUTS "$@"" = cmd to run
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 26, 2024 17:22
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites