Skip to content

Commit 0ccb229

Browse files
committed
Updates
1 parent 6673f38 commit 0ccb229

6 files changed

+56
-6
lines changed

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.ONESHELL:
2+
.SHELLFLAGS = -e -u
3+
4+
.PHONY: build
5+
build: # Build the Docker image
6+
sh docker-build.sh
7+
8+
.PHONY: run
9+
run: # Build and run the Docker image
10+
sh docker-build.sh
11+
sh docker-run.sh
12+
13+
.PHONY: clean
14+
clean: # Clean up .bundle and Jekyll _site
15+
rm -f Gemfile.lock
16+
rm -rf .bundle
17+
rm -rf _site
18+
rm -rf .sass-cache

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sass:
1212

1313
exclude:
1414
- "*.sh"
15+
- "Makefile"
1516
- "Dockerfile"
1617
- "Gemfile*"
1718
- "LICENSE"

docker-build.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -eu
2+
3+
CONTAINER_NAME="tsondt/wiki"
24

35
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4-
docker build -t "tsondt/wiki" "$DIR"
6+
docker build -t "${CONTAINER_NAME}" "$DIR"

docker-run.sh

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash -eu
22

3-
docker run --rm -v $PWD:/srv -p 4000:4000 "tsondt/wiki" check ||
4-
docker run --rm -v $PWD:/srv -p 4000:4000 "tsondt/wiki" install &&
5-
docker run -ti --rm -v $PWD:/srv -p 4000:4000 "tsondt/wiki" exec jekyll serve --host 0.0.0.0 --port 4000 $1
3+
CONTAINER_NAME="tsondt/wiki"
4+
CONTAINER_PORT=4000
5+
ARGS="${CONTAINER_PORT}"
6+
7+
usage () {
8+
echo "Usage:"
9+
echo -e "\t./docker-run.sh"
10+
echo -e "\t./docker-run.sh [port] [extra args for jekyll serve]"
11+
}
12+
13+
if ! [ $# -eq 0 ]; then
14+
re='^[0-9]+$'
15+
if ! [[ $1 =~ $re ]] ; then
16+
usage
17+
exit 1
18+
fi
19+
CONTAINER_PORT=$1
20+
ARGS="$@"
21+
fi
22+
23+
docker run --rm -v $PWD:/srv "${CONTAINER_NAME}" check ||
24+
docker run --rm -v $PWD:/srv "${CONTAINER_NAME}" install &&
25+
docker run -ti --rm -v $PWD:/srv -p ${CONTAINER_PORT}:${CONTAINER_PORT} "${CONTAINER_NAME}" exec jekyll serve --incremental --host 0.0.0.0 --port ${ARGS}

pages/03-application-security.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ title: Application Security
1717
- [Cheat Sheets](https://www.owasp.org/index.php/OWASP_Cheat_Sheet_Series){:target="_blank" rel="noopener"}
1818
- [Top 10 Privacy Risks Project](https://www.owasp.org/index.php/OWASP_Top_10_Privacy_Risks_Project){:target="_blank" rel="noopener"}
1919
- [Proactive Controls](https://www.owasp.org/index.php/OWASP_Proactive_Controls){:target="_blank" rel="noopener"}
20+
- [TimeGap Theory](https://owasp.org/www-project-timegap-theory/){:target="_blank" rel="noopener"}
21+
- [Juice Shop](https://owasp.org/www-project-juice-shop/){:target="_blank" rel="noopener"}
2022

2123
## Web
2224
---

pages/13-startup-resources.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ title: Startup Resources
2525
- <https://itsallwidgets.com/>{:target="_blank" rel="noopener"}
2626
- <https://github.com/flutter/samples>{:target="_blank" rel="noopener"}
2727
- <https://github.com/brianegan/flutter_architecture_samples>{:target="_blank" rel="noopener"}
28+
29+
## Design Tools
30+
---
31+
- <https://www.sketch.com/>{:target="_blank" rel="noopener"}
32+
- <https://www.figma.com/>{:target="_blank" rel="noopener"}
33+
- <https://moqups.com/>{:target="_blank" rel="noopener"}
34+
- <https://www.canva.com/>{:target="_blank" rel="noopener"}

0 commit comments

Comments
 (0)