-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.profile
More file actions
109 lines (91 loc) · 3.32 KB
/
.profile
File metadata and controls
109 lines (91 loc) · 3.32 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
export PATH=$PATH:~/homebrew/bin
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
export PATH=$PATH:/Users/a08447/Library/Python/2.7/bin
export NPMRC_AUTH_TOKEN_WEALTH=“8960c9c2-2ecb-4dff-a575-5651551c5606”
export ARTIFACTORY_PASSWORD=Artifactory-Build-User
export PATH=$PATH:/Users/a08447/homebrew/Cellar/apache-maven-3.6.1/bin
export PATH=$PATH:/Users/a08447/Library/Python/2.7/bin/aws
export HISTFILESIZE=1000000
export HISTSIZE=1000000
export HISTFILESIZE=1000000
export HISTSIZE=1000000
export NVM_DIR="$HOME/.nvm"
export commonHist=$(history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10)
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
fish_config theme choose "Dracula Official"
alias enableproxies='networksetup -setsecurewebproxystate "Wi-Fi" on && networksetup -setwebproxystate "Wi-Fi" on'
alias disableproxies='networksetup -setsecurewebproxystate "Wi-Fi" off && networksetup -setwebproxystate "Wi-Fi" off'
alias ...='cd ../../../'
alias ....='cd ../../../../'
alias .....='cd ../../../../'
alias .4='cd ../../../../'
alias .5='cd ../../../../..'
alias krug='networksetup -setairportnetwork en0 Krug'
alias wifioff='networksetup -setairportpower airport off'
alias wifion='networksetup -setairportpower airport on'
alias locationauto='networksetup -switchtolocation Automatic'
alias locationmgpru='networksetup -switchtolocation MGPru'
alias mgpru='locationmgpru && networksetup -setairportnetwork en0 MGPRU'
alias krug='locationauto && networksetup -setairportnetwork en0 Krug'
alias k=/usr/local/bin/kubectl
alias free=/Users/a08447/Project/learn/Python/free
alias documents='cd ~/Documents'
alias fd='find ~/ -type f -iname'
alias z='zip -r'
alias uz='unzip'
alias t='tar -zxvf'
alias tz='tar -czvf'
alias g='git'
alias ga='git add'
alias gs='git status -sb'
alias gc='git commit -m'
alias gp='git push'
alias gl='git pull'
alias gco='git checkout'
alias gb='git branch'
alias gd='git diff'
changewifi(){
networksetup -setairportnetwork en0 $1
}
krugon(){
wifioff && sleep 5 && wifion && locationauto && krug
}
mgpruon(){
wifioff && sleep 5 && wifion && locationmgpru && mgpru
}
macnetstat (){
netstat -Watnlv | grep LISTEN | awk '{"ps -o comm= -p " $9 | getline procname;colred="\033[01;31m";colclr="\033[0m"; print colred "proto: " colclr $1 colred " | addr.port: " colclr $4 colred " | pid: " colclr $9 colred " | name: " colclr procname; }' | column -t -s "|"
}
myip() {
if [ $# -ne 0 ] && ( [ "$1" = "-h" ] || [ "$1" = "--help" ] ); then
echo "$(tput setaf 2) Usage: myip country-iso city json port/8080"
exit 0
else
curl ifconfig.co/$1
fi
}
hist(){
echo -e "$(tput setaf 3) $commonHist"
}
todolist() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')]: $@" >> ~/todo.txt
}
weather() {
curl wttr.in
}
tracktime() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')]: $@" >> ~/timetracking.txt
}
sysinfo() {
system_profiler SPSoftwareDataType
}
generate_password() {
openssl rand -base64 12
}
battery() {
pmset -g batt
}
if [[ -e ~/.ssh/known_hosts ]]; then
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh
fi
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm