Over the years the list bellow has become my go to reference for setting up a new Mac.  These are the bare bone tools I will recommend for some serious development on a Mac, especially around Java and the open source world.  Read through, make it yours and add to it.

Firstly, as always with a Mac you’ll need to agree to apple’s Xcode terms to make full use of the terminal.

[code language=”bash”]
#go to your terminal and run :
xcode-select –install
[/code]

 

Install iTerm.

An extremely great alternative to the in-built mac terminal

 

.profile

Add .profile settings for syntax terminal highlighting.  Why not? After all we spent quite a lot of time on bash terminals why not make them more interesting.  It might just help prevent you from typing the wrong command in the incorrect terminal.

Example Bash_Profile:

[code language=”bash”]

# Bash Colors
export TERM="xterm-color"
export CLICOLOR="true"
export LSCOLORS="exfxcxdxbxegedabagacad"

# Bash Prompt customisation with current location
export PS1=’\[\033[01;35m\]\u\[\033[34m\]@\[\033[36m\]\h\[\033[00m\]:\[\033[01;33m\]\w\[\033[31m\]$(git branch -l 2>/dev/null | sed -n s/^*//p) $(hg branch 2>/dev/null) \$\[\033[00m\]’

# Java Home Over-ride
#export JAVA_HOME=`/usr/libexec/java_home -v 1.8.0_45`
#export JAVA_HOME=`/usr/libexec/java_home -v 1.7.0_79`
[/code]

 

Sublime Text

Sublime has gone pass the test of time for the new kid in the block text editor to a must have for all developers and dev-ops.  Install Sublim from here and its package manager

 

Font Made for Code

Install a equal width font like: Adobe Source Pro Font

 

Latest Python tools

Install python from here PIP command

 

Maven Installation

Download maven and unzip to preferred location

 

Set Path in profile:

  • ~/.bash_profile

[code language=”bash”]
export M2_HOME=/Users/developer/apache-maven-3.1.1
export PATH=$PATH:$M2_HOME/bin
[/code]

 

  • Post Configuration… set’up your maven .m2 settings.xml file
  • See more Installation Instructions here

 

Package manager

There are many options there but I will strongly recommend Brew :
Installs the stuff that apple did not, With Brew from here

 

[code language=”bash”]
# Example installation commands, as simple as:
brew install python
brew install git
brew install ruby
brew install node
brew install mongo
[/code]

Automate Enabling/Disabling Hidden Files on a Mac

[code language=”bash”]
# show/hide hidden files
alias showFiles=’defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app’
alias hideFiles=’defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app’
[/code]

 

Mac Host File Edit

Go here to edit your host file, blocking out distracting sites such as facebook, twitter, hacker news e.t.c.  Simply re-route them back to localhost:
/private/etc/hosts

[code language=”bash”]
# Example entry to route facebook to an invalid ip
0.0.0.0 facebook.com

# Example entry to route facebook to your internal ticketing system
jira.intranet facebook.com
[/code]


Leave a Reply

Your email address will not be published. Required fields are marked *