Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 87c72fe

Browse files
authored
Chore/update subtree (#275)
* Squashed 'global/' content from commit 285d9c5 git-subtree-dir: global git-subtree-split: 285d9c5c23b9627eb7a800254a30590c2aade9aa
1 parent 526a800 commit 87c72fe

File tree

5 files changed

+64
-6
lines changed

5 files changed

+64
-6
lines changed

global/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# NETWAYS Training global artefacts
1+
# NETWAYS Training global artifacts
22

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

66
## How to use

global/extras/Linux-Cheatsheet-English.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@
5151
| Talk to HTTP endpoint | `curl -X GET <HTTP path>` |
5252
| Search for regular expression in file | `grep <regular expression> <Path to file>` |
5353
| Search for regular expression in directory | `grep -r <regular expression> <Path to file>` |
54+
55+
## tmux
56+
57+
| Description | Command |
58+
|---|---|
59+
| Split pane with horizontal layout | `Ctrl + b %` |
60+
| Split pane with vertical layout | `Ctrl + b "` |
61+
| Switch to next pane | `Ctrl + b o` |
62+
| Toggle fullscreen on current pane | `Ctrl + b z` |
63+
| Close current pane | `Ctrl + b x` |

global/extras/Linux-Cheatsheet-German.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,13 @@
5151
| HTTP Endpunkt ansprechen | `curl -X GET <HTTP Pfad>` |
5252
| Regulären Ausdruck in Datei suchen | `grep <regulärer Ausdruck> <Pfad zur Datei>` |
5353
| Regulären Ausdruck in Ordner suchen | `grep -r <regulärer Ausdruck> <Pfad zur Datei>` |
54+
55+
## tmux
56+
57+
| Beschreibung | Befehl |
58+
|---|---|
59+
| Fenster horizontal teilen | `Ctrl + b %` |
60+
| Fenster vertikal teilen | `Ctrl + b "` |
61+
| Zum nächsten Fenster wechseln | `Ctrl + b o` |
62+
| Vollbildmodus wechseln | `Ctrl + b z` |
63+
| Aktuelles Fenster schließen | `Ctrl + b x` |

global/pre/netways/about/00_about.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,15 @@
4444
!SLIDE noprint
4545
# NETWAYS Trainings & Workshops
4646

47-
<center><img src="../_images/overview_trainings.png" style="width:720px;height:590px;" alt="NETWAYS Trainings & Workshops"/></center>
47+
* Ansible
48+
* Elastic Stack
49+
* Foreman
50+
* GitLab
51+
* Grafana
52+
* Graylog
53+
* Icinga
54+
* Kubernetes
55+
* Prometheus
56+
* Terraform
57+
58+
Check out: https://www.netways.de/schulungen/

global/wizard.sh

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ execdocker () {
1515
$RUNTIME rm -f $CNAME 2> /dev/null
1616
fi
1717

18+
case $RUNTIME in
19+
*podman*) USERNS=keep-id;;
20+
*) USERNS=host;;
21+
esac
22+
1823
$RUNTIME run \
1924
-it \
2025
--name=$CNAME \
2126
--rm \
2227
-p 9090:9090 \
2328
--user $(id -u) \
29+
--userns=$USERNS \
2430
-v "$DIR:/training:z" \
2531
-e "LANG=$CLANG" \
2632
-e "LANGUAGE=$CLANG" \
@@ -36,7 +42,7 @@ printhandouts () {
3642
# Removes showoff's Section markers for PDF output
3743
sed -i 's/~~~.*~~~ //g' static/index.html
3844
echo -e "\n--- RUN WKHTMLTOPDF FOR HANDOUTS ---"
39-
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"
45+
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"
4046
}
4147

4248
# Generate exercises as showoff HTML and convert HTML to PDF
@@ -46,7 +52,7 @@ printexercises () {
4652
# Removes showoff's Section markers for PDF output
4753
sed -i 's/~~~.*~~~ //g' static/index.html
4854
echo -e "\n--- RUN WKHTMLTOPDF FOR EXERCISES ---"
49-
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"
55+
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"
5056
}
5157

5258
# Generate solutions as showoff HTML and convert HTML to PDF
@@ -56,7 +62,7 @@ printsolutions () {
5662
# Removes showoff's Section markers for PDF output
5763
sed -i 's/~~~.*~~~ //g' static/index.html
5864
echo -e "\n--- RUN WKHTMLTOPDF FOR SOLUTIONS ---"
59-
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"
65+
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"
6066
}
6167

6268
setlayout () {
@@ -116,6 +122,27 @@ esac
116122

117123
setlayout $LAYOUT
118124

125+
echo -e "\n### FORMAT ###"
126+
127+
echo -e "
128+
[1] A5
129+
[2] A4\n"
130+
131+
FORMAT_DEFAULT=1
132+
read -p "Which format? [1-2] (Default: "$FORMAT_DEFAULT"): " FORMAT
133+
FORMAT="${FORMAT:-$FORMAT_DEFAULT}"
134+
135+
while [[ $FORMAT != [1-2] ]]; do
136+
echo "Invalid option, try again..."
137+
read -p "Which format? [1-2] (Default: "$FORMAT_DEFAULT"): " FORMAT
138+
FORMAT="${FORMAT:-$FORMAT_DEFAULT}"
139+
done
140+
141+
case "$FORMAT" in
142+
1) FORMAT=A5;;
143+
2) FORMAT=A4;;
144+
esac
145+
119146
echo -e "\n### MODE ###"
120147

121148
echo -e "

0 commit comments

Comments
 (0)