-
Notifications
You must be signed in to change notification settings - Fork 2
/
.zshrc.local
61 lines (49 loc) · 1.89 KB
/
.zshrc.local
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
#!/bin/sh
#############
## Helpers ##
#############
# Helper shortcut to access git projects.
# Use `p <project_folder>`, ex.: `p web`
p() { cd "$HOME/Projects/$1" || return; }
_p() { _files -W ~/Projects -/; }
compdef _p p
#############
## Exports ##
#############
# Misc env variables
export EDITOR='code --wait'
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
export RUBYOPT='--enable-yjit -W:deprecated -W:performance'
# Puppeteer M1 https://github.com/puppeteer/puppeteer/issues/6622#issuecomment-928311570
CHROMIUM_PATH=$(which chromium)
echo "$CHROMIUM_PATH" | grep -q "not found" && echo "chromium not found, run \"brew install chromium --no-quarantine\" (needed for Puppeteer)"
export PUPPETEER_EXECUTABLE_PATH="$CHROMIUM_PATH"
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
# Ruby & MacOS bug https://github.com/rails/rails/issues/38560
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
export NODE_OPTIONS="--max-old-space-size=6144"
# Node installation setup
# (you can manage node with Homebrew OR NVM)
#
# # Homebrew setup:
export PATH="/usr/local/opt/node@18/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/node@18/lib"
export CPPFLAGS="-I/usr/local/opt/node@18/include"
#
# # NVM setup:
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
#############
## Aliases ##
#############
alias be="bundle exec"
alias dbreset="be rails db:drop db:create db:schema:load db:migrate db:seed"
alias reset-azeroth="be rails azeroth:reset"
alias sync-graphql="be rails graphql:dump_schema && yarn graphql-types"
alias rails-console="be rails c"
alias tail-logs="tail -f log/development.log"
# Rails/Sorbet typing
alias sync-i18n-types="yarn i18n-types"
alias sync-rbis-dsl="be rails tapioca:dsl"
alias sync-rbis-test="be rails rbi:test_dsl"