Friday, 10 February 2017

Dev Setup of a Mac

After working in my 2nd consecutive company that uses Mac's for developers and having forgot everything I used the first time, I thought I better write down all the tweaks, work arounds and config changes that got me using my mac efficiently.

Remap Fn-C to copy

Mac's use Mac-C instead of Ctrl-C to copy (and X, V to cut and paste). This is really annoying if you switch between a mac and Windows machine a lot. Fortunately you can use Karabiner to map Fn-C to copy as the Fn key is located where Ctrl is on a windows keyboard. If your on OSX Sierra you'll need to use Karabiner Elements for now.


Just run git from the command line and it will prompt you to install xcode tools.


This needs to be installed first as it installs most dev tools.
Note: if your behind a corporate proxy you'll need to run export HTTPS_PROXY=http://yourproxy:port first.
/usr/bin/ruby -e "$(curl -fsSL"

A better terminal

brew cask install iterm2

Colour ls 

From this Stackexchange post, edit ~/.bash_profile:
export CLICOLOR=1
export LSCOLORS= gxBxhxDxfxhxhxhxhxcxcx

Colour vim 

edit ~/.vimrc:
syntax on

AWS etc

awslogs is a cloudwatch log watcher (you may have to run the install as sudo)

brew install python
# this is needed as brew installs the commands as python2, pip2 etc
echo 'export PATH="/usr/local/opt/python/libexec/bin:$PATH"' >> ~/.bash_profile
pip install awscli
pip install awslogs


sshuttle - a handy python ssh tunnelling that allows you to easily route ranges of IPs over ssh.

pip install sshuttle


brew install rbenv
Add the following to ~/bash_profile
eval "$(rbenv init -)"
Then run
rbenv install 2.2.3
rbenv global 2.2.3


brew cask install java
brew install gradle
Then add this to ~/.bash_profile:
export JAVA_HOME=$(/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java_home)

node.js / nvm

To install node, it's best to use only nvm to handle the installations.
curl -o- | bash


cntlm is a local proxy that makes dealing with a corporate proxy a bit easier.
brew install cntlm


Corkscrew is a ssh proxy tunneler that allows ssh through https.
brew install corkscrew

No comments:

Post a Comment