#user-defined functions gtp(){ [ -z "$*" ] && commit=$(curl -s "https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt" | shuf -n1) || commit=$* git add . git commit -m "$commit" git push unset commit } gtb () { [ -z "$*" ] && br=$(git branch -a | fzf --border=rounded --layout=reverse --height=10 | tr -d ' ') || br=$* [ -z "$br" ] || git checkout $br unset br } b64 () { printf "%s" "$1" | base64 $2; } url() { curl -s https://0x0.st -F "file=@$*" | xclip -sel clip && notify-send "Link copied to clipboard"; } gtd () { [ -z "$*" ] && file=$(git diff --name-only | fzf --border=rounded --height=10 --layout=reverse | tr -d ' ') || file=$* [ -z "$file" ] || git diff $file unset file } connectvnc () { ssh -N -T -L 5900:localhost:5900 -L 9873:localhost:9873 root@45.32.230.158 & temp=$! sleep 4 vncviewer :0 kill $temp unset temp sleep 1 } gtc () { [ -z "$*" ] && [ -p "/dev/stdin" ] && read -r query