Skip to content

Instantly share code, notes, and snippets.

View kartben's full-sized avatar
🌞
On vacation

Benjamin Cabé kartben

🌞
On vacation
View GitHub Profile

net_pkt_pull() TCP goodput campaign

Buffer Write TCP_NODELAY Baseline Candidate Change
128 64 0 14.551 Mbit/s 14.649 Mbit/s +0.67%
128 64 1 2.540 Mbit/s 2.534 Mbit/s -0.23%
128 128 0 18.305 Mbit/s 18.268 Mbit/s -0.20%
128 128 1 4.737 Mbit/s 4.783 Mbit/s +0.98%
128 256 0 19.988 Mbit/s 20.196 Mbit/s +1.04%
128 256 1 8.762 Mbit/s 8.848 Mbit/s +0.98%
@kartben
kartben / gen_pcm.py
Last active June 9, 2026 12:18
Generate PCM test files
python3 - <<'PY'
import math
import struct
sample_rates = [8000, 16000, 32000, 44100, 48000]
widths = [8, 16, 24, 32]
freq = 1000
duration_s = 1
steps = 61
#!/usr/bin/env python3
# SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors
# SPDX-License-Identifier: Apache-2.0
"""
List open GitHub PRs that are **truly mergeable**: no merge conflicts (GitHub
``mergeable``) **and** all **required** status checks completed successfully.
For each listed PR, shows failing **non-required** checks (if any).
Uses the GitHub GraphQL API. Authenticate with ``gh auth login`` or set

Zephyr Year 2038 Immunity Report

1. Executive Summary

Zephyr is immune to the Year 2038 bug by default.

The operating system enforces 64-bit time representations at both the kernel and application library levels. While it is possible to disable these protections via Kconfig, the default configuration prevents the build from succeeding if the underlying C library tries to use a 32-bit time_t.

2. Understanding the Year 2038 Bug

The Mechanism

printf '%s\n' 'localhost:8443 {  ✔  15s   11:05:53  
tls internal
root * _build/html
file_server
encode zstd gzip
}
:8080 {
redir https://localhost:8443{uri} 308
}' | caddy run --config /dev/stdin --adapter caddyfile
#!/usr/bin/env python3
"""
Script to check GitHub activity of maintainers and collaborators listed in MAINTAINERS.yml
This script extracts all GitHub usernames from the MAINTAINERS.yml file and checks their
activity in the specified GitHub organization using the GitHub GraphQL API.
Requirements:
- GITHUB_TOKEN environment variable must be set
- requests library (pip install requests)
python seewav.py /Users/kartben/Downloads/20250905-esv2-53p-bg-51p.wav -W 1280 -H 720 -c 1,1,1 --bg-image ~/Downloads/the\ zephyr\ podcast.png --rect 0 300 1280 420 -B 50 --bar-ratio 1 0.5 -O 4 --fade-in 2 --fade-out 2
/dts-v1/;
/* node '/' defined in zephyr/dts/common/skeleton.dtsi:9 */
/ {
#address-cells = < 0x1 >; /* in zephyr/dts/common/skeleton.dtsi:10 */
#size-cells = < 0x1 >; /* in zephyr/dts/common/skeleton.dtsi:11 */
model = "Native Sim Board"; /* in zephyr/boards/native/native_sim/native_sim.dts:14 */
compatible = "zephyr,posix"; /* in zephyr/boards/native/native_sim/native_sim.dts:15 */
/* node '/chosen' defined in zephyr/dts/common/skeleton.dtsi:12 */
python3 -m coverxygen --xml-dir doc/_build/doxygen/xml/ --src-dir include/ --output doc-coverage.info && \
lcov --remove doc-coverage.info \*/deprecated > new.info && \
genhtml --no-function-coverage --no-branch-coverage new.info -o coverage-report
#!/bin/bash
# Start in current directory
root_dir=$(pwd)
# Find all unique directories containing Kconfig* files
find "$root_dir" -type f -name 'Kconfig*' -exec dirname {} \; | sort -u | while read dir; do
# Check if any Kconfig* file in the directory matches the pattern 'config .*_SHELL$'
if grep -E -q '^[[:space:]]*config .*_SHELL$' "$dir"/Kconfig*; then