-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_aliases
170 lines (157 loc) · 4.29 KB
/
.bash_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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
IMAG="[email protected]"
GIT="[email protected]"
ALIASES="/home/william/.bash_aliases"
GITHUB_CONF="~/gitHub/linux_config/"
WEBPROLAN="176.189.75.243"
SHINRAY="[email protected]"
export PATH=$HOME/programmation/Projet_GL/Projet/src/main/bin:$PATH
export PATH=$HOME/programmation/Projet_GL/global/bin:$PATH
export PS1='\[\e[32;1m\]\u\[\e[34;1m\]@\[\e[36;1m\]\H \[\e[34;1m\]\w\[\e[32;1m\] $ \[\e[0m\]'
function save_config() {
here=`pwd`
cd ~/gitHub/linux_config
bak $ALIASES
cp $ALIASES .
git add .bash_aliases
git commit -m "New aliases"
git pull
git push
cd $here
}
function col {
first="awk '{print "
last="}'"
cmd="${first}\$${1}${last}"
eval $cmd
}
function addalias {
echo -n alias $1 >> $ALIASES
shift
echo =\"$@\" >> $ALIASES
source ~/.bash_aliases
}
function synpad {
synclient TapButton2=$1 &&
synclient TapButton3=$1 &&
synclient VertTwoFingerScroll=$1 &&
synclient HorizTwoFingerScroll=$1 &&
synclient ClickFinger2=$1 &&
synclient ClickFinger3=$1
}
function synpadPartiel {
synclient TapButton3=$1 &&
synclient ClickFinger3=$1
}
function bak {
target=${1%/}
bak=$target.bak
rm -rf $bak 2> /dev/null
cp -r $target $bak
}
function schemaupdate {
php app/console doctrine:schema:update --dump-sql &&
echo &&
read -p "Update schema ? " -n 1 -r
echo
if [[ $REPLY =~ ^[YyOo]$ ]]
then
php app/console doctrine:schema:update --force
else
if [ -z $REPLY ]
then
php app/console doctrine:schema:update --force
fi
fi
}
function update_github_conf() {
cp /etc/X11/xorg.conf.d/50-synaptics.conf $GITHUB_CONF &&
cp ~/.config/touchegg/touchegg.conf $GITHUB_CONF &&
cp ~/.config/touchpad-settings.sh $GITHUB_CONF &&
cp ~/.bash_aliases $GITHUB_CONF &&
cp /home/william/.vimrc $GITHUB_CONF;
}
function mail() {
if [[ $# -lt 3 ]]; then
echo "1 : destinataire"
echo "2 : sujet"
echo "3 : message"
echo "4 : piece jointe"
return
fi
echo $3 | mutt -a "$4" -s "$2" -- $1
}
function slay() {
tokill=`pgrep $1`
kill -9 $tokill
}
alias geditaliases="gedit $ALIASES"
alias ff="firefox& 2> /dev/null"
alias l="ls"
alias gm="gnatmake"
alias xx="exit"
alias tarcomp="tar -czvf"
alias tardecomp="tar -xzvf"
alias commit="git commit -am"
alias pull="git pull"
alias push="git push"
alias add="git add"
alias ll="ls -lh"
alias la="ls -a"
alias lla="ls -la"
alias agi="sudo apt-get install"
alias reboot="sudo shutdown -r now"
alias tux="tuxguitar"
alias xmax="xbacklight =99"
alias dualscreen="xrandr --output VGA1 --pos 1024x0 --mode 1680x1050 --rate 60"
alias singlescreen="xrandr --fb 1024x600"
alias vimaliases="vim ~/.bash_aliases"
alias vimalias="vim ~/.bash_aliases"
alias sourcealias="source ~/.bash_aliases"
alias sourcealiases="source ~/.bash_aliases"
alias apache_restart="sudo /etc/init.d/apache2 restart"
alias phpconsole="php app/console"
alias asseticdump="phpconsole assetic:dump --env=prod --no-debug"
alias chmodrec="sudo chmod -R a+rw ."
alias getcomposer="curl -sS https://getcomposer.org/installer"
alias cdwebprolan="cd /var/www/webprolan"
alias untracked="git ls-files --others --exclude-standard"
alias fixturesload="php app/console doctrine:fixtures:load"
alias netbeans="/usr/local/bin/netbeans.sh"
alias nethogs="sudo nethogs wlan0"
alias gp6="/opt/GuitarPro6/launcher.sh"
alias gp="gp6"
alias guitarpro="gp6"
alias sudo="sudo "
alias agud="sudo apt-get update"
alias agug="sudo apt-get upgrade"
alias aguu="agupd agupg"
alias hscroll0="synclient HorizTwoFingerScroll=0"
alias hscroll1="synclient HorizTwoFingerScroll=1"
alias tex="texmaker"
alias cim="vim"
alias apt-get="sudo apt-get"
alias intellij="/usr/local/bin/intellij.sh"
alias itj="intellij"
alias phpstorm="/usr/local/bin/phpstorm.sh"
alias phps="phpstorm"
alias pse="ps -e"
alias ftp_restart="sudo service vsftpd restart"
alias agr="sudo apt-get remove"
alias agar="sudo apt-get autoremove"
alias qwerty="setxkbmap fr"
alias azerty="setxkbmap us"
alias vimapache="sudo vim /etc/apache2/sites-available/000-default.conf"
alias df="df -h"
alias cdd="pushd"
alias cdr="popd"
alias cd..=".."
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias setroot="root=/home/william"
alias cdroot="cd /home/william"
alias mkdir="mkdir -p"
alias find.="find . -name"
alias findroot="find / -name"
alias gRep="grep -R"
alias rmr="rm -r"