-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
39 lines (30 loc) · 960 Bytes
/
.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
# ------
# General
# ------
alias update='sudo apt update && sudo apt upgrade && sudo gem update fusuma'
alias greph='history | grep $1'
alias list-gpg-keys='gpg --list-secret-keys --keyid-format=long'
# ------
# Git
# ------
# Remove all local branches except "master", "main" and "develop"
# /!\ Useful but risky as it can remove branches not yet pushed to remote
alias git-clean='git branch | grep -v "master" | grep -v "main" | grep -v "develop" | xargs git branch -D'
# ------
# Docker
# ------
alias docker-compose='docker compose'
alias dc='docker compose'
alias dce='dc exec'
alias docker-container-ip='docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1'
alias docker-stop-all='docker stop $(docker ps -q)'
alias docker-kill-all='docker kill $(docker ps -q)'
# ------
# PHP
# ------
alias switch-php='sudo update-alternatives --config php'
# ------
# Symfony
# ------
alias sf='symfony'
alias sfc='symfony console'