bash v3
function key_val () {
case $1 in
"foo") echo "bar";;
#!/usr/bin/env bash | |
# | |
# A simple bash function to output colorful messages | |
# | |
# Usage: | |
# out "Hello world!" | |
# out warn "A warning message" | |
# out error "An error message" | |
# |
#!/usr/bin/env python3 | |
import asyncio | |
import functools | |
import logging | |
import math | |
import signal | |
import time | |
from contextlib import asynccontextmanager, contextmanager |
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
# Initialization code that may require console input (password prompts, [y/n] | |
# confirmations, etc.) must go above this block; everything else may go below. | |
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH |
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
versionBump: | |
description: 'Version bump' | |
required: true | |
default: 'patch' | |
type: choice |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# | |
# A simple bash script to execute all adjacent scripts | |
# | |
# Usage: | |
# source /path/to/all.sh | |
# OR | |
# . /path/to/all.sh | |
# |
#!/usr/bin/env bash | |
# | |
# An over-engineered bash argument parser | |
# Inspired from *args and **kwargs in Python | |
# | |
# Usage: | |
# parse_args "$@" | |
# | |
# Examples: |
#!/usr/bin/env zsh | |
# | |
# Call `nvm use` automatically in a directory with a .nvmrc file, silently | |
# | |
# Usage: | |
# Add this to your ~/.zshrc | |
# | |
# Taken from https://github.com/nvm-sh/nvm#zsh | |
# Difference being that this one is less verbose (like pyenv or goenv) |
#!/usr/bin/env bash | |
# | |
# This script will append additional entries (from http://winhelp2002.mvps.org/hosts.txt) in /etc/hosts file. | |
# run: "adblock" | |
# | |
# Notes: | |
# - A backup is created as `hosts.bk` in current working directory. | |
# |