Skip to content

Instantly share code, notes, and snippets.

graph aardvark_metro {
node [shape=box, style=filled]
edge [penwidth=4]
root = R02B05
rankdir = LR
node [color=crimson, fontcolor=gray10]
R01 [label="Rolling Hills"]
#!/usr/bin/python3
"""Gather Netgear CM600 metrics and send them to InfluxDB"""
import argparse
import httplib2
import re
from datetime import datetime
from influxdb import InfluxDBClient
#!/bin/bash
for D in $(ls /sys/block/|grep ^sd); do
DEVS="${DEVS} --device=/dev/${D}"
done
export SCRUTINY_WEB=true
export SCRUTINY_COLLECTOR=true
docker run -it --rm -d -p 8081:8080 -v /run/udev:/run/udev:ro \
--cap-add SYS_RAWIO \
@cnaude
cnaude / randomizer.go
Created June 28, 2021 18:34
create random strings based on file input
package main
import (
"bufio"
"flag"
"fmt"
"math/rand"
"os"
"strconv"
"time"
@cnaude
cnaude / crc-32-mpeg-2.go
Last active July 26, 2021 16:41
crc-32 mpeg-2 implementation in golang
package main
// based on https://stackoverflow.com/questions/54339800/how-to-modify-crc-32-to-crc-32-mpeg-2
import (
"fmt"
)
// crc32mpeg2 : calculate crc-32-mpeg-2 checksum
func crc32mpeg2(b []byte) uint32 {
@cnaude
cnaude / keybase.md
Created January 11, 2023 15:53
keybase verification

Keybase proof

I hereby claim:

  • I am cnaude on github.
  • I am chrisnaude (https://keybase.io/chrisnaude) on keybase.
  • I have a public key ASCTp3JwZvgLOEo7Mi9OHGUu4BQTx3LTon8nEg7qlISWBwo

To claim this, I am signing this object:

@cnaude
cnaude / cm1100.py
Created June 19, 2023 21:19
Gather Netgear CM1100 metrics and send them to InfluxDB V2
#!/usr/bin/env python3
"""Gather Netgear CM1100 metrics and send them to InfluxDB V2"""
import argparse
import re
import requests
from datetime import datetime
from influxdb_client import InfluxDBClient