-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprofile
64 lines (50 loc) · 1.72 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
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# Set private environment variables
if [ -f ~/.env ]; then
. ~/.env
fi
# Put /usr/local/bin and /usr/local/sbin in the PATH
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# mise (https://mise.jdx.dev/)
export PATH="$HOME/.local/share/mise/shims:$PATH"
# Golang
export GOPATH="$HOME/work/go"
export GOBIN="$GOPATH/bin"
export PATH="$GOBIN:$PATH"
# Node
# Fix FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
# https://stackoverflow.com/questions/53230823/fatal-error-ineffective-mark-compacts-near-heap-limit-allocation-failed-javas
export NODE_OPTIONS="--max-old-space-size=8192"
# yarn
export PATH="$HOME/.yarn/bin:$PATH"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
if command -v pyenv >/dev/null 2>&1; then
# Suppress brew waring caused by pyenv
alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
# Force Pipenv to create its own virtual environment for any project (allow nested virtual environments)
export PIPENV_IGNORE_VIRTUALENVS=1
fi
# Nokogiri
export NOKOGIRI_USE_SYSTEM_LIBRARIES=1
# AWS CLI
export PATH=~/.local/bin:$PATH
# Granted (AWS Role Switcher)
alias assume='source $(mise which assume)'
# Suppress bash deprecation warning on MacOS
# ref: https://support.apple.com/en-gb/HT208050
if [ "$(uname)" == "Darwin" ]; then
export BASH_SILENCE_DEPRECATION_WARNING=1
fi
# Enable Homebrew only on MacOS
if [ "$(uname)" == "Darwin" ]; then
if [ -x "/opt/homebrew/bin/brew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x "/usr/local/bin/brew" ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
fi
# Enable direnv
eval "$(direnv hook bash)"