Last active
February 13, 2018 09:45
-
-
Save Adriench/3526753c385e79b850fe to your computer and use it in GitHub Desktop.
Stuff to do on Mac OSX with MAMP to use the same PHP cli and cgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add Elements to Path | |
# PHP Path | |
export MAMP_PATH="/Applications/MAMP/Library/bin:/Applications/MAMP/bin/php/php5.6.25/bin:$PATH" | |
# ADB Path | |
export ANDROID_SDK_PATH="/Users/Adrien/Library/Android/sdk/platform-tools" | |
# Node Path | |
export NPM_PATH="/usr/local/bin" | |
# Terminal Configuration | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
# Alias Global | |
alias ls='ls -GFh' | |
alias loc='cd ~/Documents/localhost/' # edit: Opens any file in sublime editor | |
alias ..='cd ..' # .. Directory up | |
alias ....='cd ../..' # .... Directory up twice | |
alias ......='cd ../../..' # ...... Directory up three time | |
# Alias Network | |
alias myip='curl ip.appspot.com' # myip: Public facing IP Address | |
alias netCons='lsof -i' # netCons: Show all open TCP/IP sockets | |
alias flushDNS='dscacheutil -flushcache' # flushDNS: Flush out the DNS Cache | |
alias lsock='sudo /usr/sbin/lsof -i -P' # lsock: Display open sockets | |
alias lsockU='sudo /usr/sbin/lsof -nP | grep UDP' # lsockU: Display only open UDP sockets | |
alias lsockT='sudo /usr/sbin/lsof -nP | grep TCP' # lsockT: Display only open TCP sockets | |
alias ipInfo0='ipconfig getpacket en0' # ipInfo0: Get info on connections for en0 | |
alias ipInfo1='ipconfig getpacket en1' # ipInfo1: Get info on connections for en1 | |
alias openPorts='sudo lsof -i | grep LISTEN' # openPorts: All listening connections | |
alias showBlocked='sudo ipfw list' # showBlocked: All ipfw rules inc/ blocked IPs | |
# Alias Vagrant | |
if [ ! -d ./deploy ] ; then | |
alias vup='cd deploy/; vagrant up' # vup: Go to deploy/ then Start Vagrant | |
alias vhalt='cd deploy/; vagrant halt' # vhalt: Go to deploy/ then Stop Vagrant | |
else | |
alias vup='vagrant up' # vup: Start Vagrant | |
alias vhalt='vagrant halt' # vhalt: Stop Vagrant | |
fi | |
# finderShowHidden: Show hidden files in Finder | |
# finderHideHidden: Hide hidden files in Finder | |
# ------------------------------------------------------------------- | |
alias finderShowHidden='defaults write com.apple.finder ShowAllFiles TRUE' | |
alias finderHideHidden='defaults write com.apple.finder ShowAllFiles FALSE' | |
# Tell grep to highlight matches | |
export GREP_OPTIONS='--color=auto' | |
# Path composer | |
export COMPOSER_PATH="/usr/local/bin/composer" | |
# Final Path | |
export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$MAMP_PATH:$ANDROID_SDK_PATH:$NMP_PATH:$COMPOSER_PATH:$PATH"export PATH=$PATH:~/.nexustools |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment