Couple of miscellaneous scripts

This commit is contained in:
Max Bucknell 2019-03-04 20:57:57 +00:00
parent 984e3d9b4d
commit 6cafb6307e
2 changed files with 19 additions and 0 deletions

9
bin/ports Executable file
View file

@ -0,0 +1,9 @@
#! /usr/bin/env bash
set -euo pipefail
function main {
lsof -nP +c 15 | grep LISTEN
}
main

10
bin/serve Executable file
View file

@ -0,0 +1,10 @@
#! /usr/bin/env bash
function main {
local arg="${1:-.}"
local path="$(cd $arg;pwd)"
docker run --rm -v "$path:/usr/share/nginx/html" -p "80:80" nginx:alpine
}
main $1