Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions global/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NETWAYS Training global artefacts
# NETWAYS Training global artifacts

This repository holds global artefacts for a specific NETWAYS training. For example, layouts, templates and images
This repository holds global artifacts for a specific NETWAYS training. For example, layouts, templates and images
resides here.

## How to use
Expand Down
10 changes: 10 additions & 0 deletions global/extras/Linux-Cheatsheet-English.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
| Talk to HTTP endpoint | `curl -X GET <HTTP path>` |
| Search for regular expression in file | `grep <regular expression> <Path to file>` |
| Search for regular expression in directory | `grep -r <regular expression> <Path to file>` |

## tmux

| Description | Command |
|---|---|
| Split pane with horizontal layout | `Ctrl + b %` |
| Split pane with vertical layout | `Ctrl + b "` |
| Switch to next pane | `Ctrl + b o` |
| Toggle fullscreen on current pane | `Ctrl + b z` |
| Close current pane | `Ctrl + b x` |
10 changes: 10 additions & 0 deletions global/extras/Linux-Cheatsheet-German.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
| HTTP Endpunkt ansprechen | `curl -X GET <HTTP Pfad>` |
| Regulären Ausdruck in Datei suchen | `grep <regulärer Ausdruck> <Pfad zur Datei>` |
| Regulären Ausdruck in Ordner suchen | `grep -r <regulärer Ausdruck> <Pfad zur Datei>` |

## tmux

| Beschreibung | Befehl |
|---|---|
| Fenster horizontal teilen | `Ctrl + b %` |
| Fenster vertikal teilen | `Ctrl + b "` |
| Zum nächsten Fenster wechseln | `Ctrl + b o` |
| Vollbildmodus wechseln | `Ctrl + b z` |
| Aktuelles Fenster schließen | `Ctrl + b x` |
13 changes: 12 additions & 1 deletion global/pre/netways/about/00_about.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,15 @@
!SLIDE noprint
# NETWAYS Trainings & Workshops

<center><img src="../_images/overview_trainings.png" style="width:720px;height:590px;" alt="NETWAYS Trainings & Workshops"/></center>
* Ansible
* Elastic Stack
* Foreman
* GitLab
* Grafana
* Graylog
* Icinga
* Kubernetes
* Prometheus
* Terraform

Check out: https://www.netways.de/schulungen/
33 changes: 30 additions & 3 deletions global/wizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@ execdocker () {
$RUNTIME rm -f $CNAME 2> /dev/null
fi

case $RUNTIME in
*podman*) USERNS=keep-id;;
*) USERNS=host;;
esac

$RUNTIME run \
-it \
--name=$CNAME \
--rm \
-p 9090:9090 \
--user $(id -u) \
--userns=$USERNS \
-v "$DIR:/training:z" \
-e "LANG=$CLANG" \
-e "LANGUAGE=$CLANG" \
Expand All @@ -36,7 +42,7 @@ printhandouts () {
# Removes showoff's Section markers for PDF output
sed -i 's/~~~.*~~~ //g' static/index.html
echo -e "\n--- RUN WKHTMLTOPDF FOR HANDOUTS ---"
execdocker "wkhtmltopdf --enable-local-file-access --load-error-handling ignore -s A5 --print-media-type --footer-left [page] --footer-right ©NETWAYS static/index.html ${TRAINING}_${1}-handouts.pdf"
execdocker "wkhtmltopdf --enable-local-file-access --load-error-handling ignore -s ${FORMAT} --print-media-type --footer-left [page] --footer-right ©NETWAYS static/index.html ${TRAINING}_${1}_${FORMAT}-handouts.pdf"
}

# Generate exercises as showoff HTML and convert HTML to PDF
Expand All @@ -46,7 +52,7 @@ printexercises () {
# Removes showoff's Section markers for PDF output
sed -i 's/~~~.*~~~ //g' static/index.html
echo -e "\n--- RUN WKHTMLTOPDF FOR EXERCISES ---"
execdocker "wkhtmltopdf --enable-local-file-access --load-error-handling ignore -s A5 --print-media-type --footer-left [page] --footer-right ©NETWAYS static/index.html ${TRAINING}_${1}-exercises.pdf"
execdocker "wkhtmltopdf --enable-local-file-access --load-error-handling ignore -s ${FORMAT} --print-media-type --footer-left [page] --footer-right ©NETWAYS static/index.html ${TRAINING}_${1}_${FORMAT}-exercises.pdf"
}

# Generate solutions as showoff HTML and convert HTML to PDF
Expand All @@ -56,7 +62,7 @@ printsolutions () {
# Removes showoff's Section markers for PDF output
sed -i 's/~~~.*~~~ //g' static/index.html
echo -e "\n--- RUN WKHTMLTOPDF FOR SOLUTIONS ---"
execdocker "wkhtmltopdf --enable-local-file-access --load-error-handling ignore -s A5 --print-media-type --footer-left [page] --footer-right ©NETWAYS static/index.html ${TRAINING}_${1}-solutions.pdf"
execdocker "wkhtmltopdf --enable-local-file-access --load-error-handling ignore -s ${FORMAT} --print-media-type --footer-left [page] --footer-right ©NETWAYS static/index.html ${TRAINING}_${1}_${FORMAT}-solutions.pdf"
}

setlayout () {
Expand Down Expand Up @@ -116,6 +122,27 @@ esac

setlayout $LAYOUT

echo -e "\n### FORMAT ###"

echo -e "
[1] A5
[2] A4\n"

FORMAT_DEFAULT=1
read -p "Which format? [1-2] (Default: "$FORMAT_DEFAULT"): " FORMAT
FORMAT="${FORMAT:-$FORMAT_DEFAULT}"

while [[ $FORMAT != [1-2] ]]; do
echo "Invalid option, try again..."
read -p "Which format? [1-2] (Default: "$FORMAT_DEFAULT"): " FORMAT
FORMAT="${FORMAT:-$FORMAT_DEFAULT}"
done

case "$FORMAT" in
1) FORMAT=A5;;
2) FORMAT=A4;;
esac

echo -e "\n### MODE ###"

echo -e "
Expand Down