macOS๐
Developer Setup
NOTE: at some point you will be prompted to install the โCommand Line Developer Toolsโ for Xcode. This is a large download. Be prepared.
Python๐
Mac still ships with python 2, but one day maybe it wonโtโฆ
I prefer using conda to manage python anyway, so my install notes works just fine for me.
In a new Terminal, update python version to desired 3.9 or 3.10 or what have you
Bash | |
---|---|
Add packages you might want for development and testing. (This is where I had to install Xcode developer tools in order to build python packages)
Bash | |
---|---|
Optionally install tools from the Project Jupyter ecosystem:
Bash | |
---|---|
VS Code๐
- Download the Mac installer (it should choose the correct version for your system)
- Unzip it from your browser downloads or Finder -> Downloads
- Move the โVisual Studio Codeโ Application to Applications if desired
- Delete the Installer zip if desired
NOTE: I couldnโt find the correct link to download with curl
Extensions๐
- Dracula (theme)
- Python Specific
- Python (Microsoft official)
- Python Docstring Generator (Nils Werner)
- Even Better TOML (tamasfe)
- General VS Code
- indent-rainbow (oderwat): Visualize deeply indented blocks more easily
- GitLens (Eric Amodio): Quickly check git history of files, branches, lines, etc.
- Various File Types
- Markdown All in One (Yu Zhang)
- Markdown navigation (AlanWalk)
- markdownlint (David Anson)
- Paste Image (mushan)
- Markdown Preview Github Styling (Matt Bierner)
- Markdown Emoji (Matt Bierner)
- Docker (Microsoft)
- YAML (Red Hat)
- XML (Red Hat)
- SQL Formatter (adpyke)
Settings๐
I tend to put these in the VS Code settings (cmd + shift + p
then type "settings JSON" for one way to get there).
A lot of these are Python experience and specific to using flake8
, black
, and isort
.
These are the first several up to and including the "autoDocstring" entry.
That said, there's some that are useful for general editing, searching large code bases, and working with the integrated terminal. Shoutout to Harald Kirschner's tips (and presentation).
Keybindings๐
Some things are worth changing for productivity and matching other tools.
- Jump to beginning of text in the line:
ctrl + a
- Jump to top / bottom of file:
shift + cmd + ,
andshift + cmd + /
- From Emacs muscle memory trying to get something similar
Docker๐
For running applications and mocking linux filesystems.
Docker recommends installing Rosetta 2 when running on Apple Silicon. This will install it to translate from Intel to M1:
Bash | |
---|---|
- Download the
.dmg
- Open and
.dmg
then drag the Docker Application into Applications - Search or open Docker from spotlight
- Accept terms and conditions
- Try to run the hello world application
Bash | |
---|---|
Github๐
I use SSH keys to connect to github / gitlab / etc. for convenience and making the connection work out of the box from tools like VS Code.
Set Default Git User๐
Set your preferences so tools like VS Code will use these on your commits by default.
Bash | |
---|---|
Create SSH Key๐
It's best to create new keys for new machines as opposed to copying an old key from one machine to another. Use a password if other people have access to your machine, otherwise feel free to leave blank.
Bash | |
---|---|
Add Github to SSH Config๐
To make sure this key gets used when we try to authenticate to Github, we'll add the following entry to ~/.ssh/config
:
To do this with a terminal editor use one of the following:
To do this with a GUI editor, you have to make sure the file exists first:
Add Public Key to Github๐
Copy your public key to the clipboard with the following:
Bash | |
---|---|
Alternatively you can paste it out and copy by hand:
Bash | |
---|---|
NOTE: be sure you are copying your .pub
Public key, and not the Private key
- Navigate to your github Account -> Settings -> SSH and GPG keys (under "Access", or this link)
- Select
New SSH Key
- Enter a nickname for your machine
- Paste the Public key into the main text area
Test Authentication๐
This command should spit out a message like Hi {username}! You've successfully authenticated
if successful.
Bash | |
---|---|
Homebrew๐
See main site: โInstalls the stuff you need that Apple didnโtโ
Bash | |
---|---|
Amethyst๐
Window Tiling Manager for macOS 10.12+ by ianyh. For splitting windows left and right, full screen, quarters, etc.
Bash | |
---|---|
Open application and grant Accessibility Privacy permissions in Security & Privacy System Preferences
Created: June 7, 2023