Start a Tokio runtime with the
Turn async fn main into a program with the tokio::main attribute, which builds a multi-thread Tokio 1.40 runtime and runs your body on it with block_on.
Short posts that solve one thing: the code, the output we got, and why it works.
Turn async fn main into a program with the tokio::main attribute, which builds a multi-thread Tokio 1.40 runtime and runs your body on it with block_on.
Cut a section out of a video in FFmpeg 7.1 without re-encoding by combining -ss, -to and -c copy, at the price of keyframe-aligned start points.
Get the L1 data cache line size at run time with sysconf(_SC_LEVEL1_DCACHE_LINESIZE) in glibc 2.41, and handle the 0 it returns when the value is unknown.
bitbake -e prints every assignment to a variable above its final value, so you can see which file set it, in Scarthgap 5.0 and later.
Run periodic work from a SysTick-driven superloop by setting task flags in the tick ISR and clearing them in main, on any Cortex-M with CMSIS.
Create a VAO and VBO with glGenVertexArrays and glGenBuffers in OpenGL 3.3 core, bind the VAO first, then fill the buffer with a triangle.
Zero a register with xor eax, eax: two bytes instead of five, and the 32-bit write clears the upper half of rax too. NASM 2.16, x86-64.
Pin the C language level in CMake 3.31 with CMAKE_C_STANDARD, and make it an error rather than a silent downgrade with CMAKE_C_STANDARD_REQUIRED.
Rebuild only one driver directory on Linux 6.12 with make M=, so a one-line fix does not send the whole tree back through the compiler.
Decode a COMP-3 field by splitting each byte into two nibbles, with the last nibble as the sign, in Python 3.13 on any PC.
Start an ESP32 OTA update with esp_ota_begin, stream the image through esp_ota_write, then finish with esp_ota_end, on ESP-IDF v5.4.
Get the path of the terminal attached to a file descriptor with ttyname or the thread-safe ttyname_r, which returns NULL when it is not a terminal.
We send one email when a new post is published. No spam.