Skip to content

Instantly share code, notes, and snippets.

@YannMjl
Created August 17, 2018 01:18
Show Gist options
  • Save YannMjl/7a0f1286f1a3e1aee885d9405078a659 to your computer and use it in GitHub Desktop.
Save YannMjl/7a0f1286f1a3e1aee885d9405078a659 to your computer and use it in GitHub Desktop.
my mac pro .bash_profile configuration
# -------------------------------------------------------------------------- #
# Welcome Message
# -------------------------------------------------------------------------- #
echo "Hi Yann! Welcome back!"
# -------------------------------------------------------------------------- #
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. set paths
# 3. alias
# 4. Searching
# 5. Process Management
# 6. Networking
# 7. System Operations & Information
# 8. Web Development
# 9. Reminders & Notes
# 10. Scripts
#
# -------------------------------------------------------------------------- #
# -------------------------------------------------------------------------- #
# 1. ENVIRONMENT CONFIGURATION
# -------------------------------------------------------------------------- #
# Set the JAVA_HOME system environment variable
export JAVA_HOME=$(/usr/libexec/java_home)
# set the ANDROID_HOME system environment variable
export ANDROID_HOME=/usr/local/share/android-sdk
#export ANDROID_HOME=/Users/yann/Library/Android/sdk
export ANDROID_SDK_ROOT=$ANDROID_HOME
# get and set database path from heroku app
export DATABASE_URL=$(heroku config:get DATABASE_URL -a web-server-reports)
#export DATA_URL=jdbc:postgresql://localhost:500/$(whoami)
# -------------------------------------------------------------------------- #
# 2. SET PATHS
# -------------------------------------------------------------------------- #
# node@8 is keg-only, which means it was not symlinked into /usr/local,
# because macOS provides libicucore.dylib (but nothing else).
# export PATH="/usr/local/opt/node@8/bin:$PATH"
# node path install from nodejs download page /usr/local/bin/node
# and npm /usr/local/bin/npm
# export PATH="/usr/local/bin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# Add Visual Studio Code (code)
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
# setting path for Posgres app
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
# -------------------------------------------------------------------------- #
# 3. ALIAS
# -------------------------------------------------------------------------- #
# add alias for Komodo IDE 11 & use Komodo from the command-line
alias komodo='open -a "Komodo Edit 11"'
# add alias so that the python command on termanl refers to Python 3.6
alias python=python3
# add alias so that the pip command on terminal refers to pip3
alias pip=pip3
# -------------------------------------------------------------------------- #
# 10. Scripts
# -------------------------------------------------------------------------- #
# Install Git: brew install git
# Install bash-completion: brew install bash-completion
# Add bash-completion script for git auto completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
# config command prompt "in Prompt String 1" - PS1
export PS1='\u:\W$(__git_ps1 "(%s)") $ '
fi
# -------------------------------------------------------------------------- #
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment