Skip to content

Instantly share code, notes, and snippets.

@boverby
boverby / stldim.py
Created December 28, 2023 17:03
retrieve x/y/z dimensions for STL files , updated from originaal for python3 and bookworm
#!/usr/bin/python3
# https://www.reddit.com/r/3Dprinting/comments/7ehlfc/python_script_to_find_stl_dimensions/
## updated fot python3 and bookworm
# Python script to find STL dimensions
# Requrements: sudo pip install numpy-stl
## apt install numpy-stl
@boverby
boverby / changedConfigHadron.pl
Last active October 26, 2022 12:43
remind yourself what config changes you made to superslicer
#!/bin/perl
use strict;
use warnings;
# changedConfigHadron.pl
## sometimes I forget when (or what ) manual changes were made in superslicer.
## but since I always put the gcode into the same working directory, you can
## basically just look for differences for a diff between chronolocal files
@boverby
boverby / snapshotMask.py
Created November 7, 2020 18:29
python version of mask maker for frigate
#!/usr/bin/env python3
# snapshotMask.py file
# see: https://github.com/blakeblackshear/frigate
# "snapshotMask.py" - simple script to allow creation of mask images for frigate
# files dropped in config directory
# makes a graphic mask you can use later for transform like :
# ${SRCDIRECTORY}/${event}.jpg is a full size frame from mp4 file at frame_time
# composite -dissolve 70 -gravity center ${SRCDIRECTORY}/${event}.jpg /opt/frigate/config/hik193mask.bmp -alpha Set ${SRCDIRECTORY}/${event}.jpg
@boverby
boverby / snapshotMask.pl
Created November 7, 2020 16:44
script to create mask file from scratch based on camera mask in frigate config file
#!/usr/bin/perl
use strict;
use warnings;
# see: https://github.com/blakeblackshear/frigate
# "snapshotMask.pl" - simple script to allow creation of mask images for frigate
# files dropped in config directory
@boverby
boverby / d32_1.yaml
Created July 31, 2020 21:03
working mode on reduced speed esp32 on esphome
### config template for deep sleeping esp32 devices
### This is modelled on lolin32 D32 ( not pro )
# uses gpio pin visible to rtc to wake up on motion
# uses mt3608 step-up dc-dc converter to power rcwl-0916 microwave sensor
# > 11 volts is way more sensitive than 3 or 5 volts for microwave
# using hourly wakeup just to keep up with battery life.
# using 80Mhz clock / high wifi powersave to lower consumption
esphome:
#!/bin/sh
NASMOUNT=/system/media/nas
HOST=`hostname`
FILE="${HOST}-`date +%Y-%m-%d_%H.%M.%S.mp4`"
DEST=${NASMOUNT}/`date +%Y-%m`
if [ "$1" == "on" ]; then
// experiment using inexpensive NTC thermistor on esp32
// 20180204 - original test
// small wemos board from FACE-TO-FACE [ esp32 Rev1 ]
// compares well to reference thermocouple in simple test
// built from https://learn.adafruit.com/thermistor/using-a-thermistor
// and https://esp32.com/viewtopic.php?f=12&t=1045
// and https://github.com/espressif/arduino-esp32/issues/92
@boverby
boverby / 0001-additional-hosts-for-openocd_tools.patch
Created July 5, 2017 21:42
proposed patch for padiiotstamp repo
From f55c48dc41317289a0151ee6804ff00dbc680f5c Mon Sep 17 00:00:00 2001
From: boverby <boverby@gmail.com>
Date: Tue, 20 Jun 2017 06:49:03 -0400
Subject: [PATCH] additional hosts for openocd_tools
---
release/package_padiiotstamp_index.json | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/release/package_padiiotstamp_index.json b/release/package_padiiotstamp_index.json
@boverby
boverby / mqtt_esp8266wemos.ino
Created May 26, 2017 20:43
mqtt_esp8266wemos - simple mqtt sender and receiver for wemos d1 mini. mac address is part of topic.
/*
Simple wemos D1 mini MQTT example
This sketch demonstrates the capabilities of the pubsub library in combination
with the ESP8266 board/library.
It connects to the provided access point using dhcp, using ssid and pswd
It connects to an MQTT server ( using mqtt_server ) then:
- publishes "connected"+uniqueID to the [root topic] ( using topic )
@boverby
boverby / ds18b20.pl
Created March 12, 2017 16:30
simple script to read ds18b20 on ntc chip, requires 4.4.13 kernel for w1_therm module
#!/usr/bin/perl
# "ds18b20.pl" collect data from ds18b20 via one-wire modules
# and save in mysql and mqtt
use strict;
use warnings;
# most logic lifted from http://webshed.org/wiki/RaspberryPI_DS1820
# required mysql permissions like: