-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
83 lines (68 loc) · 2.86 KB
/
.bashrc
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
72
73
74
75
76
77
78
79
80
81
82
83
source /home/cs/dotfiles/source_bash_files.sh
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# aliases
alias ..='cd ../'
alias ...='cd ../../'
alias ....='cd ../../../'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -alF'
alias ls='ls --color=auto'
alias vi='vim'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
alias black='black --line-length=120'
alias pip='pip3'
alias python='python3'
alias nvim='~/.local/bin/nvim'
alias tmux='TERM=xterm-256color tmux'
alias sshfix='eval $(ssh-agent);ssh-add'
alias gd='git diff'
alias gds='git diff --staged'
alias gs='git status'
alias ga='git add'
alias gr='git restore'
alias grs='git restore --staged'
alias gcm='git commit -m'
alias gc='git commit'
alias gbdates='git for-each-ref --sort=committerdate refs/heads/ --format="%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:short)%(color:reset))"'
alias gco='git checkout'
alias gca='git commit --amend --no-edit --date=now'
alias pkgList='apt-mark showmanual > package.list'
alias pktInstallList='apt-mark showmanual > package.list'
alias kt='kafka-topics.sh --bootstrap-server localhost:9092'
alias kt_delete='kafka-topics.sh --bootstrap-server localhost:9092 --delete --topic'
alias kt_create='kafka-topics.sh --bootstrap-server localhost:9092 --create --partitions 3 --topic'
alias kt_list='kafka-topics.sh --bootstrap-server localhost:9092 --list'
alias kc='kafka-consumer-groups.sh --bootstrap-server localhost:9092'
alias kc_list='kafka-consumer-groups.sh --bootstrap-server localhost:9092 --list'
alias kc_describe='kafka-consumer-groups.sh --bootstrap-server localhost:9092 --describe --group'
alias kc_delete='kafka-consumer-groups.sh --bootstrap-server localhost:9092 --delete --group'
alias kudu_listTables='kudu table list localhost'
alias kudu_deleteTable='kudu table delete localhost'
# config
export EDITOR=vim
export PSQL_EDITOR=vim
export CC=clag
export CXX=clang++
export PYTHONBREAKPOINT='IPython.core.debugger.set_trace'
export LOGLEVEL='debug'
export PS1='\[\e[0;32m\][ $? \[\e[0;33m\]\t \[\e[0;32m\]\u \[\e[0;33m\]\w \[\e[0;32m\]] \$ \[\e[0m\]'
source ~/dotfiles/git-completion.bash
if [ -f ~/dotfiles/pytest_complete ]; then
. ~/dotfiles/pytest_complete || true
fi
# functions
function optimizeGit(){
git fsck
git gc
git prune
echo "git optimized"
}
function sendf() {
echo stuff | nail -a $1 -s files clintonsteiner@gmail.com
}
ff () { find . -name "*$1*" -ls ;}
# PS1
export PS1='\e[48;5;69m\][\[\e[38;5;255m\]\u\[\e[39m\]@\[\e[4m\]\h\[\e[24m\]]\[\e[38;5;232;48;5;114m\]$( git branch 2>/dev/null | grep '"'"'*'"'"' | colrm 1 2)\[\e[0;48;5;202m\] \w \[\e[0m\]\[$(tput sc; printf "%*s" $((COLUMNS - 40)) "$(date "+%I:%M %p %m/%d")"; tput rc)\[\e[48;5;62m\]\]\[\e[0m\]\n $: '