oh boy, 2 years no changes
This commit is contained in:
parent
aafd0a11b5
commit
5ed18872ef
15
bash_aliases
15
bash_aliases
@ -1,4 +1,5 @@
|
||||
#!/usr/local/bin/zsh
|
||||
export EDITOR=vim
|
||||
# Aliases
|
||||
alias ag='\ag --pager="less"'
|
||||
alias c='\cat'
|
||||
@ -7,10 +8,11 @@ alias cg='cd "$(git rev-parse --show-toplevel)"'
|
||||
alias ctags="`brew --prefix`/bin/ctags"
|
||||
alias dots="cd $(dirname `readlink ~/.vim`)"
|
||||
alias g='git'
|
||||
alias gp='git push'
|
||||
alias gp='git push -u'
|
||||
alias ppjson="python -m json.tool"
|
||||
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
|
||||
alias httpie="http"
|
||||
alias fuckingip="curl https://wtfismyip.com/json"
|
||||
|
||||
# Functions
|
||||
function cpbr () {
|
||||
@ -31,25 +33,24 @@ function h () {
|
||||
history | egrep "$@"
|
||||
fi
|
||||
}
|
||||
settitle() {
|
||||
printf "\033k$1\033\\"
|
||||
|
||||
settitle () {
|
||||
echo -ne "\033]0;"$*"\007"
|
||||
}
|
||||
|
||||
|
||||
tide() {
|
||||
for var in "$@"
|
||||
do
|
||||
tmux new-window -c "/code/tidelift/$var" -n "$var"
|
||||
printf "\033k$var\033\\"
|
||||
open -a iTerm ~/code/tidelift/$var
|
||||
settitle $var
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
# options
|
||||
export LESS=-RFX
|
||||
export PAGER="less"
|
||||
alias love="/Applications/love.app/Contents/MacOS/love"
|
||||
|
||||
pullall (){
|
||||
for d in ./*/ ; do (cd "$d" && pwd && git pull); done
|
||||
|
2
bin/SC
2
bin/SC
@ -10,5 +10,5 @@ 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 https://tyrelsouza.com/screenshots/$fname | pbcopy
|
||||
echo -ne https://tyrelsouza.com/screenshots/$fname | pbcopy
|
||||
rm "$FILENAME"
|
||||
|
14
bin/SCmd
Executable file
14
bin/SCmd
Executable 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
6
bin/datecalc.py
Executable 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
1
bin/duck.sh
Executable 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
1
bin/git-fuck
Symbolic link
@ -0,0 +1 @@
|
||||
oh_fuck.sh
|
43
bin/gstate
Executable file
43
bin/gstate
Executable 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
2
bin/midweek.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
open https://zoom.us/j/605629105
|
@ -12,5 +12,5 @@ echo $END
|
||||
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 -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
|
||||
|
4
bin/restart_bluetooth
Executable file
4
bin/restart_bluetooth
Executable 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
2
bin/spicy.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
open https://zoom.us/j/132567965
|
BIN
bin/tidelift
Executable file
BIN
bin/tidelift
Executable file
Binary file not shown.
38
bin/vimv
Executable file
38
bin/vimv
Executable 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.
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
osascript -e "display notification \"Drink Water\" with title \"Drink Water\""
|
||||
#say "[[volm 0.10]] drink water"
|
||||
say "[[volm 0.10]] drink water"
|
||||
|
||||
|
@ -3,6 +3,6 @@ day=$(date +"%u")
|
||||
if ((day == 5)); then
|
||||
open https://zoom.us/j/476328355
|
||||
else
|
||||
open https://zoom.us/j/730281448
|
||||
open https://zoom.us/j/91489699692?pwd=YTUwbjVBU1Fobklvc05XZ0pUaEwzQT09
|
||||
fi
|
||||
|
||||
|
20
gitconfig
20
gitconfig
@ -1,5 +1,6 @@
|
||||
[core]
|
||||
excludesfile = /Users/tyrel/.gitignore_global
|
||||
editor = vim
|
||||
[user]
|
||||
email = tyrelsouza@gmail.com
|
||||
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
|
||||
[alias]
|
||||
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
|
||||
bc = !git branch --merged master | grep -v master | 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
|
||||
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 main | xargs git branch -D
|
||||
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
|
||||
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
|
||||
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
|
||||
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>'"
|
||||
od = "!$EDITOR $(git diff --name-only HEAD)" # Open all changed files differ from current HEAD
|
||||
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
|
||||
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
|
||||
|
1
vim/plugged/calendar.vim
Submodule
1
vim/plugged/calendar.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 8f6c29be2a20af974ff907876a4b6ba9581c346f
|
1
vim/plugged/coc.nvim
Submodule
1
vim/plugged/coc.nvim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b59c1dffb48370c342b63106a0d47970e5347b42
|
1
vim/plugged/command-t
Submodule
1
vim/plugged/command-t
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7364a410bc4f0d7febc183678cd565066dfd1e73
|
1
vim/plugged/ctrlp.vim
Submodule
1
vim/plugged/ctrlp.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e953ee7a80dc96cd00c20ed6fe82e0e817d977ff
|
1
vim/plugged/deoplete.nvim
Submodule
1
vim/plugged/deoplete.nvim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit acae3732524443ecb53af2f4c8078af47381a180
|
1
vim/plugged/emmet-vim
Submodule
1
vim/plugged/emmet-vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e6fb10d22a9bd2a02c386c81486a065e71c6a92d
|
1
vim/plugged/ferret
Submodule
1
vim/plugged/ferret
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit f6d7d01de8a92baee83218001c0bdbade8458a72
|
1
vim/plugged/fzf.vim
Submodule
1
vim/plugged/fzf.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit b31512e2a2d062ee4b6eb38864594c83f1ad2c2f
|
1
vim/plugged/jedi-vim
Submodule
1
vim/plugged/jedi-vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7f4f2db260e3e693c8b9fc91498f9299c99148c2
|
1
vim/plugged/lua-support
Submodule
1
vim/plugged/lua-support
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3dd3fd6a0b374f9a01637a60fe565a3ac6cc3574
|
1
vim/plugged/rust.vim
Submodule
1
vim/plugged/rust.vim
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 7959279612914eeaa584f5ce719fc71cd967e384
|
1
vim/plugged/supertab
Submodule
1
vim/plugged/supertab
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 40fe711e088e2ab346738233dd5adbb1be355172
|
1
vim/plugged/tagbar
Submodule
1
vim/plugged/tagbar
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 387bbadda98e1376ff3871aa461b1f0abd4ece70
|
1
vim/plugged/vim-airline
Submodule
1
vim/plugged/vim-airline
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3d9071e6b618280000a021a2517e28cb4b497be4
|
1
vim/plugged/vim-airline-clock
Submodule
1
vim/plugged/vim-airline-clock
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit a752ae89d833ce14f87e303f3f479c01065077ca
|
1
vim/plugged/vim-buffergator
Submodule
1
vim/plugged/vim-buffergator
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 947b60dca4d4fc6a041a6ec84b17ca6736d1b916
|
1
vim/plugged/vim-buftabline
Submodule
1
vim/plugged/vim-buftabline
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 14d208b1fa5f4308383e3ce429d57c84423029f9
|
1
vim/plugged/vim-colors-solarized
Submodule
1
vim/plugged/vim-colors-solarized
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 9d37d18381e9b4646fc430685d2e121556c98173
|
1
vim/plugged/vim-emacscommandline
Submodule
1
vim/plugged/vim-emacscommandline
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3363eeb1f958bd0630448fdaa5f19ba7a834b343
|
1
vim/plugged/vim-gitgutter
Submodule
1
vim/plugged/vim-gitgutter
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit c2651aefbd92dca05de1943619df965b848f9b4f
|
1
vim/plugged/vim-go
Submodule
1
vim/plugged/vim-go
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d2f1bbe458d8c7c3154ed113c3768bd84451f872
|
1
vim/plugged/vim-indent-lua
Submodule
1
vim/plugged/vim-indent-lua
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit eb04e43d56be70f786d655a0a562e5f104b49128
|
1
vim/plugged/vim-lua
Submodule
1
vim/plugged/vim-lua
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 8c28e566d21e7cb677c066760c0bcaee1bdb0ad8
|
1
vim/plugged/vim-makegreen
Submodule
1
vim/plugged/vim-makegreen
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6d89b8371e1765c8f739fa5a8c0870d413f93564
|
1
vim/plugged/vim-misc
Submodule
1
vim/plugged/vim-misc
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 3e6b8fb6f03f13434543ce1f5d24f6a5d3f34f0b
|
1
vim/plugged/vim-rspec
Submodule
1
vim/plugged/vim-rspec
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 52a72592b6128f4ef1557bc6e2e3eb014d8b2d38
|
1
vim/plugged/vim-startify
Submodule
1
vim/plugged/vim-startify
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit e25fbe1c0d6f8cda83c0e300d70f9b8009e4134f
|
@ -46,8 +46,3 @@ source ~/.bash_aliases
|
||||
unsetopt share_history
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user