Compare commits

...
2 Commits
Author SHA1 Message Date
libretech d9c8b0d250 optimize images and add deploy-html target
- resize all images to max 1920px width (152MB → 66MB)
- add assets-original/ to gitignore for backups
- add make optimize-images target
- add make deploy-html for faster HTML-only deployment
2025-12-19 15:16:24 +01:00
libretech 800ed932bb add hex-dec lookup table and 8bit-P character images, update speaker notes 2025-12-19 15:03:55 +01:00
36 changed files with 50 additions and 33 deletions

No files matched your search

+1
View File
@@ -63,3 +63,4 @@ Desktop.ini
*.pdf
index.md.bak
hdm-lehrauftrag-uebersicht.md
slides/assets-original/
+25 -3
View File
@@ -1,6 +1,6 @@
# Makefile for Marp Slides Project
.PHONY: help build dev watch pdf html clean install deploy copy-assets
.PHONY: help build dev watch pdf html clean install deploy deploy-html copy-assets optimize-images
# Directories
SLIDES_DIR = slides
@@ -27,10 +27,14 @@ help:
@echo " make pdf - Export all slides to PDF"
@echo " make html - Export all slides to HTML"
@echo ""
@echo " Deploy:"
@echo " make deploy - Full build + deploy (HTML, PDF, assets)"
@echo " make deploy-html - HTML only deploy (faster)"
@echo ""
@echo " Other:"
@echo " make optimize-images - Resize images to max 1920px"
@echo " make clean - Remove generated files"
@echo " make install - Install dependencies"
@echo " make deploy - Deploy slides to server"
# Ensure build directory exists
$(BUILD_DIR)/.exists:
@@ -91,7 +95,18 @@ install:
@echo "Installing dependencies..."
npm install
# Deploy slides
# Optimize images (resize to max 1920px, requires nix-shell -p imagemagick)
optimize-images:
@echo "Backing up originals to assets-original/..."
@mkdir -p $(SLIDES_DIR)/assets-original
@cp $(SLIDES_DIR)/assets/*.png $(SLIDES_DIR)/assets-original/ 2>/dev/null || true
@cp $(SLIDES_DIR)/assets/*.jpg $(SLIDES_DIR)/assets-original/ 2>/dev/null || true
@echo "Resizing images to max 1920px..."
@nix-shell -p imagemagick --run 'for img in $(SLIDES_DIR)/assets/*.png; do magick "$$img" -resize "1920x>" -quality 85 "$$img"; done'
@nix-shell -p imagemagick --run 'for img in $(SLIDES_DIR)/assets/*.jpg; do magick "$$img" -resize "1920x>" -quality 85 "$$img"; done'
@echo "Done! Originals backed up in assets-original/"
# Deploy slides (full build)
deploy: build
@echo "Deploying slides..."
@echo "Copying HTML files..."
@@ -100,3 +115,10 @@ deploy: build
scp -r $(BUILD_DIR)/assets/ tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/
@echo "Copying materials..."
scp -r $(BUILD_DIR)/materials/ tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/ 2>/dev/null || true
# Deploy HTML only (faster, no PDF rebuild)
deploy-html: html
@echo "Deploying HTML only..."
scp $(BUILD_DIR)/*.html tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/
scp -r $(BUILD_DIR)/assets/ tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/
scp -r $(BUILD_DIR)/materials/ tengo@tuttle.uberspace.de:/home/tengo/html/hdm/223015b/ 2>/dev/null || true
@@ -191,6 +191,11 @@ Eselsbrücke: 1 Byte = 1 Buchstabe/Symbol (in ASCII/UTF-8 für einfache Zeichen)
Vorgeschichte:
US-ASCII (1967) Code Chart
- 7 Bit = 128 Zeichen
- Erste 32: Steuerzeichen (nicht druckbar)
- Zeichen 32-126: Druckbar (Buchstaben, Ziffern, Satzzeichen)
- Keine Umlaute, kein ñ, kein é
- "American Standard" → Rest der Welt ausgeschlossen
"Ich möchte, dass ihr das mit mir jetzt gemeinsam lesen lernt; stellt euch vor ihr seid ArchäologInnen."
@@ -211,7 +216,6 @@ US-ASCII (1967) Code Chart
»256 Shades of Gray«
256 Graustufen: 0 = Schwarz, 255 = Weiß
-->
@@ -238,6 +242,7 @@ Jeder Kanal 0-255 → 256³ = 16.777.216 Farben ("True Color")
Das menschliche Auge kann etwa 10 Millionen Farben unterscheiden
→ 24 Bit reicht für fotorealistische Bilder
-->
---
<!-- _header: '' -->
@@ -294,6 +299,13 @@ background-color: #FF0000; = Rot
---
<!-- _header: '' -->
<!-- _footer: '' -->
![bg fit](./assets/hex-dec-lookup-table.png)
---
# Das Problem: Sprachen
**Die Welt hat mehr als 256 Zeichen!**
@@ -317,22 +329,6 @@ Chaos: Verschiedene Standards für verschiedene Sprachen
---
<!-- _header: '' -->
<!-- _footer: '' -->
![bg](./assets/ascii-table.png)
<!--
ASCII-Tabelle (1963)
7 Bit = 128 Zeichen
Erste 32: Steuerzeichen (nicht druckbar)
Zeichen 32-126: Druckbar (Buchstaben, Ziffern, Satzzeichen)
Keine Umlaute, kein ñ, kein é
"American Standard" → Rest der Welt ausgeschlossen
-->
---
# Unicode: Ein Standard für alle
**Unicode (1991):**
@@ -380,19 +376,6 @@ UTF-8-Kodierung: Variable Länge spart Speicher bei ASCII
---
<!-- _header: '' -->
<!-- _footer: '' -->
<!-- _backgroundColor: #000 -->
![bg fit](./assets/hex-binary-table.png)
<!--
Hex-Binär-Umrechnungstabelle
Jede Hex-Ziffer = 4 Bits
-->
---
# Hexadezimal: Lesbarkeit
**Binär ist unleserlich:**
@@ -460,6 +443,10 @@ Hex-Editor = Standard-Tool für Dateianalyse und Reverse Engineering
<!--
Hex-Editor-Screenshot mit PNG-Datei
Erste Bytes: 89 50 4E 47 = PNG-Signatur
- 89: non-printable character (signalisiert, dass wir hier außerhalb von ASCII sind)
- 50: P
- 4E: N
- 47: G
IHDR = Image Header (Breite, Höhe, Farbtiefe)
Zeigen, wie man Magic Number liest
Tool: HxD (Windows), Hex Fiend (Mac), xxd (Linux)
@@ -467,6 +454,13 @@ Tool: HxD (Windows), Hex Fiend (Mac), xxd (Linux)
---
<!-- _header: '' -->
<!-- _footer: '' -->
![bg fit](./assets/8bit-P-character.png)
---
# Magic Numbers
**Dateityp-Identifikation durch erste Bytes**
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 KiB

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 MiB

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 MiB

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 KiB

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 KiB

After

Width:  |  Height:  |  Size: 525 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

After

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB