######################################### # Aliases # ######################################### #alias sudo="sudo " alias ws="cd ~/workspace" alias open="xdg-open" alias dc-up="docker-compose up" alias dc-upd="docker-compose up -d" alias dc-down="docker-compose down" alias dss-s="docker-sync-stack start" # 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 alias krinstall="echo '###=== NodeJS ===###' && npm install && echo '###=== Bower ===###' && bower install && echo '###=== Composer ===###' && composer install && echo '###=== Finished ===###'" # Quickly ZIP and Delete on enter press alias quickzip='ALEXAFILE="${PWD##*/}_$(cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' | head -c 32).zip"; zip ${ALEXAFILE} -r * && echo "Press enter to delete file." && read && rm ${ALEXAFILE}' copydl() { if [ $# -eq 1 ] then dlFileCount=1 elif [ $# -eq 2 ] then dlFileCount=$1 fi lastdlFiles=$(ls -tp ~/Downloads | grep -v /$ | head -$dlFileCount) 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 } 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 gitroot='cd $(git rev-parse --show-toplevel)' alias dc-clearmysql='find $(git rev-parse --show-toplevel)/docker/lib/mysql -mindepth 1 -maxdepth 1 -not -name '.gitkeep' -exec rm -rf "{}" \;' alias gpgcb="xsel --clipboard | sed 's/^ *//g' | gpg2 -d" if [ -n "$(command -v vimx)" ]; then alias oldvim='vim' alias vim='vimx' fi if [ -n "$(command -v bat)" ]; then alias cat='bat' alias oldcat='cat' fi if [ -n "$(command -v exa)" ]; then alias ls='exa' alias oldls='ls --color=tty' fi