-
Notifications
You must be signed in to change notification settings - Fork 1
/
.zprofile
51 lines (40 loc) · 1.47 KB
/
.zprofile
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
eval "$(/opt/homebrew/bin/brew shellenv)"
# Added by OrbStack: command-line tools and integration
source ~/.orbstack/shell/init.zsh 2>/dev/null || :
alias flush-dns="sudo killall -HUP mDNSResponder"
alias tv-aws="export AWS_PROFILE=truevault"
alias boom="npx npkill"
aws-ssh() {
aws ssm start-session --target $1 --profile $2
}
# Describes AWS instances
describe-instances(){
aws --version
which aws
[ -z "$1" ] && DI_PROFILE="" || DI_PROFILE="$1"
[ -z "$2" ] && DI_REGION="" || DI_REGION=" --region $2"
aws ec2 describe-instances --profile $1 --filters 'Name=instance-state-name,Values=running' --query 'Reservations[].Instances[].[PublicIpAddress,PrivateIpAddress,InstanceId,Tags[?Key==`Name`].Value[]||[`--`]]' --output text | sed '$!N;s/\n/ /' | column -t -s $'\t'
}
d-logs() {
docker-compose logs web --tail=100 -f $1
}
d-up() {
docker-compose up -d $1
}
d-down() {
docker-compose down $1
}
d-up-logs() {
docker-compose up -d && docker-compose logs web --tail=100 -f $1
}
d-restart-logs() {
docker-compose restart web && docker-compose logs web --tail=100 -f $1
}
dc() {
docker-compose
}
alias di="describe-instances"
alias pp="pnpm"
alias kgp='kubectl get po -o custom-columns="Name:metadata.name,CPU-limit:spec.containers[*].resources.limits.cpu, CPU-request:spec.containers[*].resources.requests.cpu, memory-limits:spec.containers[*].resources.limits.memory, memory-request:spec.containers[*].resources.requests.memory"'
alias tf="terraform"
alias nv="nvim"