-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.functions
34 lines (29 loc) · 1.03 KB
/
.functions
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
#!/usr/bin/env bash
# Create a new directory and enter it
function mkd() {
mkdir -p "$@" && cd "$_";
}
pyclean () {
# Cleans py[cod] and __pychache__ dirs in the current tree:
find . | grep -E "(__pycache__|\.py[cod]$)" | xargs rm -rf
}
# From Dan Ryan's blog - http://danryan.co/using-antigen-for-zsh.html
man() {
# Shows pretty `man` page.
env \
LESS_TERMCAP_mb=$(printf "\e[1;31m") \
LESS_TERMCAP_md=$(printf "\e[1;31m") \
LESS_TERMCAP_me=$(printf "\e[0m") \
LESS_TERMCAP_se=$(printf "\e[0m") \
LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
LESS_TERMCAP_ue=$(printf "\e[0m") \
LESS_TERMCAP_us=$(printf "\e[1;32m") \
man "$@"
}
ec2claims() {
echo '===================='
echo 'Claims Instances:'
echo '===================='
aws --region us-east-1 ec2 describe-instances --filters 'Name=tag:Name,Values=prod-claims-*' --output text --query 'Reservations[].Instances[].[ [Tags[?Key==`Name`].Value][0][0],LaunchTime,PrivateIpAddress,InstanceId ]' | sort -n -k 2
}
goz() { ssh -F ~/.ssh/gozer ben.tlusty@$1 }