├── .gitignore
├── gpg-key.png
├── iterm2-part1.png
├── iterm2-part2.png
├── iterm2-part3.png
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/gpg-key.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xfenix/bootstrap-macbook-for-python/HEAD/gpg-key.png
--------------------------------------------------------------------------------
/iterm2-part1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xfenix/bootstrap-macbook-for-python/HEAD/iterm2-part1.png
--------------------------------------------------------------------------------
/iterm2-part2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xfenix/bootstrap-macbook-for-python/HEAD/iterm2-part2.png
--------------------------------------------------------------------------------
/iterm2-part3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xfenix/bootstrap-macbook-for-python/HEAD/iterm2-part3.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Fresh macbook bootstrap
2 |
3 | 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.
4 |
5 | - [Fresh macbook bootstrap](#fresh-macbook-bootstrap)
6 | - [Basic setup](#basic-setup)
7 | - [Python part](#python-part)
8 | - [VSCode configuration](#vscode-configuration)
9 |
10 | ## Basic setup
11 |
12 | 1. Setup o my zsh
13 | ```bash
14 | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
15 | ```
16 | 1. Generate ssh key:
17 | ```bash
18 | ssh-keygen -o -a 100 -t ed25519 -C "ad@xfenix.ru"
19 | ```
20 | Copy you key in the clipboard:
21 | ```
22 | cat ~/.ssh/id_ed25519.pub | pbcopy
23 | ```
24 | 1. Install FiraCode font: https://github.com/tonsky/FiraCode
25 | 1. Install chrome: https://www.google.com/chrome/
26 | 1. Reccomended extensions:
27 | 1. https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en
28 | 1. https://chrome.google.com/webstore/detail/tab-suspender/fiabciakcmgepblmdkmemdbbkilneeeh?hl=en
29 | 1. 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
30 | 1. https://chrome.google.com/webstore/detail/grammar-spell-checker-%E2%80%94-l/oldceeleldhonbafppcapldpdifcinji
31 | 1. Install homebrew:
32 | ```bash
33 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
34 | ```
35 | 1. Install all necessary packages:
36 | ```bash
37 | brew install postman stats itsycal git iterm2 visual-studio-code pyenv gpg-suite shottr marta node dozer appcleaner keyboardcleantool karabiner-elements
38 | ```
39 | 1. Dozer help you to organize your menu bar, since macbook notch gain troubles in this area
40 | 1. Marta is the sublime-like completely free file manager
41 | 1. AppCleaner help you clean garbage after application removal
42 | 1. KeyboardCleanTool helps you to clean you keyboard! Very useful app for every developer
43 | 1. Shottr literally best screenshot tool
44 | 1. (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
45 | 1. Configure Iterm2:
46 | 1. It helps not to disturb you 
47 | 1. Best font 
48 | 1. Good looking + Guake/Quake like behavior 
49 | 1. For macbook with Apple chip (M1, M1 pro, M1 max) install Rosetta2:
50 | ```
51 | softwareupdate --install-rosetta
52 | ```
53 | 1. Install docker dekstop: https://www.docker.com/products/docker-desktop
54 | 1. Setup git client:
55 | 1. Generate GPG key in GPG keychain
56 | 1. Run command:
57 | ```bash
58 | gpg --list-secret-keys
59 | ```
60 | Then copy following key:
61 | 
62 | 1. Setup:
63 | ```bash
64 | git config --global user.name "Denis Anikin"
65 | git config --global user.email ad@xfenix.ru
66 | git config --global user.signingkey KEY_FROM_PREVIOUS_STEP
67 | git config --global commit.gpgsign true
68 | ```
69 | 1. Export GPG key in GPG keychain
70 | 1. Paste it in https://github.com/settings/gpg/new
71 | 1. File things:
72 | 1. Create projects dir `mkdir ~/web/`
73 | 1. Exclude from spotlight indexing (greatly reduce CPU pressure): -> Settings -> Spotlight -> Privacy, press +, then `⌘ + shift + g` and enter following paths:
74 | 1. `~/web/`
75 | 1. `~/Library/Containers`
76 |
77 | ## Python part
78 |
79 | 1. Setup uv
80 | ```bash
81 | pip install uv
82 | ```
83 | 1. Install and select desired python
84 | ```bash
85 | uv python install 3.13
86 | uv python pin 3.13 # pin for this project (optionally)
87 | ```
88 | 1. Dont forget to restart bash/zsh session!
89 |
90 | ## VSCode configuration
91 |
92 | This config meant for python development. But you can grab any part of it for other purposes.
93 |
94 | 1. Open the Command Palette (⌘ + ⇧ + P on Mac) OR View ❯ Command Palette
95 | 1. Type shell command to find Shell Command: Install 'code' command in PATH command
96 | 1. Install extensions:
97 | ```bash
98 | code --install-extension charliermarsh.ruff
99 | code --install-extension esbenp.prettier-vscode
100 | code --install-extension ms-azuretools.vscode-containers
101 | code --install-extension ms-python.debugpy
102 | code --install-extension ms-python.python
103 | code --install-extension ms-python.vscode-pylance
104 | code --install-extension ms-python.vscode-python-envs
105 | code --install-extension ms-vscode.makefile-tools
106 | code --install-extension wayou.file-icons-mac
107 | code --install-extension yzhang.markdown-all-in-one
108 | ```
109 | 1. Place following in you `settings.json`:
110 |
111 | ```json
112 | {
113 | "window.zoomLevel": 1,
114 | "security.workspace.trust.untrustedFiles": "open",
115 | "workbench.iconTheme": "file-icons-mac",
116 | "explorer.confirmPasteNative": false,
117 | "explorer.confirmDelete": false,
118 |
119 | "markdown.preview.typographer": true,
120 | "markdown.extension.orderedList.marker": "one",
121 |
122 | "editor.fontSize": 15,
123 | "editor.fontFamily": "Source Code Pro",
124 | "editor.renderWhitespace": "all",
125 | "editor.wordWrap": "on",
126 | "editor.rulers": [120],
127 | "editor.formatOnSave": true,
128 | "editor.formatOnPaste": true,
129 | "editor.codeActionsOnSave": {
130 | "source.fixAll": "always",
131 | "source.organizeImports": "always"
132 | },
133 | "[html][css][json][markdown][javascript][javascriptreact][typescript][typescriptreact]": {
134 | "editor.defaultFormatter": "esbenp.prettier-vscode"
135 | },
136 | "[python]": {
137 | "editor.defaultFormatter": "charliermarsh.ruff"
138 | },
139 |
140 | "emmet.triggerExpansionOnTab": true,
141 | "emmet.includeLanguages": {
142 | "plaintext": "html"
143 | }
144 | }
145 | ```
146 |
147 | 1. Dont forget to replace `xfenix` with you user!
148 |
--------------------------------------------------------------------------------