Skip to content

Instantly share code, notes, and snippets.

@DrizzlyOwl
Last active October 27, 2016 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrizzlyOwl/e17025552e0c3d330a46 to your computer and use it in GitHub Desktop.
Save DrizzlyOwl/e17025552e0c3d330a46 to your computer and use it in GitHub Desktop.
OSX Initialisation script
#!/bin/sh
echo "Installing xcode command line tools";
sudo xcode-select --install;
echo "Installing Homebrew";
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
brew update;
brew doctor;
export PATH="/usr/local/bin:$PATH";
echo "Installing Homebrew Cask";
brew cask;
echo "Installing OSX Apps (Will take a while - go make a brew)";
# Install Apps
brew cask install google-chrome;
brew cask install sublime-text;
brew cask install slack;
brew cask install sequel-pro;
brew cask install iterm2 ;
brew cask install imageoptim;
brew cask install skype;
brew cask install sketch;
brew cask cleanup;
echo "App installation complete";
echo "Installing dev dependencies";
# Install dev modules
brew install node;
brew install -g grunt-cli;
echo "Installing wp-cli";
# Install wp-cli
sudo curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar;
sudo chmod +x wp-cli.phar;
sudo mv wp-cli.phar /usr/local/bin/wp;
echo "Installing AMP";
# MariaDB
brew install mariadb;
echo -e "\n\root\root\n\n\nn\n\n " | mysql_secure_installation 2>/dev/null;
mysql --user="root" --password="root" --execute="CREATE DATABASE test;";
# Set up Apache
sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf~bak;
sudo rm /etc/apache2/httpd.conf;
sudo wget https://gist.githubusercontent.com/DrizzlyOwl/1af3d151d86b396cadfce09fb08a010b/raw/0ed26b35c49012ed956e419f89b8aafc73acb0ae/httpd.conf /etc/apache2/httpd.conf;
sudo mkdir /etc/apache2/extra;
touch /etc/apache2/extra/httpd-vhosts.conf;
sudo cp /etc/apache2/extra/httpd-vhosts.conf /etc/apache2/extra/httpd-vhosts.conf~bak;
sudo wget https://gist.githubusercontent.com/DrizzlyOwl/12d238f7c1ad6b39cadc3089ec82b602/raw/080049677f2bd53b6b0f96d9cae0f1b5e166d5c4/httpd-vhosts.conf /etc/apache2/extra/httpd-vhosts.conf;
sudo apachectl restart;
sudo mkdir ~/sites;
brew install dnsmasq;
echo "Setting up SSH";
ssh-keygen -t rsa -b 4096 -C "ash.davies@outlook.com";
eval "$(ssh-agent -s)";
ssh-add ~/.ssh/id_rsa;
brew install keychain;
echo "Setting up Zsh";
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)";
touch ~/.zshrc;
sudo cp ~/.zshrc ~/.zshrc~bak;
sudo wget https://gist.githubusercontent.com/DrizzlyOwl/3e863be86b85d3d10bbe0b68453ca511/raw/b78d5534ed702599ad9f6e893a645eff8fe8f7c1/.zshrc ~/.zshrc;
echo "All done!";
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment