-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc-old
38 lines (35 loc) · 1.64 KB
/
.bashrc-old
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
##
# deprecated crap
##
#genpasswd() {
# local l=$1
# [ "$l" == "" ] && l=20
# tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
#}
#command_exists() {
# type "$1" &> /dev/null
#}
#alias echoempty='for file in * ; do if [ `cat $file | wc -l` -lt 3 ]; then echo $file; fi; done;'
#alias rmempty='for file in * ; do if [ `cat $file | wc -l` -lt 3 ]; then rm $file; fi; done;'
#alias csweather="weather -i KCLL; echo ---------; weather -c 'College Station' -s TX -f"
#alias rntv='for i in *.avi; do mv $i "$( echo $i | sed -e 's/\.[hH][dD][tT][vV].*$//' -e 's/\./ /g' -e 's/$/.avi/')"; done'
#alias refusedip="zgrep refused /var/log/auth.log* | awk '{print $NF}' | sed 's,[()],,g' | sort | uniq -c | sort -g"
#PS1='[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] \u@\[\]\w\[${c_sgr0}\]: '
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#PS1='[\[$(branch_color)\]$(parse_git_branch)\[${c_sgr0}\]] ${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# if [ -n `which md5sum` ]; then
# md5="md5sum"
# elif [ -n `which md5` ]; then
# md5="md5"
# fi
# if [ -n $md5 ]; then
# hosthash=$(hostname | $md5 | sed 's/[^0-9]//g')
# userhash=$(whoami | $md5 | sed 's/[^0-9]//g')
# let "hostcolor = ${hosthash:0:4} % 7 + 30"
# let "usercolor = ${userhash:0:4} % 7 + 30"
# HOSTCLR="01;${hostcolor}m"
# USERCLR="01;${usercolor}m"
# unset hosthash hostcolor userhash usercolor
# fi
#PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[$USERCLR\]\u\[\033[00m\]@\[\033[$HOSTCLR\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# alt+shift+[