adding in aliases
This commit is contained in:
18
.bash_aliases
Normal file
18
.bash_aliases
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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'
|
||||
Reference in New Issue
Block a user