Git-clone this project from your home directory (eg: ~/) and run:
$ git clone git@github.com:chadwtaylor/dotfiles.git
When using
brew intsallon ARM-based (M1) machine, installation directory will be/opt/homebrew/...{app-name}(eg:/opt/homebrew/opt/postgresql@10). For Intel-based machine, it will be/usr/local/...{app-name}.
To get the path for a specific app, run:
brew info {app-name}
- Magnet (set up keyboard shortcut for 1/3 and 2/3 space)
- Slack
- Telegram
-
git
$ git config --global user.name "insert-username-here"$ git config --global user.email "insert-email-here"$ cd ~/.ssh && ssh-keygenand follow output instructions as needed$ cat id_rsa.pub | pbcopycopies the key into clipboard- Go to
github.com/settings/keysand createNew SSH keyand do a paste
-
rbenv
- Add the following lines to ~/.zshrc
export PATH="$HOME/.rbenv/bin:$PATH"eval "$(rbenv init - zsh)"- If you need to begin installing ruby:
rbenv install X.X.X(as of 2023-JUL-6,3.0.6)- if you're installing
2.6.3specifically for legacy API, run the following command instead: $ RUBY_CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.6.3
- Add the following lines to ~/.zshrc
-
heroku cli (https://devcenter.heroku.com/articles/heroku-cli)
-
nvm
$ nvm install 18$ nvm alias default 18- Add the following to
.zshrc:export NVM_DIR="$HOME/.nvm" [ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
-
postgresql@10 (if using different version, use postgresql@13 for example)
- To enable
psql, addexport PATH="/opt/homebrew/opt/postgresql@10/bin:$PATH"to ~/.zshrc- If you get
FATAL: database "your-username-here" does not exist, run the command$ createdband running$ psqlshould work
- If you get
- Troubleshooting: https://github.com/chadwtaylor/dotfiles/wiki/Troubleshooting
- To enable
-
redis
$ brew services start redis
-
nvim
-
python
- Google Drive (https://www.google.com/drive/download/)
- VSCode
- Enable Sync to load configurations: Preferences > Settings Sync (I believe sync happens with GitHub - can't remember)
- For reference, refer to following files and edit as needed
~/Library/Application Support/Code/User/settings.json~/Library/Application Support/Code/User/snippets/...<= for snippets such asvue-script.json.code-snippets
- Chrome
- Alfred (https://www.alfredapp.com/)
- Powerpack with license code
- Set up advanced: Syncing: ~/iCloud Drive/Applications/Alfred
- Disable macos spotlight keyboard shortcut
- Setup Alfred Hotkey: Command-Space
- Setup Features: Clipboard History Hotkey: Ctrl-Option-Command-H
- 1Password (https://1password.com/downloads/mac/)
- TablePlus
- Preferences > Locations - link to ~/iCloud Drive/Applications/TablePlus/
- Insomnia Client
- Go to Preferences > Data
- Export data from old laptop into ~/iCloud Drive/Applications/TablePlus/
- Import data into new laptop
- Go to Preferences > Themes and choose
Gruvbox Dark
- Go to Preferences > Data
- Sketch (then set up using subscription account)
- Wally (https://ergodox-ez.com/pages/wally)
- iStats Pro
- Refer to
Configurationsbelow to set menu bar date/time to an analog clock to use iStats data/time instead
- Refer to
- Convo
Default shell for macos is
zsh
- Installation instructions for
oh-my-zsh: https://github.com/ohmyzsh/ohmyzsh/wiki - After installing
oh-my-zsh, perform the following commands:$ cd ~$ mv .zshrc .zshrc.backup$ git clone git@github.com:chadwtaylor/dotfiles.git$ ln -s dotfiles/zsh/.zshrc .zshrc$ ln -s dotfiles/zsh/aliases.zsh .oh-my-zsh/custom/aliases.zsh
- Sys Pref >
- Security & Privacy > Use Apple Watch to unlock
- Printers & Scanners > Add Brother Printer
- Keyboard > Modifiers > Swap
Caps LockforEsc - Dock & Menu Bar > Clock (Menu Bar) > Time Options set to
Analog
$ defaults write -g ApplePressAndHoldEnabled -bool falseto disable long-hold accent characters and use key-repeat instead- Custom domain name
$ nvim sudo /etc/hosts- Add the following lines:
127.0.0.1 linguabee.localhost 127.0.0.1 app.localhost 127.0.0.1 nectar.localhost
- Ensure
export FONT_AWESOME_AUTH_TOKEN="insert-token-here"is defined in.zshrc. - Copy
.envover from the old machine into the project root folder. $ yarn installto get started.$ yarn devto boot up the server (or use alias like$ oo2.webapp.start)
NOTE: I was on the
developbranch when I ran intojs heap out of memoryerror (common error for those on ARM-based environment) during the$ yarn installprocess. What fixed it for me was checking out themainbranch, re-running theyarn installand it worked, then went back to thedevelopbranch and did the$ yarn installagain, it worked.
Before you do this, make sure you follow
rbenvinstallation instructions above Also address items in this README: https://github.com/octoopi/api/blob/feature/v2/README.md
$ rbenv install X.X.X(refer to.ruby-versionfor current version)- Try
$ bundle install(if no issue arises, you're in luck; otherwise, see possible issues/solutions below) - Gem installation of
pgmay break, esp on M1 computers, try the following:$ gem install pg -- --with-pg-config=/opt/homebrew/opt/postgresql@10/bin/pg_config(credit: https://gist.github.com/jonathandean/7449772)
- Gem installation of
idn-rubymay break and if so, try the following:gem install idn-ruby -v '0.1.4' -- --with-idn-dir=$(brew --prefix libidn)
- When above issues clear, re-run
$ bundle install - Copy over the following files from the old machine:
application.ymllocal_env.ymlmaster.key
- Get latest db (make sure you're in legacy environment, run command:
oo1.api)$ oo.db.dump$ oo1.db.restore
- Run in SQL terminal (eg: TablePlus):
drop database oo2_primaryandcreate database oo2_primary with template oo1_primary - You need
oo2_journalcrap so create abackup(TablePlus > File > Backup) ofoo2_journalfrom old laptop and thenrestore(TablePlus > File > Restore) into new laptop - Run the migration (eg:
$ be rake db:skep_migration_v1)