-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
138 lines (123 loc) · 4.47 KB
/
.aliases
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#---------------------
# SYSTEM
#---------------------
alias lock='pmset displaysleepnow'
alias pub='cat ~/.ssh/id_rsa.pub'
alias projects='cd ~/code/projects'
alias packages='cd ~/code/packages'
alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy && echo 'Copied to clipboard.'" # Copy ssh key
alias ip='curl icanhazip.com'
alias l='natls -a'
alias chrome='open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security'
alias aliases='vim ~/dotfiles/.aliases'
alias load='source ~/dotfiles/.aliases'
alias c='code .'
alias s='subl .'
alias ns='npm start'
alias start='npm start'
alias nr='npm run'
alias run='npm run'
alias ll='exa --long --header --git' # List all files in current directory in long list format
alias o='open .' # Open the current directory in Finder
alias sm='php ~/code/projects/server-monitor/artisan'
alias v='vim'
alias hg='history | grep'
alias rick='echo "https://www.youtube.com/watch?v=dQw4w9WgXcQ" | pbcopy && echo "😎"'
alias qr='curl qrcode.show -d'
alias dotfiles='cd ~/dotfiles'
alias yt='youtube-dl -o "~/Movies/%(title)s.%(ext)s"'
db() {
open mysql://127.0.0.1/$1
}
weather() {
curl http://wttr.in/$1
}
alias magerun='cli-helpers db-magerun'
#---------------------
# Composer
#---------------------
alias composerm='phpm /usr/local/bin/composer'
alias cu='composerm update'
alias cc='composer config'
alias ci='composerm install'
alias cpm='composerm'
# ----------------------
# Git
# ----------------------
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add -A'
alias gr='git restore'
alias grs='git restore --staged'
alias gd='git diff'
alias gi='git init'
alias gl='git log'
alias gpu='git pull'
alias gss='git status -s'
alias gs='git status'
alias gc='git commit -m'
alias gp='git push'
alias gpf='git push -f'
alias gb='git branch'
alias gbl='git branch | tail'
alias gco='git checkout'
alias gsu='git stash -u'
alias gsp='git stash pop'
alias reset='git fetch --all && git reset --hard upstream/`git rev-parse --abbrev-ref HEAD` && git push origin `git rev-parse --abbrev-ref HEAD` -f && cpm install'
alias gpsu='git push --set-upstream origin `git rev-parse --abbrev-ref HEAD`'
alias wip='git commit -m "wip"'
alias amend='git commit --amend'
alias plog="git log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --branches"
alias gdt="git describe --tags"
gcot() {
git checkout --track origin/"$1"
}
# ----------------------
# Laravel
# ----------------------
alias pa='php artisan'
alias pat='clear && pa test'
alias patp='clear && php artisan test --parallel'
alias pu='clear && vendor/bin/phpunit'
alias puf='clear && pu --filter'
alias pam='php artisan migrate'
alias pamf='php artisan migrate:fresh'
alias pamfs='php artisan migrate:fresh --seed'
alias pamr='php artisan migrate:rollback'
alias pas='php artisan db:seed'
alias pacc='php artisan cache:clear'
alias paoc='php artisan optimize:clear'
alias sail='vendor/bin/sail'
alias sa='sail artisan'
# ----------------------
# PHP
# ----------------------
alias phpm='php -d memory_limit=-1'
alias pest='clear && ./vendor/bin/pest'
alias pestp='pest -p'
alias pec='clear && XDEBUG_MODE=coverage ./vendor/bin/pest --coverage'
alias pecp='pec -p'
alias puc='pu --coverage-html coverage'
pef() {
pest --filter=$@
}
# ----------------------
# Magento
# ----------------------
alias getmag-create='composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition'
alias mag='bin/magento'
alias msu='bin/magento setup:upgrade && mdc'
alias mcc='bin/magento cache:clean'
alias mcf='bin/magento cache:flush'
alias mdc='bin/magento cache:disable layout block_html full_page'
alias mca='bin/magento cache:flush && rm -rf generated/* var/cache/* var/page_cache/* var/view_preprocessed/*'
alias mii='bin/magento indexer:info'
alias mir='bin/magento indexer:reindex'
alias mauc='bin/magento admin:user:create'
alias madmin='bin/magento admin:user:create --admin-user=quinten --admin-password=quinten123 [email protected] --admin-firstname=Quinten --admin-lastname=Buis'
# ----------------------
# Akeneo
# ----------------------
alias akeneo='bin/console'
alias akeneo-refresh='rm -rf ./var/cache ./web/js ./web/css; akeneo --env=prod pim:installer:assets --symlink --clean; yarn run webpack'
alias ak-index='bin/console akeneo:elasticsearch:reset-indexes && bin/console pim:product-model:index --all && bin/console pim:product:index --all'