Created
September 14, 2019 02:41
-
-
Save amitmbee/c3d72e7fcda29f27eef8d543211b4d52 to your computer and use it in GitHub Desktop.
Revisions
-
coreygo created this gist
Sep 2, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,811 @@ # Helpful Information for MacOS The below information is current as of 2019-09-02 and applies to MacOS 10.14.x (Mojave). This document is meant to serve as an aid and reference in preparing a MacOS system, the process and .dotfiles are completed manually. Note that the default Terminal is replaced with iTerm2 and Bash v5. For additional information or help please feel free to ping via <https://www.coreygo.com>. ## System information commands - `uptime` displays current system uptime - `system_profiler SPHardwareDataType` displays hardware overview - `system_profiler -listDataTypes` lists available system_profiler options - `system_profiler -detailLevel basic > ~/system_profile.txt` outputs to text document for sharing ## Security Review the [macOS Security and Privacy Guide](https://github.com/drduh/macOS-Security-and-Privacy-Guide) and [Stronghold](https://github.com/alichtman/stronghold). - Set root password - `sudo passwd -u root` - For Development (disable [macOS Gatekeeper](https://support.apple.com/en-us/HT202491)) - `sudo spctl --master-disable` ## Software updates - `softwareupdate -l` - `sudo softwareupdate -iaR --verbose` ## System - Set login screen message - `sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "coreygo.com"` - Disable screenshot drop shadow - `defaults write com.apple.screencapture disable-shadow -bool true && killall SystemUIServer` - Hide Desktop - `defaults write com.apple.finder CreateDesktop false && killall Finder` - Show All Files - `defaults write com.apple.finder AppleShowAllFiles YES` - CMD+SHIFT+. ## Networking - Set computer name (System Preferences → Sharing) ```sh sudo scutil --set ComputerName "entropy" sudo scutil --set HostName "entropy" sudo scutil --set LocalHostName "entropy" sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName $(scutil --get LocalHostName) ``` - Disable .DS_Store on network shares - `defaults write com.apple.desktopservices DSDontWriteNetworkStores true` - Speed up SMB client to Synology NAS by disabling packet signing - <https://support.apple.com/en-us/HT205926> ```sh sudo -s echo "[default]" >> /etc/nsmb.conf echo "signing_required=no" >> /etc/nsmb.conf exit ``` ## Software ### Homebrew - Xcode Command Line Tools - `xcode-select --install` - [Homebrew](https://brew.sh/) - `/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"` - `brew config` - [Homebrew Cask](https://caskroom.github.io/) - `brew tap caskroom/cask` - `brew tap caskroom/versions` - `brew tap caskroom/drivers` - `brew tap caskroom/fonts` - `brew tap homebrew/services` - `brew tap buo/cask-upgrade` ([brew cu](https://github.com/buo/homebrew-cask-upgrade)) - `brew install vitorgalvao/tiny-scripts/cask-repair` ([cask-repair](https://github.com/Homebrew/homebrew-cask/blob/master/CONTRIBUTING.md)) - [Homebrew FAQ](https://docs.brew.sh/FAQ.html) ([man page](https://github.com/Homebrew/brew/blob/master/docs/Manpage.md)) - `brew update-reset && brew update` - `brew upgrade && brew cu` - `brew cleanup -s` - `rm -rf $(brew --cache)` - `brew missing` and `brew doctor` and `brew config` - `brew uninstall {{package name}}` to uninstall a Homebrew package - `brew cask uninstall {{cask name}}` to uninstall a Homebrew cask package - `brew untap {{cask name}}` to untap a Homebrew cask > Post Install ```sh cat << 'EOF' >> ~/.secrets # Set Homebrew's GitHub access token export HOMEBREW_GITHUB_API_TOKEN= EOF ``` > Additional Post Install ```sh cat << 'EOF' >> ~/.bashrc # Export Homebrew environment variables export HOMEBREW_FORCE_VENDOR_RUBY=1 export HOMEBREW_FORCE_BREWED_GIT=1 export HOMEBREW_FORCE_BREWED_CURL=1 # Set alias bup to update Homebrew alias bup="brew update-reset && brew update && brew upgrade && brew cu && brew cleanup -s && rm -rf $(brew --cache) && brew missing && brew config && brew doctor" EOF ``` - [Search for Formulae](http://formulae.brew.sh/) - `brew search google` (includes formulae and casks) - [Search for Casks](https://caskroom.github.io/search) ### Fonts - Search installed fonts: `system_profiler SPFontsDataType | grep Fura` - Search Homebrew fonts: `brew search /roboto/` - Install (via brew or source): [Fira Code](https://github.com/tonsky/FiraCode), [Hack](https://sourcefoundry.org/hack/), [Nerd Fonts](https://nerdfonts.com/), [Source Code Pro](https://github.com/adobe-fonts/source-code-pro), [Roboto](https://fonts.google.com/specimen/Roboto), additional "cloud" fonts can be installed via the Adobe Creative Cloud app - `brew cask install font-roboto` - `brew cask install font-firacode-nerd-font` - `brew cask install font-fira-code` - `brew cask install font-meslo-nerd-font` - `brew cask install font-sourcecodepro-nerd-font` - `brew cask install font-source-code-pro` ### Terminal - Create ~/.bash_profile if needed and source ~/.bashrc - `if [ ! -f ~/.bash_profile ]; then echo '[ -r ~/.bashrc ] && . ~/.bashrc' >> ~/.bash_profile; fi;` - [iTerm2](https://www.iterm2.com) - `brew cask install iterm2-beta` or — `brew cask install iterm2` > Post Install - Run iTerm2 then make it the default Terminal - Install iTerm2 shell integration and utilities and update ~/.bashrc with tmux export ```sh curl -L https://iterm2.com/shell_integration/install_shell_integration_and_utilities.sh | bash cat << 'EOF' >> ~/.bashrc # Enable iTerm2 Shell Integrations export ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX=1 test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" EOF ``` - Change default profile: 160x48, Solarized Dark, Fira Code 14pt Regular (use ligatures, anti-aliased), Terminal.app compatibility - Additional key mapping changes may be required for natural editing (like keyboard shortcuts for cursor movement in Terminal and vim) ```sh ⌥← # Send escape sequence b ⌥→ # Send escape sequence f ⌘←Delete # Send hex code 0x15 ⌥←Delete # Send hex code 0x1b 0x7f Del→ # Send hex code 0x4- ⌥Del→ # Send escape sequence d ``` ### Bash and Command Line Binaries - [Bash v5](https://www.gnu.org/software/bash/) - `brew install bash` > Post Install ```sh # Switch to using brew-installed bash as default shell if ! fgrep -q '/usr/local/bin/bash' /etc/shells; then echo '/usr/local/bin/bash' | sudo tee -a /etc/shells; chsh -s /usr/local/bin/bash; fi; ``` - `echo $BASH_VERSION` - Set default language and source imports ```sh cat << 'EOF' >> ~/.bashrc # Set Language export LANG="en_US.UTF-8" export LC_ALL="$LANG" # Imports test -e "${HOME}/.secrets" && source "${HOME}/.secrets" EOF ``` - Set default editors ```sh cat << 'EOF' >> ~/.bashrc # Set default editors export EDITOR="$(which vim)" export VISUAL="$EDITOR" # Set editors for Git and Homebrew export GIT_EDITOR="$EDITOR" export HOMEBREW_EDITOR="$EDITOR" EOF ``` - [Bash Completion](https://formulae.brew.sh/formula/bash-completion@2) - `brew install bash-completion@2` > Post Install ```sh cat << 'EOF' >> ~/.bashrc # Enable bash tab completion export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d" [[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" EOF ``` - Bash Static Analysis, Linting, and Testing - [ShellCheck](https://www.shellcheck.net/) - `brew install shellcheck` - [Bash Automated Testing System](https://github.com/sstephenson/bats) - `brew install bats` ## Command Line Binaries ### Replace and augment MacOS default binaries - `brew install vim --with-override-system-vi --with-python3` - `brew install coreutils` > Post Install coreutils (optional, will cause warning from `brew doctor`) ```sh # All commands have been installed with the prefix 'g'. # If you really need to use these commands with their normal names: cat << 'EOF' >> ~/.bashrc # Set local opt coreutils bin $PATH export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH" EOF ``` - `brew install curl` > Post Install curl ```sh cat << 'EOF' >> ~/.bashrc # Set local opt curl bin $PATH export PATH="/usr/local/opt/curl/bin:$PATH" EOF ``` - `brew install diffutils` - `brew install findutils` or — `brew install findutils --with-default-names` (optional, will cause warning from `brew doctor`) - `brew install gawk` - `brew install gnu-sed --with-default-names` - `brew install gnu-tar --with-default-names` - `brew install gnu-which --with-default-names` - `brew install gnutls` - `brew install grep --with-default-names` - `brew install gzip` - `brew install htop` - `brew install openssh --with-ldns` - `brew install rsync` - `brew install screen` - `brew install tmux` - `brew install tree` - `brew install watch` - `brew install wdiff` - `brew install wget` > Post Install command line binaries ```sh cat << 'EOF' >> ~/.bashrc # Set local system bin $PATH export PATH="$PATH:/usr/local/sbin" EOF ``` ### Additional command line binaries - `brew install nmap` — [nmap — network mapper](https://nmap.org/) - `brew install youtube-dl` — [youtube-dl](https://github.com/rg3/youtube-dl/blob/master/README.md) - `brew cask install emacs` — [emacs](https://emacsformacosx.com/) > Post Install emacs (optional) - [Spacemacs](https://github.com/syl20bnr/spacemacs) - `brew install pandoc` — [pandoc](https://pandoc.org/) - `brew install basictex` — [basictex](https://www.tug.org/mactex/morepackages.html) > Post Install pandoc and basictex ```sh sudo tlmgr update --self sudo tlmgr install collection-fontsrecommended ``` ### Additional command line binaries, dependencies, and packages - `brew install librsvg` — [librsvg](https://wiki.gnome.org/Projects/LibRsvg) ## Git - `brew install git` - `brew install git-lfs` && `git lfs install` > Post Install ```sh git config --global user.name "Corey Gouker" git config --global user.email [email protected] git config --global user.signingkey F8189720240A11D1 git config --global github.user coreygo git config --global core.editor vim git config --global color.ui auto git config --global commit.gpgsign true git config --global credential.helper osxkeychain ``` > Additional Post Install ```sh cat << 'EOF' >> ~/.secrets # Set GitHub's hub user and access token # https://github.com/settings/tokens export GITHUB_USER=coreygo export GITHUB_TOKEN= EOF ``` ## Applications ### Google - [Google Chrome](https://www.google.com/chrome/) - `brew cask install google-chrome-beta` or/and for side by side installation — `brew cask install google-chrome` - [Google Drive File Stream](https://support.google.com/a/answer/7491144) - `brew cask install google-drive-file-stream` - [Google Android File Transfer](https://www.android.com/filetransfer/) - `brew cask install android-file-transfer` ### Web, Security, Communications - [Firefox Developer Edition](https://www.mozilla.org/en-US/firefox/developer/) - `brew cask install firefox-developer-edition` or/and for side by side installation — `brew cask install firefox` - [Microsoft Edge Dev](https://www.microsoftedgeinsider.com/en-us/download) - `brew cask install microsoft-edge-dev` - [ProtonVPN](https://protonvpn.com) - `brew cask install protonvpn` - [Tor Browser](https://www.torproject.org) - `brew cask install tor-browser` - [OnionShare](https://github.com/micahflee/onionshare) - `brew cask install onionshare` - [Magic-Wormhole](https://github.com/warner/magic-wormhole) - `brew install magic-wormhole` - [Bitwarden](https://bitwarden.com/) - `brew cask install bitwarden` - [1Password](https://1password.com) - `brew cask install 1password-beta` or for non-beta version — `brew cask install 1password` - [GPG Suite](https://gpgtools.org) - `brew cask install gpg-suite` - [Irssi](https://irssi.org/documentation/) - `brew install irssi` - [Mosh](https://mosh.org/) - `brew install mosh` - [Tunnelblick](https://tunnelblick.net/) - `brew cask install tunnelblick` - [Slack](https://slack.com/downloads/) - `brew cask install slack` - [Discord](https://discordapp.com/download) - `brew cask install discord` - [Signal](https://signal.org/) - `brew cask install signal` - [Keybase](https://keybase.io/) (requires KEXT - System Preferences → Security & Privacy → General) - `brew cask install keybase` - [Yubico YubiKey Manager](https://www.yubico.com/products/services-software/download/yubikey-manager/) - `brew cask install yubico-yubikey-manager` - [Yubico YubiKey Personalization GUI](https://www.yubico.com/products/services-software/download/yubikey-personalization-tools/) - `brew cask install yubico-yubikey-personalization-gui` - [WireShark](https://www.wireshark.org/) - `brew cask install wireshark` ### Development - [Visual Studio Code](https://code.visualstudio.com) - `brew cask install visual-studio-code-insiders` or for non-Insiders build — `brew cask install visual-studio-code` > Post Install Visual Studio Code — Insiders ([extensions list](https://gist.github.com/coreygo/b7692217f4ed69ad8b5dceca60597f33) and [settings information](https://gist.github.com/coreygo/aae5cefade830f6d33c451a046774d81)) - To reinstall all extensions from a terminal `curl -fsSL https://git.io/fjpD1 | bash` - [JetBrains Toolbox](https://www.jetbrains.com/toolbox/) - `brew cask install jetbrains-toolbox` - [Eclipse IDE](https://www.eclipse.org) - `brew cask install eclipse-installer` - [Postman](https://www.getpostman.com/) - `brew cask install postman` - [VirtualBox](https://www.virtualbox.org) (requires KEXT - System Preferences → Security & Privacy → General) - `brew cask install virtualbox` - `brew cask install virtualbox-extension-pack` - [Docker](https://www.docker.com) - `brew cask install docker-edge` <https://download.docker.com/mac/edge/Docker.dmg> or for stable — `brew cask install docker` <https://download.docker.com/mac/stable/Docker.dmg> > Post Install (using stable or edge Docker Desktop for Mac) ```sh etc=/Applications/Docker.app/Contents/Resources/etc ln -s $etc/docker.bash-completion $(brew --prefix)/etc/bash_completion.d/docker ln -s $etc/docker-machine.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-machine ln -s $etc/docker-compose.bash-completion $(brew --prefix)/etc/bash_completion.d/docker-compose ``` - or if not using the "Docker Desktop for Mac" app (VirtualBox based install, not using the HyperKit hypervisor) consider installation using the non-cask formulae, details for this option have not been provided or tested - [Kubernetes](https://docs.docker.com/docker-for-mac/kubernetes/) — ([k8s docs](https://kubernetes.io/docs/home/)) > Post Install (via edge release of Docker Desktop for Mac) - Docker → Preferences → Kubernetes → check all three boxes to enable → Apply - For kubectl bash completion `kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl` - [Helm](https://helm.sh/docs/) - `brew install kubernetes-helm` - [Skaffold](https://skaffold.dev/) - `brew install skaffold` - [Vagrant](https://www.vagrantup.com) - `brew cask install vagrant` - [Packer](https://packer.io/) - `brew install packer` - [Terraform](https://www.terraform.io/) - `brew install terraform` - [Zeit Now](https://zeit.co/now) - `brew cask install now` - [dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) - `brew install dnsmasq` > Post Install ```sh # Backup example dnsmasq.conf cp $(brew --prefix)/etc/dnsmasq.conf $(brew --prefix)/etc/dnsmasq.conf.example # Create and enable dnsmasq.d configuration directory mkdir -p $(brew --prefix)/etc/dnsmasq.d echo -e "\n# Include all files in a directory which end in .conf\nconf-dir=/usr/local/etc/dnsmasq.d/,-.conf" >> $(brew --prefix)/etc/dnsmasq.conf # Create and enable configuration(s) # Networking Note: 10.254.254.254 for Docker/K8s support, otherwise 127.0.0.1 echo -e "address=/.lo/fdff::1\naddress=/.lo/10.254.254.254" >> $(brew --prefix)/etc/dnsmasq.d/lo.conf echo -e "address=/local.coreygo.dev/fdff::1\naddress=/local.coreygo.dev/10.254.254.254" >> $(brew --prefix)/etc/dnsmasq.d/local.coreygo.dev.conf # Start dnsmasq with launchd now and restart at startup sudo brew services start dnsmasq # Create and enable DNS resolver(s) for dnsmasq sudo mkdir -p /etc/resolver sudo bash -c 'echo -e "nameserver ::1\nnameserver 127.0.0.1" >> /etc/resolver/lo' sudo bash -c 'echo -e "nameserver ::1\nnameserver 127.0.0.1" >> /etc/resolver/local.coreygo.dev' ``` - Create persistent lo0 alias ```sh cat << 'EOF' | sudo tee -a /Library/LaunchDaemons/com.coreygo.lo0.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.coreygo.lo0</string> <key>RunAtLoad</key> <true/> <key>ProgramArguments</key> <array> <string>bash</string> <string>-c</string> <string>/sbin/ifconfig lo0 alias 10.254.254.254 && /sbin/ifconfig lo0 inet6 alias fdff::1</string> </array> </dict> </plist> EOF ``` - Enable the launchd service to activate persistent lo0 alias `sudo launchctl load /Library/LaunchDaemons/com.coreygo.lo0.plist` ### System, Utilities, Other Applications - [Mac App Store CLI](https://github.com/mas-cli/mas) - `brew install mas` - [Microsoft OneNote](https://www.onenote.com) - `mas install 784801555` (AppID for com.microsoft.onenote.mac) - [Transmission Remote GUI](https://github.com/transmission-remote-gui/transgui) - `brew cask install transmission-remote-gui` - [ImageOptim](https://github.com/ImageOptim/ImageOptim) - `brew cask install imageoptim` - [Keka](http://www.kekaosx.com/en/) - `brew cask install keka` - [CyberDuck](https://cyberduck.io/) - `brew cask install cyberduck` - [Radio Silence](https://radiosilenceapp.com) - `brew cask install radio-silence` - [OverSight](https://objective-see.com/products/oversight.html) (requires KEXT - System Preferences → Security & Privacy → General) - `brew cask install oversight` > Workaround for [installer hang](https://github.com/caskroom/homebrew-cask/issues/32364#issuecomment-309447358) - Open GUI and activate run in 'headless' mode - [LuLu](https://objective-see.com/products/lulu.html) - `brew cask install lulu` - [TaskExplorer](https://objective-see.com/products/taskexplorer.html) - `brew cask install taskexplorer` - [KnockKnock](https://objective-see.com/products/knockknock.html) - `brew cask install knockknock` - [ClamAV](https://www.clamav.net/documents/installing-clamav#osx) - `brew install clamav` > Review the (somewhat accurate) [MacOS installation guide](https://www.clamav.net/documents/installation-on-macos-mac-os-x) and [FAQ for additional details](https://github.com/Cisco-Talos/clamav-faq) before starting the process - For latest definitions `freshclam -v` - For an on-demand directory/file scan `clamscan -r -i --bell ~/` - For an on-demand "complete" scan `clamscan -r -i --bell --cross-fs=no --detect-pua=yes /` ### Media Streaming and Production - [Open Broadcaster Software](https://obsproject.com/) - `brew cask install obs` > Post Install - [OBS-NDI plugin](https://obsproject.com/forum/resources/obs-ndi-newtek-ndi™-integration-into-obs-studio.528/) for streaming from networked systems - [Soundflower](https://github.com/mattingalls/Soundflower) for loopback audio from desktop output (requires KEXT - System Preferences → Security & Privacy → General) - `brew cask install soundflower` - [Avidemux](http://avidemux.sourceforge.net/download.html) - `brew cask install avidemux` - [Kap](https://getkap.co/) - `brew cask install kap` ### Audio/Video Playback and Management - [VLC](https://www.videolan.org) - `brew cask install vlc` - [Plexamp](https://www.plex.tv/plex-labs/#modal-plexamp-downloads) - `brew cask install plexamp` - [MusicBrainz Picard](https://picard.musicbrainz.org/) - `brew cask install musicbrainz-picard` > Post Install - `brew install flac mp3gain` - MusicBrainz Picard Preferences → Plugins → Install ReplayGain → Enable → Make It So - Path to metaflac `/usr/local/bin/metaflac` - Path to mp3gain `/usr/local/bin/mp3gain` - [XLD](https://tmkk.undo.jp/xld/index_e.html) - `brew cask install xld` ### eBook Management - [Calibre](https://calibre-ebook.com/download) - `brew cask install calibre` > Post Install - [DeDRM Tools](https://github.com/apprenticeharper/DeDRM_tools/releases) - [Amazon Kindle](https://www.amazon.com/kindle-dbs/fd/kcp) - `brew cask install kindle` > Post Install - `chmod -x /Applications/Kindle.app/Contents/MacOS/renderer-test` - [Adobe Digital Editions](https://www.adobe.com/products/digital-editions.html) - `brew cask install adobe-digital-editions` ### Adobe - [Adobe Creative Cloud](https://creative.adobe.com/products/download/creative-cloud) - `brew cask install adobe-creative-cloud` > Post Install - `open '/usr/local/Caskroom/adobe-creative-cloud/latest/Creative Cloud Installer.app'` ### Gaming - [Steam](https://steamcommunity.com/) - `brew cask install steam` - [OpenEMU](https://openemu.org/) - `brew cask install openemu` ### Evernote - [Evernote](https://evernote.com/) - `brew cask install evernote` - [Skitch](https://evernote.com/products/skitch) - `brew cask install skitch` ### Conferencing and Remote Computing - [RealVNC Viewer](https://www.realvnc.com/en/connect/download/viewer/macos/) - `brew cask install vnc-viewer` - [Microsoft Remote Desktop](https://aka.ms/rdmac) - `brew cask install microsoft-remote-desktop-beta` - [TeamViewer](https://www.teamviewer.us/downloads/) - `brew cask install teamviewer` - [ZoomUS](https://zoom.us/join) - `brew cask install zoomus` ## Programming Environments ### Node.js & TypeScript - [Node Version Manager](https://github.com/nvm-sh/nvm) ```sh export NVM_DIR="$HOME/.nvm" && ( git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR" cd "$NVM_DIR" git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` ) && \. "$NVM_DIR/nvm.sh" ``` > Post Install ```sh cat << 'EOF' >> ~/.bashrc # Enable Node Version Manager export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion EOF ``` - `source ~/.bashrc` or restart terminal session > NVM Default Global Packages ```sh cat << 'EOF' >> "$NVM_DIR/default-packages" create-react-app eslint gatsby-cli gulp-cli netlify-cli npm npm-check prettier terser tslint typescript EOF ``` > NVM Manual Upgrade ```sh ( cd "$NVM_DIR" git fetch --tags origin git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)` ) && \. "$NVM_DIR/nvm.sh" ``` - [Node.js](https://nodejs.org/en/) — via NVM - `nvm install lts/*` for latest active LTS Node or for a specific version `nvm install v10.16.3` - `nvm install lts/* --reinstall-packages-from=node` install latest active LTS Node and reinstall packages from current Node - `nvm version-remote lts/-` display latest available LTS Node version - `nvm ls-remote --lts` list latest available LTS Node versions - `nvm install node --reinstall-packages-from=node` install latest non-LTS Node and reinstall packages from current Node > Global Node.js Packages - `npm i -g eslint npm npm-check prettier terser tslint typescript` - `npm ls -g --depth=0` display top level global packages - `nvm_npm_global_modules $(nvm current)` display top level global packages via NVM - `npm-check -gu` check for and/or install latest global packages > Additional Global Node.js Packages - `npm i -g create-react-app gatsby-cli gulp-cli netlify-cli` > [Yarn Package Manager](https://yarnpkg.com/en/) - `brew install yarn` note, will currently `brew install node` as a dependency ### Python - [Python](https://www.python.org/) — review additional details prior to [installing Python via Homebrew](https://docs.brew.sh/Homebrew-and-Python) to avoid potential issues. - `brew install python` or/and for Python 2 — `brew install python@2` > Post Install (optional, will supersede system Python and python@2) ```sh cat << 'EOF' >> ~/.bashrc # Set Python 3 $PATH export PATH="/usr/local/opt/python/libexec/bin:$PATH" EOF ``` - [pipenv](https://github.com/pypa/pipenv) - `brew install pipenv` > Post Install for [pipenv](https://pipenv.readthedocs.io/en/latest/) ```sh cat << 'EOF' >> ~/.bashrc # Set Python 3 pipenv to create .venv in project path export PIPENV_VENV_IN_PROJECT=true EOF ``` - `mkdir -p {{project name}} && cd "$_"` to create a new Python project directory and `pipenv install` to create a new pipfile and virtualenv then `pipenv shell` to activate the virtualenv, you are now ready to `pip3 install {{package name}}` (use pip3 to avoid issues), and remember to deactivate the shell with `exit` - See `pipenv --help` or go [here for advanced usage details](https://pipenv.readthedocs.io/en/latest/advanced/) - If Python 2 is required for pipenv and virtualenv usage `brew install python@2`, for a Python 2 project `pipenv install --two`, remember to review the Python via Homebrew link above before installing Python 2 ### Ruby - [Ruby](https://www.ruby-lang.org/en/) — via [rbenv](https://github.com/rbenv/rbenv#homebrew-on-macos), also [review here for Rails and additional information](https://gorails.com/setup/osx/) - `brew install rbenv` > Post Install - `rbenv init` ```sh cat << 'EOF' >> ~/.bashrc # Enable rbenv Ruby environment manager if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi # This loads rbenv EOF ``` - `source ~/.bashrc` or restart terminal session - `rbenv --version` - `curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash` - `rbenv install 2.6.3` or to list available versions `rbenv install -l` - `rbenv global 2.6.3` or to get current active version `rbenv global` - `ruby -v` - `gem env` for RubyGems environment details - `gem env home` check the location where gems are being installed - `gem outdated` and `gem update --force` - `gem cleanup` - `gem install bundler` ### Go - [Go](https://golang.org/) - `brew install go` > Post Install ```sh cat << 'EOF' >> ~/.bashrc # Go Language export PATH="$PATH:/usr/local/opt/go/libexec/bin" EOF ``` - `source ~/.bashrc` or restart terminal session - `brew install dep` - `brew install gox` ### Java - [Oracle Java](https://jdk.java.net/) - `brew cask install java` - [Java via AdoptOpenJDK](https://adoptopenjdk.net/) - `brew cask install adoptopenjdk` ### Processing - [Processing](https://processing.org/) - `brew cask install processing` ## SDKs & CLIs - [Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstart-mac-os-x) - `brew cask install google-cloud-sdk` > Post Install ```sh cat << 'EOF' >> ~/.bashrc # Enable Google Cloud SDK test -e "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc" && source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.bash.inc" test -e "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc" && source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.bash.inc" EOF ``` - [AWS CLI & Python SDK](https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-virtualenv.html) — first follow steps above to install Python 3 including pipenv via Homebrew - `cd ~ && mkdir -p .aws && cd "$_" && pipenv install awscli boto3 && pipenv run aws --version` - `cd ~/.aws && pipenv run aws --version` to confirm the AWS CLI version, for help see `pipenv run aws help` - or run a command like `aws configure` after activating the shell `cd ~/.aws && pipenv shell` remember to `exit` - [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-macos) - `brew install azure-cli` - `az login` - `az help` ## Hardware ### Wacom Intuos Tablet - `brew cask install wacom-tablet` ### OpenBCI - [ftdi-vcp-driver](http://www.ftdichip.com/Drivers/VCP.htm) - `brew cask install ftdi-vcp-driver` - [OpenBCI GUI](https://github.com/OpenBCI/OpenBCI_GUI/releases) - `brew cask install openbci-gui`