Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexander-danilenko/5c14d65c982cbccee588b9f2b1173734 to your computer and use it in GitHub Desktop.
Save alexander-danilenko/5c14d65c982cbccee588b9f2b1173734 to your computer and use it in GitHub Desktop.
MacOS Configuration Cheatsheet


Prerequisites

Brew: https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Hardware

Apple keyboard

Karabiner

Install Karabiner:

brew install --cask karabiner-elements

Software

Musthave non-gui packages:

BREW_CLI_PACKAGES=(
  jq
  yq
  mc
  ffmpeg
  yt-dlp
  fish
) && brew install ${BREW_CLI_PACKAGES[@]} 

Musthave gui apps:

BREW_GUI_PACKAGES=(
  1password
  anydesk
  zoom
  slack
  font-jetbrains-mono
  jetbrains-toolbox
  synology-drive
  google-chrome
  firefox@developer-edition
  postman
  protonvpn
) && brew install --quiet --casks ${BREW_GUI_PACKAGES[@]} 

Terminal

Git

curl https://raw.githubusercontent.com/tensorbite/dotfiles/refs/heads/main/.gitconfig > ~/.gitconfig && \
curl https://raw.githubusercontent.com/tensorbite/dotfiles/refs/heads/main/.gitignore > ~/.gitignore

ZSH

curl https://raw.githubusercontent.com/tensorbite/dotfiles/refs/heads/main/.profile >> ~/.profile

Fish is a smart and user-friendly command lineshell for Linux, macOS, and the rest of the family.

Install fish:

brew instsall fish

Copy config:

mkdir -p $HOME/.config/fish/ && \
curl -L# -o $HOME/.config/fish/config.fish https://raw.githubusercontent.com/tensorbite/dotfiles/refs/heads/main/.config/fish/config.fish

Oh My Fish: Package manager

Oh My Fish provides core infrastructure to allow you to install packages which extend or modify the look of your shell. It's fast, extensible and easy to use..

Install oh-my-fish:

curl https://raw.githubusercontent.com/oh-my-fish/oh-my-fish/master/bin/install | fish

Run fish and install plugins:

omf install bobthefish bass nvm aws; omf theme bobthefish

Development

Node.JS

NVM allows you to quickly install and use different versions of node via the command line.

Install NVM:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash

Install LTS and set as default:

NODE_VERSION=20 && \
nvm install $NODE_VERSION && \
nvm alias default "$NODE_VERSION"

Install global packages:

NPM_PACKAGES=(
  '@nestjs/cli' # Nest.JS CLI
  contentful-cli # Contentful.com CLI
  dynamodb-admin # Handy Web-UI for viewing local DynamoDB data
  eslint
  eslint-config-airbnb
  eslint-config-google
  eslint-config-standard
  eslint-plugin-import
  eslint-plugin-jsx-a11y
  eslint-plugin-node
  eslint-plugin-promise
  eslint-plugin-react
  eslint-plugin-react-hooks
  firebase-tools
  http-server # Simple HTTP server for static files in directory
  snyk # snyk.com CLI
  typescript
  @openapitools/openapi-generator-cli
) && npm install --global ${NPM_PACKAGES[@]}

PHP

TBD

Visual Studio Code

https://code.visualstudio.com/docs/setup/mac

brew install --cask visual-studio-code

Download config:

mkdir -p ~/.config/Code/User/ && \
curl https://raw.githubusercontent.com/tensorbite/dotfiles/refs/heads/main/.config/Code/User/settings.json > ~/.config/Code/User/settings.json && \
curl https://raw.githubusercontent.com/tensorbite/dotfiles/refs/heads/main/.config/Code/User/keybindings.json > ~/.config/Code/User/keybindings.json

Install extensions

CODE_EXTENSIONS=(
  GitHub.copilot                       # GitHub Copilot!
  GitHub.vscode-github-actions         # Github Actions support
  acarreiro.calculate                  # Calculates inline math expr
  christian-kohler.path-intellisense   # File path autocomplete
  dakara.transformer                   # Filter, Sort, Unique, Reverse, Align, CSV, Line Selection, Text Transformations and Macros
  dotenv.dotenv-vscode                 # .env support
  editorconfig.editorconfig            # EditorConfig support
  golang.go                            # Golang support
  ms-azuretools.vscode-docker          # Docker support
  ms-python.python                     # Python support
  ms-vscode-remote.remote-ssh          # SSH support
  tommasov.hosts                       # Hosts file syntax highlighter
  tyriar.lorem-ipsum                   # Lorem Ipsum generator
  yzhang.markdown-all-in-one           # Markdown tools
  #redhat.ansible                      # Ansible support

  # Node/NPM/Yarn specific extensions
  christian-kohler.npm-intellisense # NPM better autocomplete
  dbaeumer.vscode-eslint            # Eslint support
  
  # Themes
  github.github-vscode-theme    # GitHub color theme
  pkief.material-icon-theme     # Material Icon Theme
  rokoroku.vscode-theme-darcula # JetBrains-like theme
) && for extension in "${CODE_EXTENSIONS[@]}"; do
  code --install-extension "$extension" --force
done

Cloud

AWS Cli

https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html

Google Cloud

https://cloud.google.com/sdk/docs/install#mac

OpenTofu

brew install opentofu

Terraform

brew install terraform

Containerization

Docker

https://docs.docker.com/desktop/install/mac-install/

Docksal

https://docksal.io/installation#linux-supported

bash <(curl -fsSL https://get.docksal.io)

Troubleshooting

TBD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment