forked from startup-class/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc_custom
117 lines (91 loc) · 3.58 KB
/
.bashrc_custom
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
## *Please note that if using this ppa I would *not* try upgrading to 14.10/15.04, ect. Do a fresh install instead. The intent here is just for users wishing to stay on 14.04*
## If upgrading releases anyway use ppa-purge *First* -
## sudo ppa-purge ppa:mc3man/trusty-media
###################
## aliases ########
###################
##application
alias sl='ls'
alias ls='ls --color=auto -h --group-directories-first -t -r'
alias src='source $HOME/.bashrc_custom'
alias jdk8='sudo update-java-alternatives -s java-8-oracle'
alias jdk7='sudo update-java-alternatives -s java-7-oracle'
alias idea='/home/yuechuan/Application/idea/bin/idea.sh'
alias vpn='~/Application/anyconnect-4.1.00028/vpn/vpnui &'
alias folder='nautilus . &'
alias rs='redshift -O'
alias jar='java -jar'
alias em='emacs -nw' # No X11 windows
alias eqq='emacs -nw -Q' # No config and no X11
alias unblockbt='sudo rfkill unblock bluetooth'
alias scan_bt='hcitool scan'
alias connect_keyboard='sudo bluez-simple-agent hci0 7C:1E:52:08:BA:D1'
##ssh
alias school='sshpass -p "rNA8si4J" ssh -o StrictHostKeyChecking=no [email protected]'
alias gf='sshpass -p"Ab1*abcde12" ssh -o StrictHostKeyChecking=no [email protected]'
alias vm='ssh [email protected]'
alias mntWorkDrive='sudo umount -l /mnt/work & sudo sshfs -o allow_other [email protected]:/var/www/loris/ /mnt/work'
alias work='sshpass -p "cyc93826" ssh -o StrictHostKeyChecking=no [email protected] -YC'
alias workr='sshpass -p "cyc93826" ssh -o StrictHostKeyChecking=no [email protected] -YCt tmux attach -t default'
##directories
alias home='cd $HOME'
alias application='cd $HOME/Application/'
alias dotfile='cd ~/dotfiles'
alias gbranch="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"
alias srcrc="source ~/.bashrc_custom && cd $OLDPWD && echo 'bashrc sourced'"
alias gcmb="git checkout master && git checkout -b "
alias gdiff='git diff'
#mcgill anyConnect vpn
alias vpn='~/Application/anyconnect-4.1.00028/vpn/vpnui &'
###################
## PATH VAR #######
###################
#set up node js
export NODE_PATH="/usr/bin/nodejs"
#set up scala
export SCALA_HOME="/home/yuechuan/Application/scala-2.11.1"
#set up sbt
PATH=$PATH:/home/yuechuan/Application/sbt/bin
#set up node webkit
PATH=$PATH:/home/yuechuan/Application/nwjs
#add application folder to path
PATH=$PATH:/home/yuechuan/Application
#android stuff
PATH=$PATH:/home/yuechuan/Application/android-sdk-linux/tools
PATH=$PATH:/home/yuechuan/Application/android-sdk-linux/platform-tools
#mysql
PATH=$PATH:/home/yuechuan/Application/mysql-5.6.26-linux-glibc2.5-x86_64/bin
#set up lang var
export LANG="en_CA.UTF-8"
export LC_ALL="en_CA.UTF-8"
PATH=$PATH:~/dotfiles/bin
############################
##additional functionalities
############################
#set up quick bashrc
function bashrc {
em ~/.bashrc_custom
source ~/.bashrc_custom
cd $OLDPWD
}
function webscrap {
wget \
--recursive \
--no-clobber \
--page-requisites \
--accept $2 \
--convert-links \
--restrict-file-names=windows \
--no-parent \
$1
}
# quickly append expressions to bashrc.
function quickrc {
if [ "$#" -ne 1 ]; then
echo "One expression is needed as argument to be concatinated to .bashrc_custom"
else
echo "$1" >> ~/.bashrc_custom
source ~/.bashrc_custom
cd $OLDPWD
fi
}