Say for example you got new macbook and you are web developer with stack consist of python for backend and/or typescript for frontend. This instruction will help you to prepare your macbook for work in cutting edge environment.
- Setup o my zsh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Generate ssh key:
Copy you key in the clipboard:
ssh-keygen -o -a 100 -t ed25519 -C "ad@xfenix.ru"
cat ~/.ssh/id_ed25519.pub | pbcopy
- Install FiraCode font: https://github.com/tonsky/FiraCode
- Install chrome: https://www.google.com/chrome/
- Reccomended extensions:
- https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en
- https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en
- Also for Russian users: https://chrome.google.com/webstore/detail/%D0%BE%D0%B1%D1%85%D0%BE%D0%B4-%D0%B1%D0%BB%D0%BE%D0%BA%D0%B8%D1%80%D0%BE%D0%B2%D0%BE%D0%BA-%D1%80%D1%83%D0%BD%D0%B5%D1%82%D0%B0/npgcnondjocldhldegnakemclmfkngch?hl=ru
- https://chrome.google.com/webstore/detail/grammar-spell-checker-%E2%80%94-l/oldceeleldhonbafppcapldpdifcinji
- Install homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install all necessary packages:
brew install postman stats itsycal git iterm2 visual-studio-code pyenv gpg-suite shottr marta node dozer appcleaner keyboardcleantool karabiner-elements
- Dozer help you to organize your menu bar, since macbook notch gain troubles in this area
- Marta is the sublime-like completely free file manager
- AppCleaner help you clean garbage after application removal
- KeyboardCleanTool helps you to clean you keyboard! Very useful app for every developer
- Shottr literally best screenshot tool
- (Optional) Karabiner elements will be useful for remapping keys on the Russian keyboard layout. This really helps for ~ symbol return. On other keyboard layouts it not so useful by default
- Configure Iterm2:
- For macbook with Apple chip (M1, M1 pro, M1 max) install Rosetta2:
softwareupdate --install-rosetta
- Install docker dekstop: https://www.docker.com/products/docker-desktop
- Setup git client:
- Generate GPG key in GPG keychain
- Run command:
Then copy following key:
gpg --list-secret-keys
- Setup:
git config --global user.name "Denis Anikin" git config --global user.email ad@xfenix.ru git config --global user.signingkey KEY_FROM_PREVIOUS_STEP git config --global commit.gpgsign true
- Export GPG key in GPG keychain
- Paste it in https://github.com/settings/gpg/new
- File things:
- Create projects dir
mkdir ~/web/
- Exclude from spotlight indexing (greatly reduce CPU pressure): -> Settings -> Spotlight -> Privacy, press +, then
⌘ + shift + g
and enter following paths:~/web/
~/Library/Containers
- Create projects dir
- Setup pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile echo 'eval "$(pyenv init -)"' >> ~/.zshrc
- Install and select desired python
pyenv install 3.12.1 pyenv global 3.12.1
- Install all necessary packages
pip install ruff mypy
- Configure poetry:
poetry config cache-dir ~/.cache/pypoetry/
- Dont forget to restart bash/zsh session!
This config meant for python development. But you can grab any part of it for other purposes.
- Open the Command Palette (⌘ + ⇧ + P on Mac) OR View ❯ Command Palette
- Type shell command to find Shell Command: Install 'code' command in PATH command
- Install extensions:
code --install-extension wk-j.save-and-run code --install-extension esbenp.prettier-vscode code --install-extension GitHub.github-vscode-theme code --install-extension helgardrichard.helium-icon-theme code --install-extension mde.select-highlight-minimap code --install-extension miguelsolorio.fluent-icons code --install-extension ms-python.mypy-type-checker code --install-extension ms-python.python code --install-extension ms-python.vscode-pylance code --install-extension yzhang.markdown-all-in-one
- Place following in you
settings.json
:{ "workbench.colorTheme": "GitHub Dark", "workbench.iconTheme": "helium-icon-theme", "workbench.productIconTheme": "fluent-icons", "markdown.preview.typographer": true, "markdown.extension.orderedList.marker": "one", "editor.wordBasedSuggestions": false, "editor.fontFamily": "FiraCode-Retina", "editor.fontSize": 14, "editor.fontLigatures": true, "editor.formatOnPaste": true, "editor.formatOnType": true, "editor.formatOnSave": true, "editor.renderWhitespace": "all", "editor.rulers": [120], "debug.console.fontSize": 14, "terminal.integrated.fontSize": 14, "emmet.triggerExpansionOnTab": true, "emmet.includeLanguages": { "plaintext": "html" }, "saveAndRun": { "commands": [ { "match": ".py", "cmd": "ruff check --config=${workspaceFolder}/pyproject.toml ${file}", "silent": true, }, { "match": ".py", "cmd": "ruff format --config=${workspaceFolder}/pyproject.toml ${file}", "silent": true, }, ] }, }
- Dont forget to replace
xfenix
with you user!