diff options
| author | Kapil Viren Ahuja <k.v.ahuja@gmail.com> | 2017-02-10 14:54:24 +0530 |
|---|---|---|
| committer | Kapil Viren Ahuja <k.v.ahuja@gmail.com> | 2017-02-10 14:54:24 +0530 |
| commit | 93e44e57fbbb86df7a03c6d9ecfa751fb22342a1 (patch) | |
| tree | 526824b4f6571519bb55c8a8c090fee90e2aeab0 /workspace/aliases.sh | |
| parent | 69868a6899c09e13da52a2675349ccbab2858995 (diff) | |
| download | vaindock-93e44e57fbbb86df7a03c6d9ecfa751fb22342a1.tar.gz vaindock-93e44e57fbbb86df7a03c6d9ecfa751fb22342a1.zip | |
works for:
- vainsocial.com
- pg for web
- pg for raw
- pgAdmin
Diffstat (limited to 'workspace/aliases.sh')
| -rw-r--r-- | workspace/aliases.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/workspace/aliases.sh b/workspace/aliases.sh new file mode 100644 index 0000000..f3e2a2c --- /dev/null +++ b/workspace/aliases.sh @@ -0,0 +1,71 @@ +#! /bin/bash + +# Colors used for status updates +ESC_SEQ="\x1b[" +COL_RESET=$ESC_SEQ"39;49;00m" +COL_RED=$ESC_SEQ"31;01m" +COL_GREEN=$ESC_SEQ"32;01m" +COL_YELLOW=$ESC_SEQ"33;01m" +COL_BLUE=$ESC_SEQ"34;01m" +COL_MAGENTA=$ESC_SEQ"35;01m" +COL_CYAN=$ESC_SEQ"36;01m" + +# Commonly Used Aliases +alias ..="cd .." +alias c="clear" +alias cla="clear && ls -l" +alias cll="clear && ls -la" +alias cls="clear && ls" +alias code="cd /var/www" +alias ea="vi ~/aliases" +alias g="gulp" +alias home="cd ~" +alias npm-global="npm list -g --depth 0" +alias ra="reload" +alias reload="source ~/.aliases && echo \"$COL_GREEN ==> Aliases Reloaded... $COL_RESET \n \"" +alias run="npm run" +alias tree="xtree" + +# Laravel / PHP Alisases +alias art="php artisan" +alias artisan="php artisan" +alias cdump="composer dump-autoload -o" +alias composer:dump="composer dump-autoload -o" +alias db:reset="php artisan migrate:reset && php artisan migrate --seed" +alias migrate="php artisan migrate" +alias seed="php artisan:seed" +alias phpunit="./vendor/bin/phpunit" + + +# requires installation of 'https://www.npmjs.com/package/npms-cli' +alias npms="npms search" + +# requires installation of 'https://www.npmjs.com/package/package-menu-cli' +alias pm="package-menu" + +# requires installation of 'https://www.npmjs.com/package/pkg-version-cli' +alias pv="package-version" + +# requires installation of 'https://github.com/sindresorhus/latest-version-cli' +alias lv="latest-version" + +# git aliases +alias gaa="git add ." +alias gd="git --no-pager diff" +alias git-revert="git reset --hard && git clean -df" +alias gs="git status" +alias whoops="git reset --hard && git clean -df" + + +# Create a new directory and enter it +function mkd() { + mkdir -p "$@" && cd "$@" +} + +function md() { + mkdir -p "$@" && cd "$@" +} + +function xtree { + find ${1:-.} -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' +} |
