Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

HomeBrew – Mac OS Setup

Posted on March 15, 2017May 7, 2021 By David Kittell

I use a Mac for my primary computer and sometimes I need to setup a new VM similar to my computer for testing.

Here is the basic setup that I use HomeBrew for. I’ll add more later as I remember more or use it more.

# Install HomeBrew

if ! type "brew" > /dev/null; then
  #/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)";
fi

NOTE: If you receive an error on installing HomeBrew like “Error: Failed to link all completions, docs and manpages: Permission denied” try this

# This command should work
sudo chown -R $USER:admin /usr/local/*

# If the above doesn't work use this (of course change the username 'dkittell' to your username
sudo chown -R dkittell:admin /usr/local/*
# If you work with Virtual Machines these two lines will be helpful
brew cask install vagrant;
brew cask install virtualbox;

# Install Python Pip
sudo easy_install pip

# Install BashBeautify
sudo pip install --upgrade bashbeautify

# Install Azure CLI
brew install azure-cli

# Install Amazon (AWS) CLI
brew install awscli

# Install Telnet
brew install telnet

# Install Visual Studio Code
brew cask install visual-studio-code
open /Applications/Visual\ Studio\ Code.app
# Once in Visual Studio Code - Command+Shift+P 
# shell command
# Back to Terminal
# Install Azure CLI
code --install-extension ms-vscode.azurecli
# Install HTML/CSS/JS Beautifier
code --install-extension HookyQR.beautify
# Install PHP Beautifier
cd ~/ && curl -sS https://getcomposer.org/installer | php && cp composer.phar /usr/local/bin/composer && sudo chmod +x /usr/local/bin/composer && composer global require friendsofphp/php-cs-fixer
code --install-extension junstyle.php-cs-fixer
echo "{" >> ~/Library/Application\ Support/Code/User/settings.json
echo "\"php-cs-fixer.executablePath\": \"~/.composer/vendor/bin/php-cs-fixer\"" >> ~/Library/Application\ Support/Code/User/settings.json
echo "}" >> ~/Library/Application\ Support/Code/User/settings.json
# Install FTP-Sync
code --install-extension lukasz-wronski.ftp-sync

# Install Java JDK
brew cask install java

# Install Eclipse C++
brew cask install eclipse-cpp

# Install Skype
brew cask install skype

# Install DropBox
brew cask install dropbox

# Install Google Drive
brew cask install google-drive-file-stream

# Install Google Chrome
brew cask install google-chrome

# Install YouTube Downloader CLI
brew install youtube-dl

# Install ffmpeg with plugins
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid

# Install Redis - CLI is all I care about
brew install redis
# If you want full Redis server follow https://gist.github.com/nrollr/eb24336b8fb8e7ba5630

# Install JQ (JSON Parser)
brew install jq

# Install FileZilla (FTP Client)
brew cask install filezilla

# Install PowerShell
brew install --cask powershell

# Install cdparanoia (CD Track Ripper), lame (MP3 conversion), and wget
brew install cdparanoia lame wget
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

# Change Theme to Avit Theme (OPTIONAL)
cat .zshrc | grep ZSH_THEME
sed -i '.original' 's/ZSH_THEME="robbyrussell"/ZSH_THEME="avit"/gp' ~/.zshrc
cat .zshrc | grep ZSH_THEME

Incidentally if you want/need to uninstall HomeBrew or Oh My Zsh

# Remove everything installed with HomeBrew
brew list -1 | xargs brew rm

# Remove HomeBrew (In some cases Sudo is not needed)
#sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
sudo /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
sudo rm -rf /usr/local/Homebrew/.github/
sudo rm -rf /usr/local/Homebrew/bin/
sudo rm -rf /usr/local/Homebrew/completions/
sudo rm -rf /usr/local/Homebrew/docs/
sudo rm -rf /usr/local/Homebrew/Library/
sudo rm -rf /usr/local/Homebrew/manpages/
sudo rm -rf /usr/local/etc/openssl
sudo rm -rf /usr/local/etc/wgetrc
sudo rm -rf /usr/local/microsoft/powershell
sudo rm -rf /usr/local/Caskroom/
sudo rm -rf /usr/local/bin/powershell
sudo rm -rf /usr/local/Homebrew/
sudo rm -rf /usr/local/remotedesktop/
sudo rm -rf /usr/local/var/homebrew/

# Remove Oh My Zsh
cd ~/
sh .oh-my-zsh/tools/uninstall.sh
rm -rf .oh-my-zsh
rm -rf .zsh-update
rm -rf .zsh_history
rm -rf .zshrc
rm -rf .zshrc.*
rm -rf .zcompdump*
chsh -s /bin/bash

One thing to note is after you uninstall Oh My Zsh you may need to close and reopen Terminal to see the difference.

Originally Posted on March 15, 2017
Last Updated on May 7, 2021
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Mac OS X Shell Mac OSX UNIX UNIX Shell Scripts BashHome BrewHomeBrewInstallerOh My ZshZsh

Post navigation

Previous post
Next post

Related Posts

Ubuntu / UNIX – Enable / Disable WiFi

Posted on February 17, 2018

nmcli radio wifi off nmcli radio wifi on All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it…

Read More

PowerShell – Delete Windows Service

Posted on November 9, 2015

Recently while trying Kentico I had to uninstall it and found that the service didn’t properly uninstall so I found PowerShell was quickly able to remedy that problem. $service = Get-WmiObject -Class Win32_Service -Filter "Name=’KenticoCMSHealthMonitor(Default Web Site_Kentico82)’" $service.delete() $service = Get-WmiObject -Class Win32_Service -Filter "Name=’KenticoCMSScheduler(Default Web Site_Kentico82)’" $service.delete() All information…

Read More

Mac OSX Terminal – Xcode Reset

Posted on December 5, 2016December 13, 2016

Make sure Xcode is closed. defaults delete com.apple.dt.Xcode rm -rfv ~/Library/Application\ Support/Developer/Shared/Xcode rm -rfv ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState rm -rfv ~/Library/Preferences/com.apple.dt.Xcode.* rm -rfv ~/Library/Preferences/com.apple.dt.xcodebuild.plist rm -rfv ~/Library/MobileDevice/Provisioning\ Profiles/* Originally Posted on December 5, 2016Last Updated on December 13, 2016 All information on this site is shared with the intention to help….

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • PowerShell - IIS Remove Site
  • SQLite - Auto-Increment / Auto Generate GUID
  • PowerShell - FTP Upload Directory With Sub-Directories
  • Raspberry Pi - Remove Default Apps
  • PowerShell - Change Windows CD/DVD Drive Letter
©2025 David Kittell | WordPress Theme by SuperbThemes