Skip to content

Instantly share code, notes, and snippets.

Avatar

Noah Sussman textarcana

View GitHub Profile
@textarcana
textarcana / LICENSE
Last active May 5, 2020
Bash Dependency Mapper
View LICENSE
Copyright 2010-2019 Noah Sussman New Media, LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@textarcana
textarcana / .emacs
Created Feb 15, 2009
.emacs for Windows port of GNU Emacs
View .emacs
;; Noah Sussman's .emacs file
;; Created Oct 18, 2001
;; Time-stamp: <c:/noah/n_s/config/emacs/.emacs last changed by Noah Sussman on PENTAGRAM/Textarcana Friday 27 February 2009 at Eastern Standard Time 12:37:21>
;; Introduction
;; emacs command reference:
;; SHELL MODE
;; Normally you can type M-x shell to open a new shell buffer, but if you already have one open that will just switch to the existing one. The solution is to use M-x rename-buffer to change the name of the first shell buffer before creating another one.
;; Use M-r regexp and M-s regexp to search in reverse and forward, respectively, through the command history. To search using the same regex as last time, leave the regex entery field blank and hit return.
;;
;; EDITING
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_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 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 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"