Couple of miscellaneous scripts
This commit is contained in:
parent
984e3d9b4d
commit
6cafb6307e
2 changed files with 19 additions and 0 deletions
9
bin/ports
Executable file
9
bin/ports
Executable 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
10
bin/serve
Executable 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
|
Loading…
Add table
Reference in a new issue