diff options
| -rw-r--r-- | archetypes/blog.md | 5 | ||||
| -rw-r--r-- | archetypes/default.md | 1 | ||||
| -rw-r--r-- | assets/css/main.css | 27 | ||||
| -rw-r--r-- | content/_index.md | 7 | ||||
| -rw-r--r-- | content/notes/ffmpeg.md | 21 | ||||
| -rw-r--r-- | content/notes/source-sdk.md | 43 | ||||
| -rw-r--r-- | hugo.toml | 3 | ||||
| -rw-r--r-- | layouts/baseof.html | 9 | ||||
| -rw-r--r-- | layouts/home.html | 11 | ||||
| -rw-r--r-- | layouts/page.html | 10 | ||||
| -rw-r--r-- | layouts/section.html | 4 | ||||
| -rw-r--r-- | layouts/taxonomy.html | 10 |
12 files changed, 117 insertions, 34 deletions
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 ``` <details> @@ -118,7 +117,7 @@ Benchmark results: </details> -## libavformat architecture +<!-- ## libavformat architecture Note: This is all based off of FFmpeg 8.1.2 (commit `38b88335f99e76ed89ff3c93f877fdefce736c13`) @@ -206,4 +205,4 @@ demuxer instance, and reads the file header. [`doc/examples/remux.c:80`](https://code.ffmpeg.org/FFmpeg/FFmpeg/src/commit/38b88335f99e76ed89ff3c93f877fdefce736c13/doc/examples/remux.c#L80): `main` calls `avformat_find_stream_info`. -</div> +</div> --> 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. @@ -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 @@ <!DOCTYPE html> <html lang="{{ site.Language.Locale }}" dir="{{ or site.Language.Direction `ltr` }}"> -<head></head> +<head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} - {{ site.Title }}{{ end }}</title> + {{ with .Description }}<meta name="description" content="{{ . }}">{{ end }} + {{ $css := resources.Get "css/main.css" | fingerprint }} + <link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}"> +</head> <body> <main>{{ block "main" . }}{{ end }}</main> </body> 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 }} + + <h2><a href="/notes/">Notes</a></h2> + <table> + {{ range (site.GetPage "/notes").Pages.ByTitle }} + <tr> + <td><a href="{{ .RelPermalink }}">{{ .File.ContentBaseName }}</a></td> + <td>{{ .Title }}</td> + </tr> + {{ end }} + </table> {{ 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" }} - <h1>{{ .Title }}</h1> - - {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := .Date | time.Format ":date_long" }} - <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time> - - {{ .Content }} + <h1>{{ .Title }}</h1> + {{ .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 @@ <table> {{ range .Pages }} <tr> - <td><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></td> + <td><a href="{{ .RelPermalink }}">{{ .File.ContentBaseName }}</a></td> + <td>{{ .Title }}</td> </tr> {{ end }} </table> {{ 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" }} - <h1>{{ .Title }}</h1> - {{ .Content }} - {{ range .Pages }} - <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> - {{ end }} + <h1>{{ .Title }}</h1> + {{ .Content }} + {{ range .Pages }} + <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2> + {{ end }} {{ end }} |