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
Created April 20, 2018 14:12
Modified Matrix Effect (original from @khakimov)
#!/bin/bash
lines=$(tput lines)
cols=$(tput cols)
awkscript='
{
lines=$1
random_col=$3
letter=$4