Skip to content

Instantly share code, notes, and snippets.

@toneoesa
toneoesa / ethstat.u
Created December 7, 2025 13:31
A ucode script for collecting ethernet statistics and sending to statsd, running on OpenWrt
#!/usr/bin/ucode
// require package ucode-mod-fs, ucode-mod-uloop, ucode-mod-socket
import * as fs from 'fs';
import * as uloop from 'uloop';
import * as socket from 'socket';
const CONFIG = {
host: "192.168.1.230",
port: 8125,
@toneoesa
toneoesa / docker_speed_limit.sh
Created November 30, 2025 11:55
Limiting the TX speed of docker containers
#!/bin/bash
# Fallback defaults
DEFAULT_RATE="35mbit"
DEFAULT_BURST="16kb"
DEFAULT_LATENCY="100ms"
# Label Keys
LABEL_ENABLE="dsl.txlimit"
LABEL_RATE="dsl.txrate"