-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.sharedrc
136 lines (107 loc) · 3.35 KB
/
.sharedrc
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
[[ -e $HOME/.sharedrc-addon ]] && source $HOME/.sharedrc-addon
# Add ~/.bin to path
export PATH=$HOME/.yadm-project:$HOME/.local/bin:$HOME/.local/gnubin:$PATH
# Add yarn binaries to path
export PATH=$HOME/.yarn/bin:$PATH
# Add toolbox to path
export PATH=$HOME/.toolbox/bin:$PATH
# Force Gnome keyring usage if it is enabled
keyring_path="/run/user/${EUID}/keyring/ssh"
if [[ -e $keyring_path ]]; then
export SSH_AUTH_SOCK="$keyring_path"
fi
# Use custom certs file for python requests if it exists
if [[ -e $HOME/.local/ssl/cert.pem ]]; then
export REQUESTS_CA_BUNDLE=$HOME/.local/ssl/cert.pem
fi
# Aliases
alias vi=vim
alias cat=bat
alias less=bat
alias rsync='rsync --info=progress2'
alias grep='grep --color=auto'
alias kmonday='kinit -f -l 7d -r 30d'
alias bb='brazil-build'
alias mwinit="mwinit -s"
alias mwcurl='curl --location-trusted --negotiate -u : -b ~/.midway/cookie -c ~/.midway/cookie'
alias update_internal_certs='mkdir -p $HOME/.local/ssl; security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain /Library/Keychains/System.keychain > $HOME/.local/ssl/cert.pem'
export SEMGREP_SEND_METRICS=off
if [[ $(uname) == Linux ]]
then
alias copy='copy --reflink=auto'
alias mwinit="mwinit -s -o"
fi
export EDITOR="vim"
export AWS_PAGER="" # Disable pagination in AWS CLI by default
# Fix to make vim work with color themes
if [[ $TERM != linux ]]
then
export TERM=xterm-256color
fi
# Path fix for RHEL/Debian
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin
# Add RVM to PATH
export PATH="$PATH:$HOME/.rvm/bin"
# Add Rust cargo to PATH
export PATH="$HOME/.cargo/bin:$PATH"
# Add go binaries to PATH
export PATH="$HOME/go/bin:$PATH"
# Add linuxbrew to path
if [[ -e /home/linuxbrew/.linuxbrew ]]; then
eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
fi
# Add mac brew to path
if [[ -e /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
if $(which conda &>/dev/null); then
__conda_setup="$('/usr/bin/conda' "shell.${SHELL##*/}" 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/usr/etc/profile.d/conda.sh" ]; then
. "/usr/etc/profile.d/conda.sh"
else
export PATH="/usr/bin:$PATH"
fi
fi
unset __conda_setup
fi
# <<< conda initialize <<<
# CDK helpers
cdk-add() {
packages=""
for target in "$@"; do
packages+=" @aws-cdk/aws-$target"
done
echo "Adding: $packages"
if [[ $SHELL =~ zsh ]]; then
yarn add ${=packages}
else
yarn add $packages
fi
}
# Source nix if it is available
NIX_PATH="$HOME/.nix-profile/etc/profile.d/nix.sh"
if [[ -e $NIX_PATH ]]; then
. $NIX_PATH
fi
# tabtab source for packages
# uninstall by removing these lines
[ -f ~/.config/tabtab/__tabtab.bash ] && . ~/.config/tabtab/__tabtab.bash || true
# https://gnunn1.github.io/tilix-web/manual/vteconfig/
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
source /etc/profile.d/vte.sh
fi
# Disable homebrew auto-updating and cleaning and stuff all the time
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
# Don't use goproxy, doesn't work on certain networks
export GOPROXY=direct
# Amazon Toolbox
export JAVA_TOOLS_OPTIONS="-Dlog4j2.formatMsgNoLookups=true"
export PATH=$PATH:$HOME/.toolbox/bin
[[ -e $HOME/.sharedrc-addon-late ]] && source $HOME/.sharedrc-addon-late