Skip to content

Instantly share code, notes, and snippets.

View litetex's full-sized avatar

litetex

View GitHub Profile
@litetex
litetex / convert.bat
Last active August 18, 2025 13:07
FFMPEG to AVIF/WEBM convert script template
@echo off
for /r %%i in (*.jpg) do (
(ffmpeg -y -i "%%i" -c:v av1_amf "%%~dpni.avif" || ffmpeg -y -i "%%i" -c:v libsvtav1 "%%~dpni.avif") && del "%%i"
)
@litetex
litetex / HowToGetAndroidLogs.md
Last active September 15, 2021 20:04
How to get Android logs
@litetex
litetex / Description.md
Last active May 13, 2025 09:53
Serilog (C#): How to get current MethodName, FileName/Path and LineNumber without reflection

Serilog (C#): How to get the current MethodName, FileName/Path and LineNumber without reflection

This is a simple setup for reflectionless logging with serilog using caller information (and a single static class).

See also https://stackoverflow.com/a/46905798

Log.cs

Create your own Log.cs in your Root-Namespace (you can use the class below).

This class is required to detect where the call is coming from; it uses Caller-Information to speed up the program execution, because the attributes are resolved at compile-time.