8000 GitHub - naishe/mac-setup
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

naishe/mac-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEW MAC SETUP 2023

Keyboard Adjustment

Install Karabiner Elements

  1. Settings > Simple Modifications. Map caps lock to grave accent and tilde and vice versa
  2. Settings > Complex Modifications. Import rules. Import Left control + hjkl to arrow keys Vim from the internet.

Install iTerm and Homebrew

TIP: You can use a profile from iterm2-profiles folder instead of manually going to configure a profile.

Install Fira Code Font

See Fira Code installation docs

brew tap homebrew/cask-fonts
brew install --cask font-fira-code

VS Code Theme and Paid Font

High contrast colorblind friendly theme: Night Owl Artistic font: Dank Mono

Set up iTerm, Zsh, and plugins

Zsh is the default shell for Mac.

# enable plugins
plugins=(
        git
        zsh-syntax-highlighting
        zsh-autosuggestions
        wd
)

Generate SSH Key

See more details on Github docs

ssh-keygen -t ed25519 -C "your_email@example.com"

Add it to Github and remove keys from older machines from Github UI.

Install NVM and Node.js

See here for the latest guide

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

# This will install the latest node version
nvm install node

Get PNPM

brew install pnpm

# Add an alias
echo 'alias p=pnpm' >> ~/.zshrc

Install Visual Studio Code

Install the editor from their website. And then add the shortcut to .zprofile so that you can open a workspace with code /path/to/the/workspace.

cat << EOF >> ~/.zprofile
# Add Visual Studio Code (code)
export PATH="\$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF

Login with Github, and sync everything. This will bring all the settings and the extensions.

Install Java

brew install java
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' >> ~/.zshrc

Install Docker

From Docker website

Install kubectl

Using Homebrew

# Use Homebrew
brew install kubectl

Using curl

# Or, get latest from their repo (intel processor)
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl"

## Validate
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl.sha256"

echo "$(cat kubectl.sha256)  kubectl" | shasum -a 256 --check

chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo chown root: /usr/local/bin/kubectl

Check installation

# Check installation
kubectl version -o yaml
# Add an alias
echo 'alias k=kubectl' >> ~/.zshrc

Utilities

Finder Settings

Right click on Finder's toolbar, click Customize Toolbar. Remove tags, spaces, and add new folder.

Go to View > Show Path Bar.

Go to Preferences, or ⌘ + ,

  • Set new finder window to Downloads.
  • In Sidebar tab, unselect all but Applications, Desktop, and Downloads. Uncheck Recent Tags.
  • In Advanced tab, under "When performing a search" set it to Search the Current Folder.

Keyboard shortcuts

  • Settings > Keyboard > Shortcuts > Mission Control. Check Show notification center, press ⌘ + ⌥ + [SPACE]

Enable tabs in dialogs

Settings > Keyboard > Shortcuts > Check "Use keyboard navigation to move between controls"

Enable tabs in dialogs

Helpful Bash functions

Copy public key to clipboard

function pubkey() {
  cat ~/.ssh/id_ed25519.pub | tr -d "\n" | pbcopy | echo "=> Public key copied to clipboard"
}

Get public IP of the machine

function ip() {
  curl -s https://api.ipify.org
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0