Add a bunch of new bin files

This commit is contained in:
ViViDboarder 2017-04-27 10:52:49 -07:00
parent 0250897a4b
commit 67e5dd7444
6 changed files with 73 additions and 0 deletions

36
assets/default/bin/git-monthly Executable file
View File

@ -0,0 +1,36 @@
#! /bin/bash
##########################
# Author: ViViDboarder
# Returns a git log of any commits in the current or given month
##########################
# TODO: Build help text
month=$1
year=$2
if [[ "$month" == "" ]]; then
# Get the current month
month=$(date "+%m")
fi
if [[ "$year" == "" ]]; then
# Get the current year
year=$(date "+%Y")
fi
# Get the next month
if [[ "$month" == "12" ]]; then
# If December, loop to Jan of next year
nmonth="1"
nyear=$((year + 1))
else
# Otherwise, next month of this year
nmonth=$((month + 1))
nyear=$year
fi
# Get the git log between the target month and the next month
git log --before={${nyear}-${nmonth}-1} --after={${year}-${month}-1}

7
assets/default/bin/haste Executable file
View File

@ -0,0 +1,7 @@
#! /bin/sh
host="hb.iamthefij.com"
a=$(cat)
curl -X POST -s -d "$a" https://${host}/documents | awk -v host=$host -F '"' '{print "https://"host"/"$4}'

View File

@ -0,0 +1,5 @@
#! /bin/bash
# Reads hostname from arg1 and gets echos the tmux buffer over to to pbcopy
ssh $1 'tmux show-buffer' | pbcopy

16
assets/default/bin/pbcopy-tmux Executable file
View File

@ -0,0 +1,16 @@
#! /bin/bash
# Mimics pbcopy using the tmux buffer instead. To use, put this in your path as pbcopy
# This is useful for yanking to the cliboard buffer in Vim on a remote box
if [ $# -eq 0 ]; then
read -r clip
while IFS= read -r line; do
clip+=$'\n'"$line"
done
else
clip="$*"
fi
if tmux has &> /dev/null; then
tmux set-buffer "$clip"
fi

View File

@ -0,0 +1,6 @@
#! /bin/bash
# Mimics pbpaste using the tmux buffer instead. To use, put this in your path as pbpaste
# This is useful for putting from cliboard buffer in Vim on a remote box
tmux show-buffer

View File

@ -0,0 +1,3 @@
#! /bin/bash
tmux new-session "tmux link-window -s $*"