Skip to content

Instantly share code, notes, and snippets.

View samuelneff's full-sized avatar

Samuel Neff samuelneff

View GitHub Profile
# Simplified hash structure creation/set/get
# Based on https://stackoverflow.com/a/2225712/118703, but modified.
hashKey() {
# replace non-alphanumeric characters with underscore to make keys valid BASH identifiers
echo "$1_$2" | sed -E "s/[^a-zA-Z0-9]+/_/g" | sed -E "s/^[^a-zA-Z0-9]+|[^a-zA-Z0-9]+\$//g"
}
hashPut() {
local KEY=`hashKey $1 $2`
@samuelneff
samuelneff / markdown-callouts.md
Last active August 1, 2023 13:02
Markdown callouts don't work