-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases
24 lines (18 loc) · 1.52 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
#use gls with colors (coreutils)
alias ls="gls --color=always"
#lsa show all
alias lsa='ls -A'
#docker alias: mongodb (FYI: create the mongodata volume first)
alias dockerme-mongo-server='docker run --name mongodb -it --rm -v mongodata:/data/db -p 27017:27017 mongo'
alias dockerme-mongo-client="docker run -it --link mongodb:mongo --rm mongo sh -c 'exec mongosh \"\$MONGO_PORT_27017_TCP_ADDR:\$MONGO_PORT_27017_TCP_PORT\"'"
#docker alias: mysql (FYI: create the mysqldata volume first)
alias dockerme-mysql-server='docker run --name mysqldb -it --rm -v mysqldata:/var/lib/mysql -p 3306:3306 -e MYSQL_ENV_MYSQL_ROOT_PASSWORD=password mysql'
alias dockerme-mysql-client="docker run -it --link mysqldb:mysql --rm mysql sh -c 'exec mysql -hmysql -P3306 -uroot -ppassword'"
#docker alias: postgres (FYI: create the pgdata volume first)
alias dockerme-postgres-server='docker run --name postgresdb -it --rm -v pgdata:/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres:12.4'
alias dockerme-postgres-client="docker run -it --rm --link postgresdb:postgres --rm -e PGPASSWORD=mysecretpassword postgres:12.4 psql -h postgres -U postgres"
#docker alias: redis (FYI: create the redisdata volume first)
alias dockerme-redis-server='docker run --name redisdb -it --rm -v redisdata:/data -p 6379:6379 redis'
alias dockerme-redis-client="docker run -it --link redisdb:redis --rm redis sh -c 'exec redis-cli -h redis'"
#new tmux session named as the current directory
alias tmuxme='tmux new -s $(echo ${PWD##*/} | sed "s/[_\.]/-/g")'