-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbash_aliases
More file actions
executable file
·97 lines (85 loc) · 2.34 KB
/
bash_aliases
File metadata and controls
executable file
·97 lines (85 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
## Unix/Linux
alias ll='ls -alFh'
alias la='ls -A'
alias l='ls -CF'
alias getpath='echo $(pwd)'
alias nkey="ssh-keygen -t rsa"
## Ubuntu
alias clean-all="sudo apt autoremove -y && sudo apt autoclean -y"
alias uuu="sudo apt update && sudo apt upgrade -y && sudo apt full-upgrade && clean-all"
## Directory Location
pp="/home/$USER/Projects/php/"
flp="/home/$USER/Projects/php/fl"
##Apache
#alias afp="go"
#function go ()
#{
# if [ "$(getpath)" = "$HOME" ]; then
# echo "You are in: $(getpath), Action terminated !!!"
# return 0;
# fi
#
# echo "Your in: $(getpath), change permision? [Yes/No]:No"
# read action
#
# if [ "$action" != "${action#[Yes]}" ]; then
# find $(getpath) -print0 | sudo xargs -0 chown -R www-data:$USER
# find $(getpath) -type d -print0 | sudo xargs -0 chmod 0775
# find $(getpath) -type f -print0 | sudo xargs -0 chmod 0664
# else
# echo "Action terminated !!!"
# fi
#}
git_status_filter() {
local keyword="$1"
git status --short | awk '{print $2}' | grep -i "$keyword"
}
alias gsf="git_status_filter"
## Git
alias gi='git init'
alias gs='git status'
alias ga='git add'
alias gaa='git add -A'
alias gan='git add $(git ls-files -o --exclude-standard)'
alias gau='git add $(git diff --name-only)'
alias gc='git commit -m'
alias gpl='git pull origin $(git rev-parse --abbrev-ref HEAD)'
alias gps='git push origin $(git rev-parse --abbrev-ref HEAD)'
alias gplm='gpl origin master'
alias gpsm='gps origin master'
alias gpld='gpl origin develop'
alias gpsd='gps origin develop'
alias gl='git log'
alias gst='git show-ref --tag'
alias gtc='git rev-list -n 1 --abbrev-commit '
alias gpp='gpl && gps'
alias gppm='gplm && gpsm'
alias gppd='gpld && gpsd'
alias gss="git status --short | grep '^\w.'"
## Composer
alias c='composer'
alias ci='c install'
alias cup='c update'
alias cr='c require'
alias cdal='c dump-autoload'
## Laravel
alias lc='php artisan'
alias lrl='lc route:list'
alias lmg='lc migrate'
alias lopt='lc optimize'
alias lcc='lc clear-compiled'
##Python
alias py='python3'
##Django
alias dj='py manage.py'
alias dja='django-admin'
##PHPUnit
alias punit='phpunit_cmd'
alias pucon='punit --generate-configuration'
alias puf='punit --filter '
alias ut='punit'
alias utf='puf'
##Docker
alias dsa='docker ps -q | xargs --no-run-if-empty docker stop'
alias dce='docker compose exec -it'
alias dcea='docker compose exec -it app bash'