forked from FreekingDean/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zsh_aliases
71 lines (61 loc) · 2.67 KB
/
zsh_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
alias rspec='rspec --color'
alias gclone='ruby $HOME/.dotfiles/helper_scripts/gclone.rb'
alias sfclone='sh $HOME/.dotfiles/helper_scripts/sfclone.sh'
alias asshole='ruby $HOME/.dotfiles/helper_scripts/asshole.rb'
alias fuck='$(thefuck $(fc -ln -1))'
alias irssi="TERM=screen-256color irssi" #fix for the xterm fix above with xfce4term and irssi buffer
alias trash="mv --target-directory=$HOME/.Trash"
alias update_dev_env="$HOME/.dotfiles/helper_scripts/dev_env_update.sh"
alias be="bundle exec"
alias pcat='pygmentize -g'
alias gitrm='sh $HOME/.dotfiles/helper_scripts/git_rm.sh'
alias rake='noglob rake'
alias update_gemfury='/usr/bin/ruby $HOME/.dotfiles/helper_scripts/update_gemfury_token.rb'
alias vim='nvim'
alias vi='nvim'
alias grep="grep --exclude-dir=.git --exclude-dir=coverage --exclude-dir=tmp --exclude-dir=vendor --color=auto"
alias ralias="source ~/.zsh_aliases"
alias refresh="source ~/.zshrc"
alias git='hub'
alias kctl='kubectl'
alias skctl='KUBECONFIG=~/.kube/config-server kubectl --insecure-skip-tls-verify'
#alias rails='bundle exec rails'
# aws ()
# {
# export AWS_SESSION_TOKEN=$(ruby $HOME/.dotfiles/helper_scripts/set_aws.rb)
# }
alias awsprod="AWS_REGION=us-east-1 AWS_PROFILE=sfprod aws"
alias awsinfra="AWS_PROFILE=sfinfra aws"
alias awsstage="AWS_PROFILE=sfstage aws"
bindkey '^R' history-incremental-pattern-search-backward
bindkey '^S' history-incremental-pattern-search-forward
ftfc ()
{
sudo killall VDCAssistant;
sudo killall AppleCameraAssistant
}
ftfk()
{
sudo killall -7 karabiner_grabber
sudo killall -7 karabiner_observer
sudo killall -7 karabiner_console_user_server
sudo killall -7 Karabiner-Menu
sudo killall -7 Karabiner-NotificationWindow
sudo killall -7 karabiner_kextd
sudo killall -7 karabiner_session_monitor
}
sshinfra() {
ssh $(AWS_PROFILE=sfinfra aws ec2 describe-instances --region us-east-1 --filters Name=tag:Name,Values=tf-ecs-main Name=instance-state-name,Values=running --query 'Reservations[0].Instances[0].PrivateIpAddress' --output text)
}
sshprod() {
ssh $(AWS_PROFILE=sfprod aws ec2 describe-instances --region us-east-1 --filters Name=tag:Name,Values=ecs-production-on_demand Name=instance-state-name,Values=running --query 'Reservations[0].Instances[0].PrivateIpAddress' --output text)
}
sshstage() {
ssh $(AWS_PROFILE=sfstage aws ec2 describe-instances --region us-east-1 --filters Name=tag:Name,Values=tf-ecs-main Name=instance-state-name,Values=running --query 'Reservations[0].Instances[0].PrivateIpAddress' --output text)
}
forake() {
fixops run -a fixops-service -e i \"fixops-ssm-env fixops-service bundle exec rake $1\"
}
k8srestart() {
kubectl scale --replicas=0 deployment/$1 && kubectl scale --replicas=1 deployment/$1
}