- Identify which version of OSX you're using - ideally you should have El Capitan (10.11.x). If not, upgrade the OS in App Store.
- Install any OS updates displayed in the App Store
- Ensure that you've uninstalled any antivirus software you may have, as it can prevent some of the tools from installing properly
https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
This will take a while to install. You can continue on with the rest of the instructions while it's installing
- Open up the App Store and search for 'Slack'. Click 'Install'
- Log in to Slack using your account and leave the app running
- Right-click (two-finger click) on the icon in the Dock and select Options->Keep in Dock
NOTE: the team name is Codeclanteam, not Codeclan.
(can be done while XCode is installing)
- Go to https://google.com/chrome
- Click on
Download Chrome
- Go to the Downloads folder and run the
googlechrome.dmg
package - Go to System Preferences->General->Handoff & Selected Apps and uncheck the 'Allow Handoff between This Mac and your iCloud devices'. This will stop the 'Google Chrome from Mac' icon appearing in the Docking bar.
(can be done while XCode is installing)
- Download and install Sublime Text 3 - version 3083 is current
- Create a
bin
directory in the home directory to hold symlinks etc:mkdir $HOME/bin
- Make a symlink for Sublime Text, allowing us to launch it from the command line:
sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $HOME/bin/subl
- Put the newly created
bin
directory in your path for now, so you can use the symlink before installing zsh:export PATH=$HOME/bin:$PATH
(can be done while XCode is installing)
- Run from the command line:
xcode-select --install
- Choose
install tools
from the prompt andagree
to the terms - If you recieve a message saying "Can't install the software because it is not currently available from the Software Update server"... it's probably because the command line tools are already installed...
- Agree to the license by typing
sudo xcodebuild -license
- Press enter, then
q
- Then on the next prompt, type
agree
(Brew allows us to install and update software (like Ruby, Git, MongoDB, etc) from the command line)
- Open http://brew.sh/, scroll down to Install Homebrew and copy+paste the command into the terminal.
- Ensure that Homebrew is raring to brew and fix any issues:
brew doctor
- Update Homebrew:
brew update
(nb. the absolute paths will not be used after the next step, but might not be needed if they already have /usr/local/bin
in their $PATH)
(shell is a user interface for access to an operating system's services) (bash stands for 'bourne again shell', zsh stands for 'z-shell')
- Type
brew install zsh
- Type
zsh
. Type0
if the prompt ask you about .zshrc . You should have a different prompt - Type
exit
to return to bash - Type
which zsh
to determine where your new shell has installed. This shows/YOUR/PATH/TO/zsh
(usually/usr/local/bin/zsh
) - Type
$HOME/bin/subl /etc/shells
and add/YOUR/PATH/TO/zsh
. (Lists trusted shells. The chsh command allows users to change their login shell only to shells listed in this file) - In a new tab, type
chsh -s /YOUR/PATH/TO/zsh
, then close and reopen your terminal application to This will enable zsh by default. - Type
echo $SHELL
. this should return/YOUR/PATH/TO/zsh
(The PATH environment variable is a colon-delimited list of directories that your shell searches through when you enter a command)
- Type
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
- Let's move Homebrew's directory further up the PATH, so that software loads from there by preference:
-
Open the zshrc file
$HOME/bin/subl ~/.zshrc
-
Find the line that starts with something like
export PATH=
(usually near the end of the file) -
Change it so it looks like the following:
export PATH="/usr/local/bin:$HOME/bin:$PATH"
-
While you're in here, disable auto-updating by removing the
#
in front of the setting (around line 18) -
Add the following two lines to the bottom of the file to make Sublime the default text editor:
export EDITOR='subl -w -n' export PAGER='less -f'
Close your terminal and open a new one - the prompt should be an arrow and tilde, and in colour.
- Install rbenv (the Ruby version manager) and ruby-build (the Ruby version builder) from Homebrew:
brew install ruby-build rbenv
- Ensure that rbenv is loaded whenever we open a command line session:
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.zshrc
- Move the rbenv environment higher in the load order:
echo 'export PATH=$HOME/.rbenv/shims:$PATH' >> ~/.zshrc
- Quit the current terminal (Cmd+Q)
- And then reopen the terminal application, ensuring there are no errors - you should be able to type
rbenv -v
and get a version number.
(Yukihiro Matsumoto wrote ruby, Matz's Ruby Interpreter or Ruby MRI)
- OS X 10.9 comes with Ruby baked in, but it's version is not the latest one. We could upgrade that version of Ruby to a newer one, but what if we needed to run one version of Ruby for one app, and a different version for another?
- Install Ruby 2.3.0. This is the latest stable version of Ruby:
rbenv install 2.3.0
- This is required every time we install a new Ruby or install a gem with a binary:
rbenv rehash
- Set the global Ruby to the one we've just installed, which is a sensible default:
rbenv global 2.3.0
- Test you have the right version with
ruby -v
- Whenever we install a gem, it also installs a bunch of documentation we probably don't want - the following command allows us to avoid this:
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
- Bundler manages Ruby gems per-project/application, and makes it trivial to install all the dependencies for an application:
gem install bundler
rbenv rehash
(because we've installed a new binary)
- We will often download files from the internet in the command line... this is the tool to do that:
brew install wget
brew install node
- Download PostgreSQL
- Unzip the downloaded file and drag to
applications
- Choose
automatically start at login
in preferences, and don'tshow welcome screen
- Update the PATH variable in .zshrc. To do this run the following in the command line:
echo 'export PATH="/Applications/Postgres.app/Contents/Versions/9.5/bin:$PATH"' >> ~/.zshrc
- This ensures we can upgrade Git more easily:
brew install git
rehash
- Ensure you're not using "Apple Git" from the path
/usr/bin/git
by checkingwhich git
andgit --version
Configure your name and email address for commits (be sure to use the email address you have registered with Github):
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Since we never want to track .DS_Store files, we can make a global .gitignore
file, and tell git to use it for all repositories:
echo .DS_Store >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
Add this to never track the contents of your uploads folder in Rails.
echo /public/uploads/ >> ~/.gitignore_global
- First, we need to check for existing SSH keys on your computer. Open up your Terminal and type:
ls -al ~/.ssh
Check the directory listing to see if you have files named either id_rsa.pub or id_dsa.pub. If you have either of those files you can skip to the step 'add your SSH key to Github'. - Generate a new SSH key
ssh-keygen -t rsa -C "[email protected]"
- You'll be prompted for a file to save the key, and a passphrase. Press enter for both steps (default name, and no passphrase)
- Then add your new key to the ssh-agent:
ssh-add ~/.ssh/id_rsa
- Add your SSH key to GitHub by logging into Github, visiting
account settings
and clickingSSH keys
. ClickAdd SSH key
- Copy your key to the clipboard with the terminal command:
pbcopy < ~/.ssh/id_rsa.pub
- On Github, create a descriptive title for your key, an paste into the
key
field - do not add or remove and characters or whitespace to the key - Click
Add key
and check everything works in the terminal by typing:ssh -T [email protected]
Install Open Dyslexic font Unzip OpenDyslexic3 and Mono and copy the Font files to the Fonts folder (or open Font Book and select Add Fonts)
Install the sublime package manager
- To install the package manager, press `ctrl + ``
- then copy/paste this command (yes, the whole thing!) into the newly opened Sublime terminal:
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
(If this does not work then use the command under 'Sublime Text 3' in the link above)
Press cmd-shift-p
and type 'Package Control: Install Package'
- Install "GitGutter"
- And "Maybs Quit
- SideBarEnhancements
- SublimeLinter
- SublimeLinter-Ruby
Add reindent and paste_and_indent shortcuts in Preferences/Key Bindings - User, restart sublime:
[
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" },
{ "keys": ["super+shift+r"], "command": "reindent" }
]
cmd + ,
allows you to access the sublime's preferences.
{
"auto_complete_commit_on_tab": true,
"find_selected_text": true,
"font_face": "Monaco",
"highlight_active_indent_guide": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"hot_exit": false,
"word_wrap": true
}
NOTE the 'OpenDyslexic3' font can be used instead of 'Monaco' if you require/wish it.
- Bind the
§
key to the hash symbol by creating/editing the default key binding dictionary:
mkdir ~/Library/KeyBindings
subl ~/Library/KeyBindings/DefaultKeyBinding.dict
- Add the binding:
{
/* Map # to § key*/
"§" = ("insertText:", "#");
}
- Restart your Mac for this to take effect.
To install GDB type:
brew tap homebrew/dupes
brew install gdb
(Steps 1-10 can be done while gdb is installing)
- Open up the Keychain Access application (/Applications/Utilities/Keychain Access.app). Navigate via the menu to Keychain Access > Certificate Assistant > Create Certificate...
- Enter a name for the certificate e.g. "gdb-cert". Set the fields exactly as following:
Identity Type: Self Signed Root
Certificate Type: Code Signing
- Check the 'Let me override defaults' box.
- Click 'Continue'
- In the 'Certificate Information' window, enter '6666' in the 'Validity Period (days)' box (to make sure the certificate never runs out.
- Click 'Continue' and keep clicking 'Continue' until you come to the 'Specify a Location For the Certificate' window.
- Select 'System' from the 'Keychain' dropdown list.
- Click 'Create' - the certificate should now have been created.
- You now need to make sure that the certificate is always trusted. Select 'System' on the left hand side and in the list of certificates, right-click on the gdb-cert certificate and select 'Get Info'. Under the 'Trust' section, set 'Code Signing' to 'Always Trust'. Now that we have a certificate, we need to use it to sign gdb.
- Quit Keychain access. You must do this before doing anything else.
- To make sure that the new certificate is picked up you need to kill the taskgated process. You can do this in the terminal by doing the following:
ps -e | grep taskgated
56822 ?? 0:03.11 /usr/libexec/taskgated -s
60944 ttys002 0:00.00 grep --color=auto taskgated
The first number in the above output is the PID. Use this to kill the process (it will immediately restart itself).
sudo kill -9 56822
(restarting your computer negates the need for you to kill the taskgated process)
- Now you can finally code sign gdb.
codesign -s gdb-cert $(which gdb)
Now you should be all set! The OS X Keychain may ask for your password the first time you attempt to debug a program, but it should work!
###Install Alternative text editors Sublime can be left on the machines for the students to trial but we'd be breaking the licence if we used it continuously. Atom and Visual Studio Code are free alternatives
Download and install Atom
###Install JDK with Netbeans
Download and install JDK with Netbeans
###Android SDK and Android Studio
Download and install Android Studio
If JDK is successfully installed then Android Studio should install fine. Alternatively (if you get errors about Platform Tools) then follow these instructions before reinstalling Studio.
###Virtual Box and Oracle
Download and install VirtualBox platform for OS X and the Oracle extension
###Eclipse IDE
Download and install Eclipse IDE for Java
###UML Diagram software
Download and install Visual Paradigm Community edition Follow the instructions for integrating VP with Netbeans