Mettre à jour 'mybashrc'
This commit is contained in:
parent
781f6228af
commit
a2f1df9d2e
101
mybashrc
101
mybashrc
|
@ -1,9 +1,15 @@
|
|||
|
||||
# FUNCTIONS
|
||||
|
||||
mynginxconf() {
|
||||
|
||||
nano /etc/nginx/sites-available/$1
|
||||
|
||||
}
|
||||
|
||||
transfer_vtbox_net() {
|
||||
curl --progress-bar --upload-file $1 https://transfer.vtbox.net/$(basename $1) | tee /dev/null
|
||||
}
|
||||
alias transfer=transfer_vtbox_net
|
||||
alias cheat='cht.sh'
|
||||
alias pull='git pull'
|
||||
|
||||
git_commit() {
|
||||
git add .
|
||||
|
@ -14,8 +20,6 @@ git_push() {
|
|||
git fetch
|
||||
git push
|
||||
}
|
||||
alias commit=git_commit
|
||||
alias push=git_push
|
||||
|
||||
compress_pigz() {
|
||||
tar -I pigz -cvf $1.tar.gz $1
|
||||
|
@ -30,35 +34,6 @@ update_git_mybashrc() {
|
|||
source $HOME/.bashrc
|
||||
}
|
||||
|
||||
alias wp='wp --allow-root'
|
||||
alias gzip=compress_pigz
|
||||
alias gunzip=decompress_pigz
|
||||
alias mybashrc_update=update_git_mybashrc
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alhF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
alias lh="stat -c '%A %a %n'"
|
||||
|
||||
mynginxconf() {
|
||||
|
||||
nano /etc/nginx/sites-available/$1
|
||||
|
||||
}
|
||||
alias nginxconf=mynginxconf
|
||||
|
||||
MAINTENANCE_APT() {
|
||||
|
||||
# Colors
|
||||
|
@ -122,9 +97,63 @@ MAINTENANCE_APT() {
|
|||
|
||||
}
|
||||
|
||||
alias maintenance=MAINTENANCE_APT
|
||||
|
||||
wp_scan_website() {
|
||||
docker run -it --rm wpscanteam/wpscan -u https://$1
|
||||
}
|
||||
|
||||
PHPMYADMIN_UPDATE_FUNCTION() {
|
||||
|
||||
PHPMYADMIN_VERSION="4.8.3"
|
||||
|
||||
cd /var/www/22222/htdocs/db/ || exit 1
|
||||
wget -qO phpmyadmin.zip https://files.phpmyadmin.net/phpMyAdmin/$PHPMYADMIN_VERSION/phpMyAdmin-$PHPMYADMIN_VERSION-all-languages.zip
|
||||
|
||||
unzip phpmyadmin.zip && rm phpmyadmin.zip
|
||||
mv pma/config.inc.php .
|
||||
cp -rf phpMyAdmin-$PHPMYADMIN_VERSION-all-languages/* pma/
|
||||
mv config.inc.php pma/
|
||||
|
||||
sudo chown -R www-data:www-data pma
|
||||
|
||||
}
|
||||
|
||||
alias transfer=transfer_vtbox_net
|
||||
|
||||
alias cheat='cht.sh'
|
||||
|
||||
alias pull='git pull'
|
||||
|
||||
alias commit=git_commit
|
||||
|
||||
alias push=git_push
|
||||
|
||||
alias nginxconf=mynginxconf
|
||||
|
||||
alias wp='wp --allow-root'
|
||||
alias gzip=compress_pigz
|
||||
alias gunzip=decompress_pigz
|
||||
alias mybashrc_update=update_git_mybashrc
|
||||
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alhF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
alias lh="stat -c '%A %a %n'"
|
||||
alias maintenance=MAINTENANCE_APT
|
||||
|
||||
alias wpscan=wp_scan_website
|
||||
|
||||
alias update-phpmyadmin=PHPMYADMIN_UPDATE_FUNCTION
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue