Skip to content

Instantly share code, notes, and snippets.

View dhaiducek's full-sized avatar

Dale Haiducek dhaiducek

  • Red Hat
  • Durham, NC
View GitHub Profile
@dhaiducek
dhaiducek / update-org.sh
Last active January 5, 2022 20:06
Recursively update local Git URLs for new organization name from current directory
#! /bin/bash
# Export or update OLD_ORG and NEW_ORG to match the old and new organization names in Git
OLD_ORG=${OLD_ORG:-"<old-org-name>"}
NEW_ORG=${NEW_ORG:"<new-org-name>"}
for REPO in $(find ${PWD} -type d -name .git 2>/dev/null); do
cd ${REPO}
if git remote -v | grep /${OLD_ORG}/ &>/dev/null; then
echo "* Processing: ${REPO}"
@dhaiducek
dhaiducek / gomatrix
Last active June 2, 2026 18:38
Modified Matrix Effect (original from @khakimov)
#!/bin/bash
# shellcheck disable=SC2016
awkscript='
{
lines=$1;
random_col=$3;
letter=$4;
cols[random_col]=0;
for (col in cols) {