Skip to content

Instantly share code, notes, and snippets.

@anandkkpr
Last active August 29, 2015 13:57
Show Gist options
  • Save anandkkpr/9643900 to your computer and use it in GitHub Desktop.
Save anandkkpr/9643900 to your computer and use it in GitHub Desktop.
#!/bin/sh
# BASH PROMPT COMBO FROM CYGWIN
# PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ "
#shopt -s expand_aliases
# Bash
alias l="ls -lhaX --color=always"
alias ll="ls -lhaX --color=always | grep '^d' && ls -lhaX --color=always | grep '^-' && ls -lhaX --color=always | grep '^l' "
alias lst="stat -c '%A %a %n' *"
alias lde="du | grep '^0'"
alias lg="ls -lhaX --color=always | grep -i"
alias cl="clear"
alias c="cd "
alias rmr="rm -rfv"
alias rmk="rmr *.drushmakelog"
alias rmd="rmr ~/.drush/cache/*"
alias ssho="ssh -o 'PubkeyAuthentication no'"
alias sal="source ~/.bash/aliases.bsh"
alias sale="vim ~/.bash/aliases.bsh"
alias aliasg='alias | grep '
alias mys="mysql -h 127.0.0.1 -P 3306 -uroot -ppassword "
alias mysqladmin="mysqladmin -h 127.0.0.1 -P 3306"
alias mysa="mysqladmin -uroot -ppassword "
alias mysdr="mysa -uroot -ppassword drop "
alias myscr="mysa -uroot -ppassword create "
alias mdump="mysqldump -h 127.0.0.1 -P 3306 -uroot -ppassword "
alias pulb='pactl load-module module-bluetooth-discover'
alias aprt="sudo service apache2 reload"
alias apsia="l /etc/apache2/sites-available "
alias apsie="l /etc/apache2/sites-enabled "
alias mysrt="sudo service mysql reload"
alias ag="sudo apt-get "
alias agi="sudo apt-get -y install "
alias agu="sudo apt-get -y update "
alias agr="sudo add-apt-repository -y "
alias ngrt='sudo service php5-fpm restart && sudo service nginx restart '
alias ngsa="l /etc/nginx/sites-available "
alias ngse="l /etc/nginx/sites-enabled "
alias nges='sudo nginx_ensite '
alias ngds='sudo nginx_dissite '
alias ngown='sudo chown -R www-data:www-data'
alias ngt='nginx -t'
alias ngtst='ps -eo pid,comm,euser,supgrp | grep nginx && ps -eo pid,comm,euser,supgrp | grep php'
alias ngstp='sudo service nginx stop && sudo service php5-fpm stop'
alias ngstrt='sudo service nginx start && sudo service php5-fpm start'
alias shotgun="shotgun --port=8080 "
alias foot="tail"
#function lsg() {
# ls $1 | grep $2
#}
#------------------------------------------------------------
# Git
alias g="git "
alias ga="g add -v "
alias gap="ga -p "
alias gb="g branch "
alias gbl="gb -vv "
alias gbd="gb -D "
alias gba="gb -a -vv"
alias gbm="gb -m "
alias gbsu="gb --set-upstream-to "
alias gbf="gba | grep "
alias gd="git diff "
alias gf="git fetch --all "
alias gds="git diff --staged "
alias gdl="git diff --name-only --diff-filter=U "
alias gs="g status -u"
alias gr="g remote -v "
alias gra="g remote add "
alias gre="g reset "
alias greh="gre HEAD --hard "
alias grm="g rm -r "
alias grmc="g rm -r --cached "
alias gc="g commit -v -m "
alias gca="g commit -av -m "
alias gcfl='git config --list'
alias gcffmf='git config --local core.filemode false'
alias gcl="g clone -v --progress "
alias gch="g checkout "
alias gchb="g checkout -b "
alias gpl="g pull "
alias gplo="gpl origin "
alias gplonf="gpl -v --progress --no-ff origin "
alias gps="g push -v --progress "
alias gpsu="g push -v --progress -u "
alias gpso="g push -v --progress origin "
alias gpsou="g push -v --progress -u origin "
alias guiau="g update-index --assume-unchanged "
alias guiaun="g update-index --no-assume-unchanged "
alias gacp="ga . && gc . && gps"
alias gsub="g submodule "
alias gsuba="gsub add "
alias gsubui="gsub update --init "
alias gsubuir="gsubui --recursive "
alias gst="g stash "
alias gsts="g stash save "
alias gstp="g stash pop "
alias gstls="g stash list "
alias gstsh="g stash show "
alias gt='git tag '
alias gtd='git tag -d '
alias gtp='git push --tags '
alias gtcur='git name-rev --tags --name-only $(git rev-parse HEAD)'
function ghash() {
echo `git log --format=%H -n1`
}
function gswitch() {
git stash save && git checkout $1 && git stash pop
}
#------------------------------------------------------------
# Drush
alias d="drush"
alias dl="d dl --verbose "
alias dls="dl --select "
function dlspc() {
dls --destination=profiles/$1/modules/contrib shift $*
}
alias dlt="dl --destination=sites/all/themes "
alias dlc="dl --destination=sites/all/modules/contrib "
alias dlcs="dl --select --destination=sites/all/modules/contrib "
alias dvg="d vget "
alias dvs="d vset "
alias dct="d cc theme-registry "
alias dca="d cc all "
alias dcj="d cc css-js "
alias dcd="d cc drush "
alias den="d en --verbose -y "
alias dis="d dis --verbose -y "
alias dfry="d -y fr "
alias dpml="d pm-list "
alias dbmb="d bam-backup "
alias dbmr="d bam-restore "
alias dbmd="d bam-destinations "
alias dbms="d bam-sources "
alias dbmp="d bam-profiles "
alias dbmbs="d bam-backups "
alias dud="d updb "
alias mmk="echo ./_install_profiles/pc_drupal__make/make.make"
alias tmk="echo ./_install_profiles/pc_drupal__make/test.make"
function dsi(){
drush site-install $1 --account-name=admin --account-pass=$2 --db-url=mysql://root:password@localhost/$3 $*
}
alias dhelpersinstall='dlc -y devel,devel_themer,ctools,views,panels,admin_menu,admin_views,module_filter,fpa,coder'
alias dhelpersdendis='den -y devel,devel_generate,views_ui,field_ui,help,admin_menu_toolbar,coder,module_filter,fpa && dis -y overlay,toolbar'
alias dhelpersvar='dvs cache 0 && dvs page_compression 0 && dvs preprocess_css 0 && dvs preprocess_js 0'
#------------------------------------------------------------
# Symfony
alias sy="php symfony"
alias syc="php symfony cc"
alias sydb="php symfony doctrine:build --all --and-load"
alias sydgm="php symfony doctrine:generate-module"
alias syddd="php symfony doctrine:data-dump"
#------------------------------------------------------------
# Vagrant
alias v="ruby vagrant_run.rb "
alias vup="v up "
alias vdes="v destroy "
alias vsh="v ssh "
alias vhl="v halt "
alias vst="v status "
alias vprov="v provision "
alias vrel="v reload "
alias vsus="v suspend "
alias vres="v resume "
#------------------------------------------------------------
# Sass
alias compc="compass compile"
#------------------------------------------------------------
# CD Path Myplanet
alias dbdumps='cd /var/www/mpd/00_dbdumps'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment