-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaliases
68 lines (58 loc) · 1.88 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
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
# all-purpose aliases
alias h="cd ~"
alias c="clear"
alias hc="cd ~ && clear"
alias ll="eza --long --classify --header"
alias lla="eza --long --classify --header --all"
alias llt="eza --long --classify --header --tree"
alias ..="cd .."
alias ...="cd ../.."
alias cat="bat --paging=never"
alias dir_size="du -sh"
alias flush_cache="dscacheutil -flushcache"
alias tf="terraform"
alias com="git checkout master"
alias comp="git checkout master && git pull origin master"
# Terminal profiles
alias present="echo -e \"\033]50;SetProfile=Presentation\a\""
alias reset_profile="echo -e \"\033]50;SetProfile=Hotkey Window\a\""
# Docker/Docker Compose
alias dc="docker-compose"
# rails
alias gr="bundle exec rails routes | grep"
alias rs="bundle exec rails server"
alias rc="bundle exec rails console"
alias rg="bundle exec rails generate"
alias be="bundle exec"
# kubernetes
alias k="kubectl"
# BetterUp
alias bua="cd ~/sites/betterup-app"
alias bui="cd ~/sites/betterup-infrastructure"
alias bum="cd ~/sites/betterup-monolith"
alias bup="cd ~/sites/betterup-product"
function resetdb {
bundle exec rails db:environment:set RAILS_ENV=development
if [[ $1 == '-s' ]] || [[ $1 == '--simple' ]]; then
echo "$(tput setaf 2)> DB Reset (simple)$(tput sgr 0)"
bundle exec rails log:clear db:drop db:create db:schema:load
else
echo "$(tput setaf 2)> DB Reset$(tput sgr 0)"
bundle exec rails log:clear db:reset
fi
echo "$(tput setaf 2)> Preparing Test DB$(tput sgr 0)"
RAILS_ENV=test bundle exec rails db:drop db:create db:schema:load
bundle exec rails db:environment:set RAILS_ENV=development
}
# source: https://github.com/sgrj/fzf-functions
function delete-branches() {
git branch |
grep --invert-match '\*' |
cut -c 3- |
fzf --multi |
xargs git branch --delete --force
}
# BetterUp function to start new feature branch
startwork() {
git start --issue BUAPP-$1 BUAPP-$1/$2
}