Skip to content

Instantly share code, notes, and snippets.

@nunomorgadinho
Last active February 15, 2021 16:01
Show Gist options
  • Save nunomorgadinho/ee86e89f76ab5eec6f06f68dc7978d5e to your computer and use it in GitHub Desktop.
Save nunomorgadinho/ee86e89f76ab5eec6f06f68dc7978d5e to your computer and use it in GitHub Desktop.
Clean Install – macOS

macOS

Custom recipe to get macOS running from scratch, setup applications and (WordPress) developer environment. I use this gist to keep the steps required to have a functioning system after a semi-annual fresh install.

Software

Browsers

System

Utilities

Editors

Virtualization

OSX/macOS Preferences

# Use plain text mode for new TextEdit documents
defaults write com.apple.TextEdit RichText -int 0

# Show Path bar in Finder
defaults write com.apple.finder ShowPathbar -bool true

# Show Status bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true

# Avoid creating .DS_Store files on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

# Show the ~/Library folder
chflags nohidden ~/Library

Shell

Xcode

xcode-select --install

Homebrew

brew tap homebrew/php
brew install git imagemagick
brew install node nvm
brew install homebrew/php/composer
brew install zsh zsh-completions
brew install wp-cli
brew install wget

Oh My Zsh

Setup the agnoster zsh-theme:

git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh
rm -rf fonts

Open iTerm2 -> Preferences -> Profiles -> Text -> Change Font -> 12pt, Meslo LG S DZ for Powerline, Regular
Open iTerm2 -> Preferences -> Profiles -> Colors -> Color Presets... -> Solarized Dark

Install zsh-autosuggestions:

git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions

Install zsh-syntax-highlighting:

git clone https://github.com/zsh-users/zsh-syntax-highlighting $ZSH_CUSTOM/plugins/zsh-syntax-highlighting

Install zsh-history-substring-search:

git clone https://github.com/zsh-users/zsh-history-substring-search $ZSH_CUSTOM/plugins/zsh-history-substring-search

Install zsh-nvm:

git clone https://github.com/lukechilds/zsh-nvm $ZSH_CUSTOM/plugins/zsh-nvm

Add to your ~/.zshrc:

export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH=$HOME/.oh-my-zsh

DEFAULT_USER=`whoami`

ZSH_THEME="agnoster"

plugins=(
	composer
	git
	jira
	node
	npm
	osx
	vagrant
	zsh-autosuggestions
	zsh-history-substring-search
	zsh-nvm
	zsh-syntax-highlighting
	last-working-dir
)

source $ZSH/oh-my-zsh.sh
source $ZSH/custom/plugins/zsh-syntax-highlighting
source $ZSH/custom/plugins/zsh-history-substring-search

NPM

npm install -g gulp grunt yo fkill-cli

PHPCS

composer global require "squizlabs/php_codesniffer=*"

No VS Code instalar a extensão "ikappas.phpcs".

WordPress Coding Standards

composer global require "wp-coding-standards/wpcs"
phpcs --config-set installed_paths $HOME/.composer/vendor/wp-coding-standards/wpcs
phpcs --config-set default_standard WordPress-Extra

Add to your ~/.zprofile:

export PATH=$PATH:~/.composer/vendor/bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment