This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
import os | |
import sys | |
import locale | |
import mpv | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, GLib, Gdk | |
import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gcode_macro PLOTTER_VARS] | |
variable_plotmode_on: 0 | |
variable_xoffset: -5 ; distance from normal extruder on X axis | |
variable_yoffset: 18 ; distance from normal extruder on Y axis | |
variable_zoffset: 5 | |
variable_zdown_offset: -1 ; match z distance gcode files use - for setup | |
variable_zup_offset: 10 ; distance from z home to lift | |
variable_zdeploy_offset: 30 ; distance from z for manual deploy | |
variable_plotting_mode: 0 | |
gcode: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python3 | |
# Python script for using my Pi Zero as a Bicycle Dashcam which also live streams | |
# to an rtsp-simple-server running at home | |
# Recommended to start as a user systemd service | |
# This script requires user access to /sys/devices/platform/leds/leds /sys/class/leds | |
# Also recordings folder tends to corrupt very easily and should be its own filesystem | |
# I use NTFS to allow police/other windows 10 users to access recordings | |
# - DO NOT bother with vfat it is too unreliable | |
# I use the following commands in /etc/rc.local to prepare for running this script |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Name this file cleanspreadsheet.sh | |
# run as ./cleanspreadsheet.sh > data2.csv | |
echo "Mins Elapsed,DateTime,Temp C,Pressure mbar,Humidty %,BAT" | |
START_TIME="2021-10-10 17:51:24" | |
START_TIME_UNIXTIME="$(date -d "${START_TIME}" +%s)" | |
tail -n +2 data.csv | awk -F',' '{printf "%s %s,%.2f,%.2f,%.2f,%s\n",$1,$2,$3,$4,$5,$6}' | while read LN; do | |
LINE_TIME="$(echo $LN | cut -d ',' -f 1)" | |
LINE_TIME_UNIXTIME="$(date -d "${LINE_TIME}" +%s)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codes = { | |
0xFF0000 : { "Event": "RED1", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF720DF","DataLSB":"0xEF04FB","Repeat":0} }, | |
0x00FF00 : { "Event": "GRN1", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF7A05F","DataLSB":"0xEF05FA","Repeat":0} }, | |
0x0000FF : { "Event": "BLU1", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF7609F","DataLSB":"0xEF06F9","Repeat":0} }, | |
0xFFFFFF : { "Event": "WHT", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF7E01F","DataLSB":"0xEF07F8","Repeat":0} }, | |
0xBFFF00 : { "Event": "GRN1", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF7A05F","DataLSB":"0xEF05FA","Repeat":0} }, | |
0xFF9100 : { "Event": "ORG1", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF708F7","DataLSB":"0xEF10EF","Repeat":0} }, | |
0xAD670A : { "Event": "ORG2", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF730CF","DataLSB":"0xEF0CF3","Repeat":0} }, | |
0x88EBE4 : { "Event": "CYA1", "IRSend": {"Protocol":"NEC","Bits":32,"Data":"0xF7B04F","DataLSB":"0xEF0DF2","Repeat":0} }, | |
0x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
future==0.18.2 | |
mysql-connector==2.2.9 | |
pkg-resources==0.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example broadcast command triggered in my case by the RPi doorbell | |
echo "doorbell" | socat - UDP-DATAGRAM:255.255.255.255:12345,broadcast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>>>>>>>>>>>>>>>>>>>> BIG UPDATE <<<<<<<<<<<<<<<<<<<<<<<<<<<< | |
On zoneminder version 1.35.16 and later there is a DecodingEnabled setting for each monitor - this script is therefore of little use anymore | |
>>>>>>>>>>>>>>>>>>>>> ORIGINAL README <<<<<<<<<<<<<<<<<<<<<<<<<<<< | |
The original Zoneminder Forum thread about all this is here: | |
https://forums.zoneminder.com/viewtopic.php?f=9&t=27537&p=107235#p107235 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Function to translate camera serial into zoneminder monitor id | |
function serialToID() { | |
MONITORID=0 | |
if [ "$1" == '"383c49531157b1b1"' ]; then | |
MONITORID=9 | |
fi | |
echo $MONITORID | |
} | |
# Netcat persistent listen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
RCSwitch - Arduino libary for remote control outlet switches | |
Copyright (c) 2011 Suat Özgür. All right reserved. | |
Contributors: | |
- Andre Koehler / info(at)tomate-online(dot)de | |
- Gordeev Andrey Vladimirovich / gordeev(at)openpyro(dot)com | |
- Skineffect / http://forum.ardumote.com/viewtopic.php?f=2&t=46 | |
- Dominik Fischer / dom_fischer(at)web(dot)de | |
- Frank Oltmanns / <first name>.<last name>(at)gmail(dot)com |
NewerOlder