Last active
December 19, 2016 14:54
-
-
Save TareqElMasriDev/ed730665cb4091cf670dd7f4708fda61 to your computer and use it in GitHub Desktop.
My personal dotfile
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
#!/bin/bash | |
#export PATH=$PATH:/Users/macbook/mongodb/bin | |
export PATH=$PATH:/data/master/SDK/android-sdk/sdk/tools | |
export PATH=$PATH:/Applications/Genymotion\ Shell.app/Contents/MacOS/:/Applications/Genymotion.app/Contents/MacOS/ | |
export PYTHONPATH=$(brew --prefix)/lib/python2.7/site-packages:$PYTHONPATH | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export ANDROID_HOME=/usr/local/opt/android-sdk | |
alias redis=~/redis/src/redis-server | |
alias photoshop="open /Applications/Adobe\ Photoshop\ CC\ 2017/Adobe\ Photoshop\ CC\ 2017.app" | |
alias illustrator="open /Applications/Adobe\ Illustrator\ CC\ 2017/Adobe\ Illustrator.app" | |
alias indesign="open /Applications/Adobe\ InDesign\ CC\ 2017/Adobe\ InDesign\ CC\ 2017.app" | |
alias elves.serve="/usr/local/Cellar/mysql/5.7.12/bin/mysql.server start --skip-grant-tables && cd ~/workspace/elves/elvesapp-mw && rails s -b 0.0.0.0" | |
alias chillhound.serve="cd ~/workspace/chillhound/chillhound-pro-api && source venv/bin/activate && python server/run.py" | |
alias mamp="open /Applications/MAMP\ PRO/MAMP\ PRO.app/" | |
alias mamp.start="sudo /Applications/MAMP/Library/bin/httpd -f '/Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf' -k start && sh -c '/Applications/MAMP/Library/bin/mysqld_safe --defaults-file=/Applications/MAMP/tmp/mysql/my.cnf --port=3306 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --user=alex --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysql_error_log.err --tmpdir=/Applications/MAMP/tmp/mysql/tmpdir --datadir=/Library/Application\ Support/appsolute/MAMP\ PRO/db/mysql &'" | |
alias mamp.stop="sudo /Applications/MAMP/Library/bin/httpd -f '/Library/Application Support/appsolute/MAMP PRO/conf/httpd.conf' -k stop && sh -c '/Applications/MAMP/Library/bin/mysqladmin -u root -proot --socket=/Applications/MAMP/tmp/mysql/mysql.sock shutdown'" | |
alias docker.quick="bash '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'" | |
alias mongo.start="brew services start mongodb" | |
alias sails.start="sails lift --dev" | |
alias php.console="php -a" | |
alias services="brew services" | |
alias calc=bc | |
alias cdd='cd ~/Downloads/' | |
alias rm='rm -rf' | |
alias .h=/Applications/MAMP/htdocs | |
alias .w=~/workspace | |
alias zrc="vim ~/.zshrc" | |
alias erc="vim ~/.zprofile" | |
alias src="source ~/.zprofile" | |
alias init="git commit -am 'inital commit'" | |
alias add="git add" | |
alias pull="git pull" | |
alias push="git push" | |
alias clone="git clone" | |
alias branch="git branch" | |
alias push.origin="git push origin" | |
alias i="yarn install --ignore-scripts" | |
alias node.debug="node --trace-deprecation" | |
alias heroku.log="heroku logs --tail > ../npm-debug.log" | |
alias heroku.run="heroku ps:scale web=1" | |
alias heroku.restart="heroku restart" | |
alias heroku.tail="heroku logs --tail" | |
alias heroku.bash="heroku run bash" | |
alias heroku.vim="heroku vim" | |
alias ssl="sudo certbot certonly --manual" | |
alias simple="python -m SimpleHTTPServer" | |
alias serve="gulp serve" | |
alias start="npm start" | |
alias dwnwb="wget -E -H -k -K -p" | |
alias deepdig="wget -m -p -E -k -K -np" | |
alias artisan="php artisan" | |
alias composer="php /usr/local/bin/composer" | |
ports () { | |
lsof -i $1 | |
} | |
mcd () { | |
mkdir $1 && cd $1 | |
} | |
cross () { | |
tns livesync $1 --emulator --watch | |
} | |
rnm () { | |
rename -vs $1 $2 * | |
} | |
git.ci () { | |
git ci -am $1 | |
} | |
git.add () { | |
git ci -am "[ADD] $1" | |
} | |
git.edit () { | |
git ci -am "[EDIT] $1" | |
} | |
git.fix () { | |
git ci -am "[FIX] $1" | |
} | |
git.del () { | |
git ci -am "[DEL] $1" | |
} | |
git.merge () { | |
git ci -am "[MERGE] $1" | |
} | |
count () { | |
ls $1 | wc -l | |
} | |
size () { | |
du -sh $1 | |
} | |
rand () { | |
date +%s | base64 | head -c $1 ; echo | |
} | |
php.exec () { | |
php -r "$1;" | |
} | |
php.echo () { | |
php -r "echo '$1';" | |
} | |
md5hash () { | |
php -r "echo md5('$1');" | |
} | |
extract () { | |
if [ -z "$1" ]; then | |
# display usage if no parameters given | |
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>" | |
else | |
if [ -f "$1" ] ; then | |
NAME=${1%.*} | |
#mkdir $NAME && cd $NAME | |
case "$1" in | |
*.tar.bz2) tar xvjf ./"$1" ;; | |
*.tar.gz) tar xvzf ./"$1" ;; | |
*.tar.xz) tar xvJf ./"$1" ;; | |
*.lzma) unlzma ./"$1" ;; | |
*.bz2) bunzip2 ./"$1" ;; | |
*.rar) unrar x -ad ./"$1" ;; | |
*.gz) gunzip ./"$1" ;; | |
*.tar) tar xvf ./"$1" ;; | |
*.tbz2) tar xvjf ./"$1" ;; | |
*.tgz) tar xvzf ./"$1" ;; | |
*.zip) unzip ./"$1" ;; | |
*.Z) uncompress ./"$1" ;; | |
*.7z) 7z x ./"$1" ;; | |
*.xz) unxz ./"$1" ;; | |
*.exe) cabextract ./"$1" ;; | |
*) echo "extract: '$1' - unknown archive method" ;; | |
esac | |
else | |
echo "'$1' - file does not exist" | |
fi | |
fi | |
} | |
# Setting PATH for Python 3.6 | |
# The original version is saved in .zprofile.pysave | |
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" | |
export PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment