Skip to content

Instantly share code, notes, and snippets.

View alantheprice's full-sized avatar

Alan Price alantheprice

  • Inicion LLC
  • Minneapolis, MN
View GitHub Profile
@alantheprice
alantheprice / gitcommit.sh
Last active January 30, 2024 17:54
Quick git commit message utility to automate some parts of the message in a standard way
#!/bin/bash
# Define an array of default branch names
DEFAULT_BRANCHES=("master" "main" "develop" "dev")
# Get the current branch name
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME_MSG=""
STAGED_FILES=$(git diff --cached --name-only)
@alantheprice
alantheprice / elementCreator.es6.js
Last active April 9, 2022 00:46
Simple html templating
export const getElementCreator = () => {
const doc = document;
const DIRECT_SET_ATTRIBUTES =
"textContent|innerText|innerHTML|className|value|style|checked|selected|src|srcdoc|srcset|tabindex|target"
.split("|")
.reduce((agg, next) => {
agg[next] = 1;
return agg;
}, {});