oh boy, 2 years no changes

This commit is contained in:
Tyrel Souza 2021-02-11 11:25:39 -05:00
parent aafd0a11b5
commit 5ed18872ef
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0
44 changed files with 163 additions and 23 deletions

View File

@ -1,4 +1,5 @@
#!/usr/local/bin/zsh #!/usr/local/bin/zsh
export EDITOR=vim
# Aliases # Aliases
alias ag='\ag --pager="less"' alias ag='\ag --pager="less"'
alias c='\cat' alias c='\cat'
@ -7,10 +8,11 @@ alias cg='cd "$(git rev-parse --show-toplevel)"'
alias ctags="`brew --prefix`/bin/ctags" alias ctags="`brew --prefix`/bin/ctags"
alias dots="cd $(dirname `readlink ~/.vim`)" alias dots="cd $(dirname `readlink ~/.vim`)"
alias g='git' alias g='git'
alias gp='git push' alias gp='git push -u'
alias ppjson="python -m json.tool" alias ppjson="python -m json.tool"
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy" alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
alias httpie="http" alias httpie="http"
alias fuckingip="curl https://wtfismyip.com/json"
# Functions # Functions
function cpbr () { function cpbr () {
@ -31,25 +33,24 @@ function h () {
history | egrep "$@" history | egrep "$@"
fi fi
} }
settitle() {
printf "\033k$1\033\\" settitle () {
echo -ne "\033]0;"$*"\007"
} }
tide() { tide() {
for var in "$@" for var in "$@"
do do
tmux new-window -c "/code/tidelift/$var" -n "$var" open -a iTerm ~/code/tidelift/$var
printf "\033k$var\033\\" settitle $var
done done
} }
# options # options
export LESS=-RFX export LESS=-RFX
export PAGER="less" export PAGER="less"
alias love="/Applications/love.app/Contents/MacOS/love"
pullall (){ pullall (){
for d in ./*/ ; do (cd "$d" && pwd && git pull); done for d in ./*/ ; do (cd "$d" && pwd && git pull); done

2
bin/SC
View File

@ -10,5 +10,5 @@ MD5=($(md5 -q "$FILENAME"))
fname=$MD5.png fname=$MD5.png
scp -rp "$FILENAME" vps:/www/tyrelsouza.com/screenshots/$fname; scp -rp "$FILENAME" vps:/www/tyrelsouza.com/screenshots/$fname;
osascript -e "display notification \"Uploaded $FILENAME to https://tyrelsouza.com/screenshots/$fname\" with title \"Tyrel Upload\"" osascript -e "display notification \"Uploaded $FILENAME to https://tyrelsouza.com/screenshots/$fname\" with title \"Tyrel Upload\""
echo https://tyrelsouza.com/screenshots/$fname | pbcopy echo -ne https://tyrelsouza.com/screenshots/$fname | pbcopy
rm "$FILENAME" rm "$FILENAME"

14
bin/SCmd Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
FILENAME="/Users/tyrel/tmp/screenshot.png"
screencapture -io $FILENAME
sleep 1
MD5=($(md5 -q "$FILENAME"))
fname=$MD5.png
scp -rp "$FILENAME" vps:/www/tyrelsouza.com/screenshots/$fname;
osascript -e "display notification \"Uploaded $FILENAME to https://tyrelsouza.com/screenshots/$fname\" with title \"Tyrel Upload\""
echo -ne "![](https://tyrelsouza.com/screenshots/$fname)" | pbcopy
rm "$FILENAME"

6
bin/datecalc.py Executable file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env python3
from datetime import datetime
if __name__ == "__main__":
print(f"Today is March {(datetime.today() - datetime(2020,2,29)).days}")

1
bin/duck.sh Executable file
View File

@ -0,0 +1 @@
echo url="https://www.duckdns.org/update?domains=tyrel&token=67c42380-3784-4712-a14e-cf77efaeffbf&ip=" | curl -k -o /Users/tyrel/duckdns/duck.log -K -

1
bin/git-fuck Symbolic link
View File

@ -0,0 +1 @@
oh_fuck.sh

43
bin/gstate Executable file
View File

@ -0,0 +1,43 @@
#!/bin/bash
heading() {
# or "\e" on *nix
HEAD="\033[96m\033[1m"
DONE="\033[0m"
echo -e "${HEAD}${1}${DONE}"
}
# 0) find local git repo, or fail now
GIT_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
if [[ "$GIT_ROOT" == "" ]]; then
echo "! can't find nearby git repository" >&2
exit 1
fi
# 1) show git branches
heading Branches
git branch --color -v
echo
# 2) file status
heading Status
git status
echo
# 3) stashed changes
if [[ -n $(git stash list) ]]; then
heading Stash
git stash list | sed "s/^/ /"
echo
fi
# 4) divergence from source
UPSTREAM=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null)
if [[ -n "${UPSTREAM}" ]]; then
heading "upstream [${UPSTREAM}] divergence"
git diff -r $UPSTREAM --name-only --color | sed "s/^/ /"
else
heading "WARNING- no upstream configured"
fi
echo

2
bin/midweek.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
open https://zoom.us/j/605629105

View File

@ -12,5 +12,5 @@ echo $END
echo "Making a gif of $NAME from $START seconds to $END seconds" echo "Making a gif of $NAME from $START seconds to $END seconds"
ffmpeg -y -ss $START -t $END -i $NAME -vf fps=24,scale=640:-1:flags=lanczos,palettegen temp_palette.png ffmpeg -y -ss $START -t $END -i $NAME -vf fps=24,scale=640:-1:flags=lanczos,palettegen temp_palette.png
ffmpeg -i $NAME -i temp_palette.png -ss $START -t $END -pix_fmt rgb24 -filter_complex "fps=24,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" $NAME.gif ffmpeg -i $NAME -i temp_palette.png -ss $START -t $END -pix_fmt rgb24 -filter_complex "fps=12,scale=640:-1:flags=lanczos[x];[x][1:v]paletteuse" $NAME.gif
rm temp_palette.png rm temp_palette.png

4
bin/restart_bluetooth Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport

2
bin/spicy.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
open https://zoom.us/j/132567965

BIN
bin/tidelift Executable file

Binary file not shown.

38
bin/vimv Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
# Lists the current directory's files in Vim, so you can edit it and save to rename them
# USAGE: vimv [file1 file2]
# https://github.com/thameera/vimv
declare -r FILENAMES_FILE="$(mktemp --tmpdir vimv.XXX)"
trap '{ rm -f "${FILENAMES_FILE}" ; }' EXIT
if [ $# -ne 0 ]; then
src=( "$@" )
else
IFS=$'\r\n' GLOBIGNORE='*' command eval 'src=($(ls))'
fi
for ((i=0;i<${#src[@]};++i)); do
echo "${src[i]}" >> "${FILENAMES_FILE}"
done
${EDITOR:-vi} "${FILENAMES_FILE}"
IFS=$'\r\n' GLOBIGNORE='*' command eval 'dest=($(cat "${FILENAMES_FILE}"))'
count=0
for ((i=0;i<${#src[@]};++i)); do
if [ "${src[i]}" != "${dest[i]}" ]; then
mkdir -p "`dirname "${dest[i]}"`"
if git ls-files --error-unmatch "${src[i]}" > /dev/null 2>&1; then
git mv "${src[i]}" "${dest[i]}"
else
mv "${src[i]}" "${dest[i]}"
fi
((count++))
fi
done
echo "$count" files renamed.

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
osascript -e "display notification \"Drink Water\" with title \"Drink Water\"" osascript -e "display notification \"Drink Water\" with title \"Drink Water\""
#say "[[volm 0.10]] drink water" say "[[volm 0.10]] drink water"

View File

@ -3,6 +3,6 @@ day=$(date +"%u")
if ((day == 5)); then if ((day == 5)); then
open https://zoom.us/j/476328355 open https://zoom.us/j/476328355
else else
open https://zoom.us/j/730281448 open https://zoom.us/j/91489699692?pwd=YTUwbjVBU1Fobklvc05XZ0pUaEwzQT09
fi fi

View File

@ -1,5 +1,6 @@
[core] [core]
excludesfile = /Users/tyrel/.gitignore_global excludesfile = /Users/tyrel/.gitignore_global
editor = vim
[user] [user]
email = tyrelsouza@gmail.com email = tyrelsouza@gmail.com
name = Tyrel Souza name = Tyrel Souza
@ -18,21 +19,26 @@
pretty = format:%C(auto)%h %C(green)%G? %C(red)%<(15,trunc)%aN %C(cyan)%<(15,trunc)%ar %C(white)%<(60,trunc)%s %C(auto)%d pretty = format:%C(auto)%h %C(green)%G? %C(red)%<(15,trunc)%aN %C(cyan)%<(15,trunc)%ar %C(white)%<(60,trunc)%s %C(auto)%d
[alias] [alias]
comit = commit comit = commit
ab = "diff --name-only origin/master" ab = "diff --name-only origin/main"
alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases alias = "!git config -l | grep alias | cut -c 7-" # show all these aliases
bc = !git branch --merged master | grep -v master | xargs git branch -d # delete all merged branches bc = !git branch --merged main | grep -v main | xargs git branch -d # delete all merged branches
bcc = !git branch -vv | grep ': gone' | cut -d' ' -f1-3 | grep -v master | xargs git branch -D bcc = !git branch -vv | grep ': gone' | cut -d' ' -f1-3 | grep -v main | xargs git branch -D
d = diff --color-words # prettier diffs d = diff --color-words # prettier diffs
files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # Show files modified per commit files = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # Show files modified per commit
lf = "!git diff --name-only origin/master" # Show all file differing from origin/master lf = "!git diff --name-only origin/main" # Show all file differing from origin/main
ll = log --stat --abbrev-commit # Way more information on git log ll = log --stat --abbrev-commit # Way more information on git log
lb = log --stat --no-merges origin/master.. lp = log --stat -p --abbrev-commit # Way more information on git log
lb = log --stat --no-merges origin/main..
lfm = "!git diff --name-only origin/master" # Show all file differing from origin/main
lbm = log --stat --no-merges origin/master..
logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging logtree= "log --graph --oneline --decorate --all" # show a tree with branches merging
ob = "!$EDITOR $(git diff --name-only origin/master)" # Open all files in editor that differ between origin/master and staged/unstaged noop="!git commit --allow-empty -m 'no op'"
ob = "!$EDITOR $(git diff --name-only origin/main)" # Open all files in editor that differ between origin/main and staged/unstaged
oscar = "!git commit --amend --author='Oscar Spencer <oscar@tidelift.com>'" oscar = "!git commit --amend --author='Oscar Spencer <oscar@tidelift.com>'"
od = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD od = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD
p = push p = push
recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/master/d' | head -n 15" # get the most 10 recent branches worked on recent = "!git for-each-ref --format=\"%(committerdate:relative) | %(refname)\" --sort=-committerdate refs/heads | sed '/main/d' | head -n 15" # get the most 10 recent branches worked on
scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline scrum = log --since='1 day ago' --author='Tyrel Souza' --oneline
st = status # alias like `hg st`, because I like st, shorter is nice! st = status # alias like `hg st`, because I like st, shorter is nice!
tabs = "!git diff --color | sed 's/\t/⌑/g'" # show tabs with ⌑ replacing tabs tabs = "!git diff --color | sed 's/\t/⌑/g'" # show tabs with ⌑ replacing tabs

@ -0,0 +1 @@
Subproject commit 8f6c29be2a20af974ff907876a4b6ba9581c346f

1
vim/plugged/coc.nvim Submodule

@ -0,0 +1 @@
Subproject commit b59c1dffb48370c342b63106a0d47970e5347b42

1
vim/plugged/command-t Submodule

@ -0,0 +1 @@
Subproject commit 7364a410bc4f0d7febc183678cd565066dfd1e73

1
vim/plugged/ctrlp.vim Submodule

@ -0,0 +1 @@
Subproject commit e953ee7a80dc96cd00c20ed6fe82e0e817d977ff

@ -0,0 +1 @@
Subproject commit acae3732524443ecb53af2f4c8078af47381a180

1
vim/plugged/emmet-vim Submodule

@ -0,0 +1 @@
Subproject commit e6fb10d22a9bd2a02c386c81486a065e71c6a92d

1
vim/plugged/ferret Submodule

@ -0,0 +1 @@
Subproject commit f6d7d01de8a92baee83218001c0bdbade8458a72

1
vim/plugged/fzf.vim Submodule

@ -0,0 +1 @@
Subproject commit b31512e2a2d062ee4b6eb38864594c83f1ad2c2f

1
vim/plugged/jedi-vim Submodule

@ -0,0 +1 @@
Subproject commit 7f4f2db260e3e693c8b9fc91498f9299c99148c2

@ -0,0 +1 @@
Subproject commit 3dd3fd6a0b374f9a01637a60fe565a3ac6cc3574

1
vim/plugged/rust.vim Submodule

@ -0,0 +1 @@
Subproject commit 7959279612914eeaa584f5ce719fc71cd967e384

1
vim/plugged/supertab Submodule

@ -0,0 +1 @@
Subproject commit 40fe711e088e2ab346738233dd5adbb1be355172

1
vim/plugged/tagbar Submodule

@ -0,0 +1 @@
Subproject commit 387bbadda98e1376ff3871aa461b1f0abd4ece70

@ -0,0 +1 @@
Subproject commit 3d9071e6b618280000a021a2517e28cb4b497be4

@ -0,0 +1 @@
Subproject commit a752ae89d833ce14f87e303f3f479c01065077ca

@ -0,0 +1 @@
Subproject commit 947b60dca4d4fc6a041a6ec84b17ca6736d1b916

@ -0,0 +1 @@
Subproject commit 14d208b1fa5f4308383e3ce429d57c84423029f9

@ -0,0 +1 @@
Subproject commit 9d37d18381e9b4646fc430685d2e121556c98173

@ -0,0 +1 @@
Subproject commit 3363eeb1f958bd0630448fdaa5f19ba7a834b343

@ -0,0 +1 @@
Subproject commit c2651aefbd92dca05de1943619df965b848f9b4f

1
vim/plugged/vim-go Submodule

@ -0,0 +1 @@
Subproject commit d2f1bbe458d8c7c3154ed113c3768bd84451f872

@ -0,0 +1 @@
Subproject commit eb04e43d56be70f786d655a0a562e5f104b49128

1
vim/plugged/vim-lua Submodule

@ -0,0 +1 @@
Subproject commit 8c28e566d21e7cb677c066760c0bcaee1bdb0ad8

@ -0,0 +1 @@
Subproject commit 6d89b8371e1765c8f739fa5a8c0870d413f93564

1
vim/plugged/vim-misc Submodule

@ -0,0 +1 @@
Subproject commit 3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b

1
vim/plugged/vim-rspec Submodule

@ -0,0 +1 @@
Subproject commit 52a72592b6128f4ef1557bc6e2e3eb014d8b2d38

@ -0,0 +1 @@
Subproject commit e25fbe1c0d6f8cda83c0e300d70f9b8009e4134f

View File

@ -46,8 +46,3 @@ source ~/.bash_aliases
unsetopt share_history unsetopt share_history
export PATH=/usr/local/bin:$PATH export PATH=/usr/local/bin:$PATH
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/tyrel/Downloads/google-cloud-sdk/path.zsh.inc' ]; then source '/Users/tyrel/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/tyrel/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then source '/Users/tyrel/Downloads/google-cloud-sdk/completion.zsh.inc'; fi