Skip to content

Instantly share code, notes, and snippets.

View tomquirk's full-sized avatar

Tom Quirk tomquirk

View GitHub Profile
@tomquirk
tomquirk / clear_stale_node_modules.sh
Created November 5, 2023 01:02
Clear stale node modules
#!/bin/bash
# Check if a directory has had a git commit in the last 30 days
hasRecentGitCommit() {
local dir="$1"
cd "$dir" || return 1
local last_commit_date
last_commit_date=$(git log -1 --format="%at")
local current_date
current_date=$(date +%s)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<!-- https://stripe.com/docs/legacy-checkout/flask -->
@tomquirk
tomquirk / gist:be2ff48c8af6f36acb3987aeb828e1ff
Created October 10, 2021 07:44
Change all commit email addresses
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then

Keybase proof

I hereby claim:

  • I am tomquirk on github.
  • I am tomquirk (https://keybase.io/tomquirk) on keybase.
  • I have a public key ASA-ljH2wVFjipriDV4teTXqptCIv1DwPa-97W5GrO4srQo

To claim this, I am signing this object:

@tomquirk
tomquirk / all-git-status
Created July 5, 2016 07:00
perform `git status` of all folders within current directory
#!/bin/bash
for i in $( ls );
do
printf "\n************\nPROJECT: $i\n\n"
DEV_ROOT=$PWD
cd $DEV_ROOT/$i
git status
cd $DEV_ROOT;
done
[Python Inverted]
definition-foreground = #7daffb
definition-background = #2e3436
builtin-background = #2e3436
break-foreground = #000000
stderr-background = #2e3436
string-background = #2e3436
console-background = #2e3436
keyword-foreground = #ffba77
stdout-background = #2e3436