mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-22 16:27:41 +00:00
Add a bunch of new bin files
This commit is contained in:
parent
0250897a4b
commit
67e5dd7444
36
assets/default/bin/git-monthly
Executable file
36
assets/default/bin/git-monthly
Executable 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
7
assets/default/bin/haste
Executable 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}'
|
||||
|
5
assets/default/bin/pbcopy-remote
Executable file
5
assets/default/bin/pbcopy-remote
Executable 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
16
assets/default/bin/pbcopy-tmux
Executable 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
|
6
assets/default/bin/pbpaste-tmux
Executable file
6
assets/default/bin/pbpaste-tmux
Executable 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
|
3
assets/default/bin/tmux-link-window
Executable file
3
assets/default/bin/tmux-link-window
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
tmux new-session "tmux link-window -s $*"
|
Loading…
Reference in New Issue
Block a user