Skip to content

Instantly share code, notes, and snippets.

@lbalmaceda
Last active February 26, 2021 08:14
Show Gist options
  • Save lbalmaceda/904db479d76ee1ae6ccce10abee5a864 to your computer and use it in GitHub Desktop.
Save lbalmaceda/904db479d76ee1ae6ccce10abee5a864 to your computer and use it in GitHub Desktop.
Mac OS X Environment Setup with Android

Mac OS X Environment Setup with Android

Every time I format the drive and perform a clean install of the SO, I end up searching for my favorite stuff. This file tries to sum up my setup.

Browser

Download Chrome.

Also install the latest JDK (Java Development Kit).

Text Editor

Download Atom and apply a cool theme like An Old Hope.

Terminal

Instead of using the old Terminal, download iTerm2.

Install Pretzo and set Zsh as the default shell.

Leave everything as default, but make sure to enable at least the git module and choosing the sorin prompt. Do this by modifying the .zpreztorc file.

Apply some cool color scheme like Material Shell, Solarized or Dracula by downloading and importing the *.itermcolors from in Profile/Colors in the iTerm2 settings.

You'll need to close all the terminal windows for the changes to apply.

Android IDE

Download Android Studio. Make sure to add the environment variables first, at least JAVA_HOME and GRADLE_HOME.

Emulator

Install Genymotion. You'll also need to install VirtualBox.

If you need to use Google Play Services you'll need to hack it. Check this gist and follow the steps.

Install the Dev tools

Download Homebrew for installing stuff from the terminal. The installation needs to clone the repository, so if you think it's stucked just give it a couple more minutes. :)

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

If you forgot to install a dependency like the JDK, you will get a message telling which binaries are missing.

Install these tools:

brew install ant
brew install maven
brew install gradle
brew install android-sdk

To download the latest SDK run the following command and the SDK Downloader window will open.

android update sdk

If you prefer to download every single API's SDK, append --no-ui at the end of the command and they will be downloaded automagically.

Update the environment variables

Open the .zshrc file and append:

export ANT_HOME=/usr/local/opt/ant
export MAVEN_HOME=/usr/local/opt/maven
export GRADLE_HOME=/usr/local/opt/gradle
export ANDROID_HOME=/usr/local/opt/android-sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/[JDK_VERSION_NAME]/Contents/Home

export PATH=$ANT_HOME/bin:$PATH
export PATH=$MAVEN_HOME/bin:$PATH
export PATH=$GRADLE_HOME/bin:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/build-tools/$(ls $ANDROID_HOME/build-tools | sort | tail -1):$PATH

Git aliases

git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status

git config --global alias.cm 'commit -m'
git config --global alias.cma 'commit -am'
git config --global alias.lg 'log -p'
git config --global alias.df diff
git config --global alias.unstage 'reset HEAD --'

Also check that you've configured your user information.

git config --global user.email "your_email@example.com"
git config --global user.name "Billy Everyteen"

Shell aliases

export weather='curl wttr.in'

Extra Apps

exa: a moderm replacement for ls

Install https://the.exa.website/

brew install exa

HttPie: a moderm replacement for curl

Install https://httpie.org/

brew install httpie

REST/API

Download Postman.

Chat

Download Slack.

Music

Download Spotify.

Videos

Download VLC

VOIP Calls

Download Skype.

Cast to AppleTV & Chromecast

Download AirFlow

Torrents

Download Transmission

Keep Mac Awake

Download Amphetamine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment