about summary refs log tree commit diff
path: root/users/riking/dotfiles
diff options
context:
space:
mode:
authorKane York <kanepyork@gmail.com>2020-07-01T20·47-0700
committerKane York <rikingcoding@gmail.com>2020-07-02T06·19+0000
commita2e86152401c7c531801c79347c3f15e1806aabc (patch)
tree6532e5f4c7bb65122ed6e98a629460548ae39adb /users/riking/dotfiles
parent66f5e9f6c3a3c6b5dbb931493460289b67885830 (diff)
chore(users/riking/dotfiles): add .mybashrc r/1156
Change-Id: Ib33a0a6819b7a3285fe1130657a7b1644a84f493
Reviewed-on: https://cl.tvl.fyi/c/depot/+/837
Reviewed-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/riking/dotfiles')
-rw-r--r--users/riking/dotfiles/.mybashrc53
1 files changed, 53 insertions, 0 deletions
diff --git a/users/riking/dotfiles/.mybashrc b/users/riking/dotfiles/.mybashrc
new file mode 100644
index 000000000000..c5ebc34a1f4f
--- /dev/null
+++ b/users/riking/dotfiles/.mybashrc
@@ -0,0 +1,53 @@
+
+# BEGIN: __USER_FUNCTIONS__
+function gh-clone() {
+	if [[ "x$2" == "x" ]]; then
+		IFS='/' read -ra PARTS <<< "$1"
+		user="${PARTS[0]}"
+		repo="${PARTS[1]}"
+	else
+		user="$1"
+		repo="$2"
+	fi
+	if [[ -d ~/go/src/github.com/"$user"/"$repo" ]]; then
+		cd ~/go/src/github.com/"${user}"/"${repo}"
+		return 0
+	fi
+	mkdir -p ~/go/src/github.com/"${user}"
+	cd ~/go/src/github.com/"${user}"
+	git clone git@github.com:"${user}"/"${repo}".git
+	cd ~/go/src/github.com/"${user}"/"${repo}"
+}
+
+function download() {
+	cd "${HOME}/Downloads"
+	wget "$@"
+}
+
+# todo: only one password pls
+function prodaccess() {
+	(ssh-add -L | grep -q 'ZgEu6S3SLatYN') || ssh-add "$HOME"/.ssh/id_ed25519
+	(ssh-add -L | grep -q 'Gfh2S3kUwZ8A6') || ssh-add "$HOME"/.ssh/id_rsa.discourse
+	echo "signing test" | gpg --clearsign > /dev/null
+}
+
+function reset-audio() {
+	pulseaudio -k && sudo alsa force-reload
+}
+
+function tvl-push() {
+	git push origin HEAD:refs/for/canon
+}
+
+# END: __USER_FUNCTIONS__
+
+# BEGIN: __USER_ENV__
+GOPATH=$HOME/go
+CDPATH=$HOME/go/src
+export GPG_TTY="$(tty)"
+
+export PATH="/usr/local/go/bin:$HOME/go/bin:$HOME/.rbenv/bin:$PATH"
+
+eval "$(rbenv init -)"
+# END: __USER_ENV__
+