Archive for May, 2016

Installing Android SDK & NDK on OSX

Thursday, May 26th, 2016

First, get Homebrew if you haven’t already: http://brew.sh/

Run these commands in the terminal

brew install android-sdk
brew install android-ndk

Update Android tools by running in the terminal:

android update sdk --no-ui

Homebrew installs your Android SDK and NDK into /usr/local/Cellar/ subfolders based on which versions it installed, but luckily it also creates two symlinks that always point to the newest versions of each; /usr/local/opt/android-sdk and /usr/local/opt/android-ndk.

Lastly add those to your .bash_profile:

export ANDROID_HOME=/usr/local/opt/android-sdk
export ANDROID_NDK=/usr/local/opt/android-ndk

Git diff branch only

Tuesday, May 17th, 2016

To see only the differences between master and branch from when they diverged (pull request style) do

git diff master...branch #note: three dots

To see all differences between master and branch do

git diff master..branch #note: two dots

Note that master or branch can be replaced with any ref like head depending on which branch you have checked out.