Skip to content

Instantly share code, notes, and snippets.

View oddmario's full-sized avatar

Mario oddmario

View GitHub Profile
@oddmario
oddmario / net_drops.py
Last active March 11, 2026 19:41
net_drops is a Python script which helps you monitor RX, TX and qdisc packet drops on Linux systems in a live way
# https://gist.github.com/oddmario/bf1058f0083e237d8a896e3c300c9285
import os
import time
import subprocess
import re
import argparse
import sys
def get_sysfs_value(iface, metric):
"""Reads a single integer value from /sys/class/net."""
@oddmario
oddmario / simple_nats_client_and_server.go
Created May 4, 2026 16:03
Example code for a NATS server and client in Go
package main
import (
"fmt"
"log"
"time"
natsServer "github.com/nats-io/nats-server/v2/server"
"github.com/nats-io/nats.go"
)