From 80ad356d7ad90f4753e15e8af7254723894e2b40 Mon Sep 17 00:00:00 2001 From: Hunter Kvalevog Date: Sat, 29 Aug 2026 15:36:31 -0700 Subject: --- archetypes/blog.md | 5 +++++ archetypes/default.md | 1 - assets/css/main.css | 27 +++++++++++++++++++++++++++ content/_index.md | 7 +------ content/notes/ffmpeg.md | 21 ++++++++++----------- content/notes/source-sdk.md | 43 +++++++++++++++++++++++++++++++++++++++++++ hugo.toml | 3 +++ layouts/baseof.html | 9 ++++++++- layouts/home.html | 11 +++++++++++ layouts/page.html | 10 ++-------- layouts/section.html | 4 ++-- layouts/taxonomy.html | 10 +++++----- 12 files changed, 117 insertions(+), 34 deletions(-) create mode 100644 archetypes/blog.md create mode 100644 assets/css/main.css create mode 100644 content/notes/source-sdk.md diff --git a/archetypes/blog.md b/archetypes/blog.md new file mode 100644 index 0000000..25b6752 --- /dev/null +++ b/archetypes/blog.md @@ -0,0 +1,5 @@ ++++ +date = '{{ .Date }}' +draft = true +title = '{{ replace .File.ContentBaseName "-" " " | title }}' ++++ diff --git a/archetypes/default.md b/archetypes/default.md index 25b6752..746117a 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,5 +1,4 @@ +++ -date = '{{ .Date }}' draft = true title = '{{ replace .File.ContentBaseName "-" " " | title }}' +++ diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..7bc39c7 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,27 @@ +body { + max-width: 800px; + margin: 0 auto; + padding: 0 1rem; + /* font-family: system-ui, sans-serif; */ + /* line-height: 1.6; */ + font-family: Arial,sans-serif; + font-size: 13px; + background: #fefefe; + color: #222222; +} + +a { + color: #0b6bcb; +} + +pre { + overflow-x: auto; + background: #f7f7f7; + padding: 0.5rem 0.5rem; + border: 1px solid #e2e2dd; +} + +:not(pre) > code { + background: #f0f0ec; + padding: 0.1rem 0.3rem; +} diff --git a/content/_index.md b/content/_index.md index ccecef6..1548de9 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,6 +1 @@ -+++ -date = '2026-06-29T23:05:19-05:00' -title = '' -+++ - -hello world +Hello. Right now this website just hosts some notes I wrote. I will add more later. \ No newline at end of file diff --git a/content/notes/ffmpeg.md b/content/notes/ffmpeg.md index cdd950c..a7e6803 100644 --- a/content/notes/ffmpeg.md +++ b/content/notes/ffmpeg.md @@ -1,6 +1,5 @@ +++ -date = '2026-06-17T17:50:30-05:00' -title = 'ffmpeg' +title = 'FFmpeg development notes' +++ ## Websites @@ -20,19 +19,19 @@ title = 'ffmpeg' ## Building List all compile options: -``` +```sh $ ./configure --help | vim - ``` Quick development build; takes about 90 seconds on an M1 MacBook Air: -``` +```sh $ ./configure --disable-optimizations --disable-asm $ make -j $(nproc) $ make -j $(sysctl -n hw.logicalcpu) ``` Troubleshooting build: -``` +```sh $ ./configure --disable-optimizations --assert-level=2 --toolchain=clang-asan $ ./configure --disable-optimizations --assert-level=2 --toolchain=clang-asan-ubsan ``` @@ -42,7 +41,7 @@ $ ./configure --disable-optimizations --assert-level=2 --toolchain=clang-asan-ub ## Regression testing FATE documentation: https://ffmpeg.org/fate.html, TLDR: -``` +```sh $ ./configure --disable-optimizations --assert-level=2 --toolchain=clang-asan --samples=$HOME/Proj/FFmpeg-FATE $ make $ make fate-rsync @@ -54,12 +53,12 @@ $ make fate checkasm docs: https://checkasm.videolan.me/ Build within FFmpeg: -``` +```sh $ make checkasm ``` List tests: -``` +```sh $ ./tests/checkasm/checkasm --list-tests | sort | vim - ``` @@ -69,7 +68,7 @@ The easiest way to see what test calls what functions is to check the source cod [`-> tests/checkasm/checkasm.c`](https://code.ffmpeg.org/FFmpeg/FFmpeg/src/branch/master/tests/checkasm/checkasm.c). Example: -``` +```sh $ ./tests/checkasm/checkasm --bench --test=vf_bwdif ```
@@ -118,7 +117,7 @@ Benchmark results:
-## libavformat architecture + diff --git a/content/notes/source-sdk.md b/content/notes/source-sdk.md new file mode 100644 index 0000000..6a63601 --- /dev/null +++ b/content/notes/source-sdk.md @@ -0,0 +1,43 @@ ++++ +title = 'Source SDK (Team Fortress 2) development notes' ++++ + +## Websites + +* [ValveSoftware/source-sdk-2013](https://github.com/ValveSoftware/source-sdk-2013) - git repo +* [ValveSoftware/Source-1-Games](https://github.com/ValveSoftware/Source-1-Games) - issue tracker + +## Development + +Patches are merged by [EricS-Valve](https://github.com/EricS-Valve) from time to time, usually late in the day or on a weekend. + +The SDK game code and live TF2 are not identical. There is code in the SDK that is not present in TF2, and vice versa. For example, `NotificationQueue_Add` is [disabled in the SDK](https://github.com/ValveSoftware/source-sdk-2013/blob/9cbe7d5d3c847fb2e2be6049c3e2a72853bd6b85/src/game/client/econ/econ_notifications.cpp#L1292) but not in live TF2. Not to mention, Valve uses Perforce P4 for version control instead of Git. + +## Building with Visual Studio 2026 + +Valve Project Creator (VPC) only targets up to Visual Studio 2022. Visual Studio 2026 can be used if you install the 2022 toolchain: +```bat +"C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\18\Community" ^ + --add Microsoft.VisualStudio.Component.VC.14.44.17.14.x86.x64 ^ + --add Microsoft.VisualStudio.Component.VC.14.44.17.14.MFC ^ + --add Microsoft.VisualStudio.Component.VC.14.44.17.14.ATL +``` + +You will need to install Python as well: +```bat +winget install Python.Python.3.14 +``` + +After that, follow the build instructions in README.md. + +## Code style + +* Use tabs for indentation. +* Use [hungarian notation](https://en.wikipedia.org/wiki/Hungarian_notation) for any variable that is serialized. +* Curly braces get a new line. ([Allman style](https://en.wikipedia.org/wiki/Indentation_style#Allman_style)) +* Curly braces can be omitted if the condition body is only one line. +* Pointer asterisks go on the right, next to the variable name. +* Put spaces around function arguments. +* Put spaces around template arguments. (Usually. The code base is like 60-40 in favor of this style.) + +All this being said, much of the code base is not consistent. Just pay attention to the surrounding code and match the style. diff --git a/hugo.toml b/hugo.toml index f096619..2824da4 100644 --- a/hugo.toml +++ b/hugo.toml @@ -5,3 +5,6 @@ title = 'kvog.sh' [markup.goldmark.renderer] unsafe = true + +[markup.highlight] + style = 'github' diff --git a/layouts/baseof.html b/layouts/baseof.html index 9b5c08e..144c14d 100644 --- a/layouts/baseof.html +++ b/layouts/baseof.html @@ -1,6 +1,13 @@ - + + + + {{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} - {{ site.Title }}{{ end }} + {{ with .Description }}{{ end }} + {{ $css := resources.Get "css/main.css" | fingerprint }} + +
{{ block "main" . }}{{ end }}
diff --git a/layouts/home.html b/layouts/home.html index e4e4a83..9de1998 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -1,2 +1,13 @@ {{ define "main" }} + {{ .Content }} + +

Notes

+ + {{ range (site.GetPage "/notes").Pages.ByTitle }} + + + + + {{ end }} +
{{ .File.ContentBaseName }}{{ .Title }}
{{ end }} diff --git a/layouts/page.html b/layouts/page.html index 540938f..25904c7 100644 --- a/layouts/page.html +++ b/layouts/page.html @@ -1,10 +1,4 @@ {{ define "main" }} -

{{ .Title }}

- - {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := .Date | time.Format ":date_long" }} - - - {{ .Content }} +

{{ .Title }}

+ {{ .Content }} {{ end }} - diff --git a/layouts/section.html b/layouts/section.html index 0b95945..1e5eb84 100644 --- a/layouts/section.html +++ b/layouts/section.html @@ -3,9 +3,9 @@ {{ range .Pages }} - + + {{ end }}
{{ .LinkTitle }}{{ .File.ContentBaseName }}{{ .Title }}
{{ end }} - diff --git a/layouts/taxonomy.html b/layouts/taxonomy.html index c2e7875..6aba219 100644 --- a/layouts/taxonomy.html +++ b/layouts/taxonomy.html @@ -1,7 +1,7 @@ {{ define "main" }} -

{{ .Title }}

- {{ .Content }} - {{ range .Pages }} -

{{ .LinkTitle }}

- {{ end }} +

{{ .Title }}

+ {{ .Content }} + {{ range .Pages }} +

{{ .LinkTitle }}

+ {{ end }} {{ end }} -- cgit v1.2.3