# get ports from nginx proxy
function _ports(){
grep -E "set .port|server_name" /app/nginxproxy/data/nginx/proxy_host/*.conf \
  | sed 's/^[ \t]*//; s/.*conf://' \
  | paste - - \
  | sed 's/set \$port //; s/server_name //; s/;//g' \
  | awk '{$1=$1; print}' \
  | sort -n \
  | column -t -N "PORT,TARGET,OTHER_TARGET" -W "OTHER_TARGET" -s ' ' -o ' | ';
}
alias ports='_ports'

# tmp rebuild for hugo development
alias hugo-rebuild='rm -rf public/ && hugo server --appendPort=false --baseURL="/" --ignoreCache'

# helpers for quickly editing aliases
alias src='source ~/.bash_aliases'
alias edit='vim /srv/configs/.bash_aliases'
