guest@dotshare [~/groups/shells/bash] $ ls bashrc-n61/ | cat

.bashrc n61 (+1 likes)

nc Jul 13, 2011 (shells/bash)

.bashrc(raw, dl)

 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
. /home/nc/.aliasrc

complete -cf sudo
complete -cf man

# Bash completion
set show-all-if-ambiguous on

# Check for an interactive session

[ -z "$PS1" ] && return

#colorize prompt
#PS1='[\u@\h \W]\$ '
export PS1='\[\033[0;32m\]\u@\h \W\$ \[\033[0;38m\]'

# proxy uminho
# receives 1 parameter: 0 or 1 (off or on)
function proxy_um {
  if [ "$1" = 0 ]; then
    echo "Proxy OFF"
    http_proxy=""
    socks_proxy=""
  elif [ "$1" = 1 ]; then
      echo "Proxy ON"
      http_proxy="http://proxy.uminho.pt:3128"
      socks_proxy="http://socks.uminho.pt:1080"
  else
    echo "You have to pass on integer argument: 0 (off) or 1 (on)"
  fi
  export http_proxy=$http_proxy
  export https_proxy=$http_proxy
  export socks_proxy=$socks_proxy
  export SOCKS_SERVER=$socks_proxy
  export ftp_proxy=$http_proxy
  export all_proxy=$http_proxy
}

#java
#export "_JAVA_AWT_WM_NONREPARENTING=1"
#export _JAVA_OPTIONS="-Dswing.aatext=true"
#export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
#export _JAVA_OPTIONS="-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"

export MOZ_DISABLE_PANGO=1

# for xdg shit
export BROWSER='chromium'
export browser='chromium'

export EDITOR='vim'

# for flipped webcam
# export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
# man colors
man() {
			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 "$@"
}

CLICK TO VIEW

x

.aliasrc(raw, dl)

 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
alias TODO='vim /home/nc/.xnots/TODO'
alias UNIV='vim /home/nc/.xnots/UNIV'

alias mpd='mpd /home/nc/.mpd/mpd.conf && echo "Dont forget mpdscribble!!!"'

alias ls='ls --color=auto'

alias xcomp='killall xcompmgr && xcompmgr -c -t-5 -l-5 -r4.2 -o1 -CcfFn -D4 &'
alias rm='rm -i -v'
alias cp='cp -i -v'
alias mv='mv -i -v'

alias sudo="sudo -E"
alias tarbz2="tar jxf"
alias targz="tar xzvf"
alias tarbz="tar -xjf"
alias bz2="bunzip2"
#alias rar="unrar x"
alias tar_normal="tar xvf"
alias tbz2="tar jxvf"
alias tgz="tar xzf"
#alias zip="tar zxf"

alias grep='grep --color=auto'
alias ls='ls --color=auto'

alias dmenu_run='dmenu_run -fn '-*-terminus-medium-r-*-*-12-*-*-*-*-*-*-*''

# ssh
alias ipodSendIpa='echo "scp apppath root@i74:/private/var/mobile/Documents/Installous/Downloads"'
alias ipod='ssh root@i74' # pw: alpine
alias ipodPhotos='echo "/private/var/mobile/Media/DCIM/100APPLE"'
alias eeepcPASSPHRASE='echo "C6AE6066422BA65886ED9AE9E519AF0F220CB7B1FC4BCAA712B8321BC41EB1C9"'
alias eeepcLAN='ssh -p 74 nc@eeepc-74'
alias eeepcLANX='ssh -Y -p 74 nc@eeepc-74'
alias eeepcWIFI='ssh -p 74 nc@74.dyndns.info'
alias eeepcWIFIX='ssh -Y -p 74 nc@74.dyndns.info'

# lan
alias wirelessMap='echo -e "Range 192.168.1.1-255" && nmap -sP 192.168.1.1-255'
# ntfs-3g
alias ntfs-mount='echo "mount -t ntfs-3g etc"'

# xinit
alias xinit='xinit -nolisten tcp'

# sicstus
alias sicstus='rlwrap sicstus'

alias dmenu_run='dmenu_run -fn "-*-terminus-medium-r-*-*-12-*-*-*-*-*-*-*" -p "Execute:"'

alias rsync='rsync -v'
 

x

.bash_profile(raw, dl)

1
2
3
4
5
6
. $HOME/.bashrc
PATH=$PATH:/home/nc/.scripts/
PATH=$PATH:/opt/sicstus4.1.1/bin/
export PATH
HISTSIZE=1000
HISTFILESIZE=450
 

x

Notes

  • exports are in .bashrc
  • .aliasrc for aliases
  • $PATH is in .bash_profile