-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_aliases
71 lines (56 loc) · 1.9 KB
/
.bash_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
if [ -f ~/.bash_completion ]; then
. ~/.bash_completion
fi
alias nano='nano -c'
alias t='true'
alias g++11='g++ -O3 -W -Wall -std=c++11 -o myprog '
alias cv='if `which cv`; then watch -n0.02 cv -q; fi; if `which progress`; then watch -n0.02 progress -q; fi'
alias otp="watch -n0.1 $HOME/otp.sh"
function .. () {
cd ../"$1"
ls
}
complete -F _.. ..
alias pubip='dig +short myip.opendns.com @resolver1.opendns.com'
alias curl='curl -w "\n"'
alias tree='tree --dirsfirst'
alias review-apps='heroku apps -A | grep jeanjacque | cut -d " " -f1'
alias grep="grep -p"
function docker-cleanup() {
docker image prune -f --filter "until=24h"
docker container prune -f --filter "until=24h"
docker volume prune -f --filter "label!=keep"
docker network prune -f --filter "until=24h"
}
function docker-total-wipe() {
docker ps -q | xargs docker kill
docker ps -aq --filter status=exited | xargs docker rm
docker images -q --filter dangling=true | xargs docker rmi
}
alias nodemon='ee npm run nodemon'
function load_dotenv () {
env=${DOTENV:-development}
env_vars="$(cat .env 2> /dev/null) $(cat ".env.${env}" 2> /dev/null)"
echo $env_vars
}
function ee () {
eval $(load_dotenv) eval "$@"
}
function ec2 () {
if [ $# -eq 0 ]; then
aws ec2 describe-instances | jq -r '.Reservations[].Instances[].NetworkInterfaces[].PrivateDnsName'
else
aws ec2 describe-instances --filters "Name=tag:Name,Values=*$1*" | jq -r '.Reservations[].Instances[].NetworkInterfaces[].PrivateDnsName'
fi
}
function c () {
ruby -e "puts $*"
}
alias dc='docker-compose --env-file /dev/null'
alias dcr='dc down && dc up -d && dc logs -f'
alias jc='docker-compose exec jeancaisse'
alias jr='docker-compose exec jeanratus'
alias wds='bundle && yarn && bin/webpack-dev-server'
alias tf='AWS_PROFILE=admin terraform'
alias diff="diff -y --suppress-common-lines"
alias random-dev="find lib/nomenclatures/engineers/ -type f | shuf -n 1"