Skip to content

Instantly share code, notes, and snippets.

@smronju
Created April 30, 2012 06:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smronju/2555968 to your computer and use it in GitHub Desktop.
Save smronju/2555968 to your computer and use it in GitHub Desktop.
My .profile
###############################################################################
############################# My Settings #####################################
###############################################################################
# MySQL native path
export PATH="/usr/local/mysql/bin:$PATH"
# Android sdk path adb command
export PATH=${PATH}:/Users/smronju/Library/Application\ Support/Titanium/mobilesdk/platform-tools
# MAMP php path
export PATH=/Applications/MAMP/bin/php/php5.3.6/bin:$PATH
#export PATH=/Applications/MAMP/bin/php/php5.3.6/lib/php/PHPUnit:$PATH
# Adding php composer path
alias composer="php /Applications/MAMP/bin/php/php5.3.6/bin/composer.phar"
# Zend Framework Cli
alias zf=/usr/local/ZendFrameworkCli/bin/zf.sh
# Custom aliases
alias ll="ls -la"
alias la="ls -a"
alias ld="ls -ld"
#Opens home in finder
alias of="open -a Finder ."
# Opens ichat
alias ichat="open -a ichat"
# Opens firefox
alias ff="open -a firefox"
# Reloads .profile for current terminal window
alias reload=". ~/.zshrc"
# Returns to home
alias home="cd ~"
# Returns to desktop
alias desk="cd ~/Desktop"
# Go back to upper directory
alias up="cd .."
# Pings google
alias pg="ping google.com"
# Open vhost file in textmate
alias vhost="mate /Applications/MAMP/conf/apache/vhosts.conf"
# Opens hosts file in terminal
alias hosts="sudo nano /etc/hosts"
# Calls my projects and personal directory
alias projects="cd /Applications/MAMP/htdocs/projects/"
alias personal="cd /Applications/MAMP/htdocs/personal/"
# Error logs
#alias phpelog="tail -f /Applications/MAMP/logs/php_error.log"
# Clears DNS Cache
alias cleardns="dscacheutil -flushcache"
# Clears cache
alias clearcache="sudo atsutil databases -remove"
###########################################################
####################### Git aliases #######################
###########################################################
alias pull='git pull origin'
alias push='git push origin'
# This calls a directory and lists all files in it
function cdl(){
cd $1;
$ls;
}
# Search using google, example call: google smronju
function google() {
search=""
echo "$1"
for term in $*; do
search="$search%20$term"
done
open "http://www.google.com/search?q=$search"
}
# find a running process
function pgrep() {
ps aux | grep $1 | grep -v grep
}
# Kills a running process, example call: pkill mamp
function pkill() {
local pid
pid=$(ps ax | grep $1 | grep -v grep | awk '{ print $1 }')
kill -9 $pid
echo -n "Killed $1 (process $pid)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment