2020-02-18 21:26:59 +00:00
|
|
|
#########################################
|
|
|
|
# Aliases #
|
|
|
|
#########################################
|
|
|
|
alias open="xdg-open"
|
2020-11-23 11:56:57 +00:00
|
|
|
alias gitroot='cd $(git rev-parse --show-toplevel)'
|
2020-02-18 21:26:59 +00:00
|
|
|
|
|
|
|
alias dc-up="docker-compose up"
|
|
|
|
alias dc-upd="docker-compose up -d"
|
|
|
|
alias dc-down="docker-compose down"
|
2020-11-23 11:56:57 +00:00
|
|
|
alias dc-clearmysql='find $(git rev-parse --show-toplevel)/docker/lib/mysql -mindepth 1 -maxdepth 1 -not -name '.gitkeep' -exec rm -rf "{}" \;'
|
|
|
|
alias dc-rswpass='mysql --host=127.0.0.1 -P 3305 -u application -papplication -e "UPDATE wp_users SET user_pass='$(php ~/workspace/php-dev-tools/wpass/build/wpass.phar asdf1234)'" application'
|
2020-02-18 21:26:59 +00:00
|
|
|
|
|
|
|
# Mirons docker init script
|
|
|
|
alias docker-init="bash <(curl -s https://raw.githubusercontent.com/micron/docker-setup/master/init.sh)"
|
|
|
|
|
|
|
|
# Quick install script for projects
|
2020-11-23 11:56:57 +00:00
|
|
|
alias krinstall="echo '###=== NodeJS ===###' && npm install && echo '###=== Composer ===###' && composer install && echo '###=== Finished ===###'"
|
2020-02-18 21:26:59 +00:00
|
|
|
|
|
|
|
copydl() {
|
|
|
|
|
|
|
|
if [ $# -eq 1 ]
|
|
|
|
then
|
|
|
|
dlFileCount=1
|
|
|
|
elif [ $# -eq 2 ]
|
|
|
|
then
|
|
|
|
dlFileCount=$1
|
|
|
|
fi
|
|
|
|
|
2020-07-14 10:54:58 +00:00
|
|
|
lastdlFiles=$(ls -1tp ~/Downloads | head -$dlFileCount)
|
2020-03-09 15:19:35 +00:00
|
|
|
|
2020-02-18 21:26:59 +00:00
|
|
|
if [ $# -eq 1 ]
|
|
|
|
then
|
|
|
|
while read line; do
|
|
|
|
cp "$HOME/Downloads/$line" "$1"
|
|
|
|
done <<< "$lastdlFiles"
|
|
|
|
elif [ $# -eq 2 ]
|
|
|
|
then
|
|
|
|
while read line; do
|
|
|
|
cp "$HOME/Downloads/$line" "$2"
|
|
|
|
done <<< "$lastdlFiles"
|
|
|
|
fi
|
2020-03-09 15:19:35 +00:00
|
|
|
|
2020-02-18 21:26:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ytplaylist(){
|
|
|
|
youtube-dl --get-id "$1" | awk '{print "https://www.youtube.com/watch?v=" $0;}' | vlc -
|
|
|
|
}
|
|
|
|
|
|
|
|
alias dl-wpcli="wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"
|
|
|
|
alias dl-wp="curl https://wordpress.org/latest.tar.gz | tar -xzv"
|
|
|
|
|
|
|
|
alias gpgcb="xsel --clipboard | sed 's/^ *//g' | gpg2 -d"
|
2020-03-09 15:19:35 +00:00
|
|
|
|
|
|
|
if [ -n "$(command -v vimx)" ]; then
|
|
|
|
alias oldvim='vim'
|
|
|
|
alias vim='vimx'
|
|
|
|
fi
|
2020-05-13 10:28:32 +00:00
|
|
|
|
2020-07-10 11:27:50 +00:00
|
|
|
if [ -n "$(command -v exa)" ]; then
|
2020-07-05 17:50:21 +00:00
|
|
|
alias ls='exa'
|
|
|
|
alias oldls='ls --color=tty'
|
|
|
|
fi
|