Skip to content

Instantly share code, notes, and snippets.

@danmindru
Last active November 18, 2024 15:43
Show Gist options
  • Save danmindru/5f0634963e0305fdd43a397802b2474d to your computer and use it in GitHub Desktop.
Save danmindru/5f0634963e0305fdd43a397802b2474d to your computer and use it in GitHub Desktop.
Setting up a new mac/windows computer

Basics

(Mac - skip to 4)

  1. Enable developer mode in windows settings
  2. Enable WSL (if not in settings, try Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux)
  3. Install distro from windows store, i.e Ubuntu 18.
  4. Install basic software:
  • Git
  • vscode
  • Node LTS
  • nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
  • cmder
  • Hyper
  • Chromium, etc

Setup Software

(Mac - skip to 2)

  1. Set up AHK Add the following script to: run && shell:startup.

  2. Add .gitconfig nano ~/.gitconfig. For mac

  • optioanlly install meld for windows
  1. Set up vs code
  • CTRL shift P and look up Sync.
  • Sign in and sync settings

Setup Shell

(Mac - skip to 4)

  1. Setup Hyper Copy the config file to Hyper's preferences.

  2. Add .bashrc nano ~/.bashrc & .profile if not already setup nano ~/.profile

NB: bashrc does not have to launch zsh starting with 1803 => see article

  1. Install zsh:
sudo apt-get update
sudo apt upgrade

sudo apt install zsh
sudo apt-get install powerline fonts-powerline

3.1 Set as default shell => chsh -s $(which zsh)

  1. Install oh-my-zsh sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

  2. Add .zshrc nano ~/.zshrc

  3. Add rupa/z nano $ZSH_CUSTOM/z.sh

7. Add ohmyzsh theme nano $ZSH_CUSTOM/themes/bullet-train.zsh-theme

  1. Add zsh theme https://github.com/romkatv/powerlevel10k

  2. Install powerline fonts on WSL

  • cd /mnt/c && git clone https://github.com/powerline/fonts
  • in Admin PS, cd c:\fonts, then Set-ExecutionPolicy Bypass, then .\install.ps1, then Set-ExecutionPolicy Default
  1. Setup ssh key (i.e. this); add to Github, Azure DevOps, etc

  2. (bonus for windows) Git is slow. Make git fast. sudo nano /usr/local/git

#!/bin/sh

if pwd | grep /mnt/c > /dev/null; then
    exec git.exe "$@"
else
    exec /usr/bin/git "$@"
fi
  1. Mac: Install other cli tools:
  • Install homebrew then
    • brew install delta && brew install bat && brew install jq && brew install jless

update gitconfig

[core]
  pager = delta

Mac settings

  1. System preferences
  • Trackapd
    • Point and click
      • for secondary button click select "Bottom right corner"
      • Look up: off
      • Tap to click: on
    • Scroll and zoom
      • turn off natural scrolling
  1. In Finder:

    • Press CTRL + SHIFT + . to show hidden files
    • Set up sidebar a bit (mac HD, home, etc.)
  2. Set screenshot location: hit CMD + SHIFT + 5, Options and select Screenshots dir

  3. Download

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