Skip to content

Instantly share code, notes, and snippets.

@seize-the-dave
seize-the-dave / commit-waiting-time.sh
Last active September 21, 2018 12:39
Prints out each merge in the tree, combines it with the age of the last commit on each branch, and reverse sorts it.
#!/bin/bash
export prefix="origin/release"
export curr="$prefix/2.21"
export time="091900002018"
for repo in $(echo */); do
pushd $repo > /dev/null
if [ $(git branch -r | grep -c $curr) -ne 0 ]; then
export curr_line=$(($(git branch -r | grep "$prefix/[012]" | sort -r | grep -n $curr | cut -f1 -d':') + 1))
export prev=$(git branch -r | grep "$prefix/[012]" | sort -r | head -n $curr_line | tail -n 1 | cut -f3 -d' ')
for commit in $(git log $prev..$curr --pretty=format:"%ct %d" | tail -n +1 | grep '(' | uniq -is 10 | cut -f1 -d' '); do
@seize-the-dave
seize-the-dave / .bash_profile
Last active September 20, 2018 08:34
.bash_profile for macOS
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
alias ll='ls -lFha'
alias cat='bat'
# https://github.com/Bash-it/bash-it/blob/master/aliases/available/git.aliases.bash
alias gpom='git push origin master'
@seize-the-dave
seize-the-dave / update.sh
Last active May 10, 2018 10:37
Iterate over multiple yaml files for jira-to-analytics.js
#! /bin/bash
process_yaml() {
conf=$1
echo "Processing" $conf
node jira-to-analytics.js -i $conf -o $(basename "$conf" .yaml).csv > /dev/null
echo
}
if [ "$#" -eq "1" ]; then
@seize-the-dave
seize-the-dave / jira-weekly-samples.py
Created March 13, 2017 12:37
Pull the number of weekly done issues out of JIRA for use as forecasting samples
from jira import JIRA
import arrow
from datetime import timedelta
DONE_ISSUES_QUERY = 'statusCategory = done'
SAMPLES=24
jira = JIRA()
dates = []
@seize-the-dave
seize-the-dave / jira-flow-efficiency.py
Last active June 13, 2017 22:11
Flow Efficiency Calculation for JIRA
from jira import JIRA
import arrow
import datetime
from collections import defaultdict
jira = JIRA()
work = []
work.append('In Progress')
work.append('In Review')
@seize-the-dave
seize-the-dave / configure-macos.sh
Last active July 9, 2020 11:58
Script to install everything onto a new Mac
# Install command line developer tools
xcode-select --install
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Reset brew
brew update
brew upgrade brew-cask
brew cleanup