Skip to content

Instantly share code, notes, and snippets.

Avatar

Noah Sussman textarcana

View GitHub Profile
@textarcana
textarcana / spell_check.pl
Created Mar 18, 2021
Spell check a word on the command line.
View spell_check.pl
#!/usr/bin/env perl -w
# Suggest alternate spellings for a word
use strict;
use Text::Aspell;
my $speller = Text::Aspell->new;
my $word = qq{$ARGV[0]};
@textarcana
textarcana / profanity_search.sh
Last active Mar 18, 2021
Profanity search command line tool.
View profanity_search.sh
#!/usr/bin/env bash
set -Eeuo pipefail
profane_regex=$(
perl -e '
use Bad::Words;
my $wordref = new Bad::Words;
my $updated = $wordref->remove(qw(
xxx
View find_files_for_git_log.sh
filesystem_paths=$(
find . \
-name "*.php" \
-not -name "*Test.php"
)
git log \
--since='3 weeks ago' \
--format='%ad' \
--date=iso-local \
View find_files_for_git_log.sh
filesystem_paths=$(find . -name "*Test.php")
git log \
--since='3 weeks ago' \
--format='%ad' \
--date=iso-local \
$filesystem_paths \
| cut -d ' ' -f1 \
| sort \
| uniq -c
View compare_codebase_to_testbase_in_terms_of_commits_within_an_interval.sh
(
echo 'app/'
echo 'test/'
) \
| xargs -I@ bash -c "
echo @
git log \
--since='3 weeks ago' \
--format='%ad' \
--date=iso-local @ \
View commits_on_weekdays_tsv.sh
TZ=$(date +%z) git log --reverse --date-order --format="%cd" --date=iso-local \
| dateround -S Sun \
| cut -d'T' -f1 \
| uniq -c \
| column -t \
| perl -pwe 's{\s+}{\t}'
View commits_per_month_tsv.sh
TZ=$(date +%z) git log --reverse --date-order --format="%cd" --date=iso-local \
| cut -d- -f1-2 \
| uniq -c \
| column -t \
| perl -pwe 's{\s+}{\t}'
View git_commits_in_history.sh
repo_age=$(git log --date=relative --reverse --format="%ad" | head -n1)
commits_in_history=$(git log --pretty=oneline | wc -l)
echo "$commits_in_history commits since $repo_age"
@textarcana
textarcana / keybase.md
Created Sep 10, 2019
I fucked up and had to reset keybase :crying_cat_emoji:
View keybase.md

Keybase proof

I hereby claim:

  • I am textarcana on github.
  • I am noahsussman (https://keybase.io/noahsussman) on keybase.
  • I have a public key whose fingerprint is 213A 97DC 9AAD 2558 211B 4AA9 69A2 64E6 E6FC 9159

To claim this, I am signing this object: