-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathprofile
96 lines (76 loc) · 2.51 KB
/
profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/bin/sh
#brew install coreutils
#$(brew --prefix coreutils)
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:/usr/local/opt/openssl/bin:/opt/homebrew/bin:$PATH:$HOME/.zsh/bin"
export MANPATH="/opt/homebrew/opt/coreutils/libexec/gnuman:$MANPATH"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export GOPATH="$HOME/workspace/go"
export PATH="$PATH:$(go env GOPATH)/bin"
# Flutter
export PATH="$PATH:/etc/google-cloud-sdk/bin"
# Flutter
export PATH="$PATH:$HOME/workspace/flutter/bin"
# brew install libpq
export PATH="/usr/local/opt/libpq/bin:$PATH"
# Universe
export PATH="$PATH:$HOME/.universe/bin" # Add RVM to PATH for scripting
# Use GPG
export GPG_TTY=$(tty)
# Auto git template
export GIT_TEMPLATE_DIR="$HOME/.gitconf/git_template"
# Add pyenv executable to PATH and
# enable shims by adding the following
# to ~/.profile and ~/.zprofile:
#
export PYENV_ROOT="$HOME/.pyenv"
if test -f $PYENV_ROOT
then
# Load pyenv into the shell by adding
# the following to ~/.zshrc:
export PATH="$PYENV_ROOT/bin:$HOME/.local/bin:$PATH"
eval "$(pyenv init --path)"
fi
# Copies the current path to the clipboard
alias cpdir="pwd | tr -d '\n' | pbcopy"
# Attached a session if it has been detached from or create a new one
alias startTmux='(tmux ls | grep -vq attached && tmux at) || tmux'
alias ':q'='exit'
alias 'x'='exit'
if type 'nvim' > /dev/null
then
alias vim='nvim'
alias vi='nvim'
fi
#if [ -n "$WSL_DISTRO_NAME" ]; then
# alias git="git.exe"
# alias ssh="ssh.exe"
#fi
function start_idf() {
source "$HOME/esp/esp-idf/export.sh"
source "$HOME/esp/esp-matter/export.sh"
}
function useJava() {
if [[ ! -z $1 ]]; then
local jvm
jvm=$(/usr/libexec/java_home -v "$1")
if [[ $? -eq 0 ]]; then
export JAVA_HOME=$jvm
java -version
fi
fi
}
alias 'sourcegraph'="docker run --publish 7080:7080 --publish 2633:2633 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:3.3.7"
function listening() {
if [ $# -eq 0 ]; then
lsof -iTCP -sTCP:LISTEN -n -P
elif [ $# -eq 1 ]; then
lsof "-iTCP:$1" -sTCP:LISTEN -n -P
else
echo 'Usage: listening [pattern]'
return 1
fi
}
function git-who() {
git ls-files | while read f; do git blame --line-porcelain $f | grep '^author '; done | sort -f | uniq -ic | sort -n
}