Skip to content

Instantly share code, notes, and snippets.

View TaylorBurnham's full-sized avatar

Taylor Burnham TaylorBurnham

View GitHub Profile
#!/bin/bash
wget -O - https://packages.icinga.com/icinga.key | apt-key add -
DIST=$(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release); \
echo "deb http://packages.icinga.com/debian icinga-${DIST} main" > \
/etc/apt/sources.list.d/${DIST}-icinga.list
echo "deb-src http://packages.icinga.com/debian icinga-${DIST} main" >> \
/etc/apt/sources.list.d/${DIST}-icinga.list
sudo apt-get install icinga2 -yy
@TaylorBurnham
TaylorBurnham / secure-znc.conf
Last active April 1, 2018 14:55
Securing ZNC Interface
# Assumptions are you already use letsencrypt and have dhparam generated
# Configure ZNC to listen on IPv4 and only IRC + SSL for client connections
<Listener listener0>
AllowIRC = false
AllowWeb = true
IPv4 = true
IPv6 = false
Port = 5001
SSL = true
URIPrefix = /
@TaylorBurnham
TaylorBurnham / _Telegraf + InfluxDB + Airthings + Python.md
Created October 18, 2020 18:15
Telegraf + InfluxDB + Airthings + Python

Telegraf + InfluxDB + Airthings + Python

This is a really quick and dirty way to pull data via BLE on my Raspbery Pi and toss it into InfluxDB. This only supports the WavePlus. If Airthings wants to send me free stuff I will extend it.

I quickly rewrote my script here to support this and eventually I will extend it.

https://github.com/TaylorBurnham/AirThings

Example Output

@TaylorBurnham
TaylorBurnham / _Intro.md
Created February 1, 2021 14:08
Timelapse using ffmpeg and glob patterns

This is a quick and dirty script to create a timelapse using ffmpeg. I have a systemd timer that takes a snapshots of all my cameras every 5 minutes and dumps them into a folder, which allows me to make some interesting time lapses.

The gist of the script is:

  • Uses find to locate the first file in the directory, and then ffprobe to get the resolution of the image.
  • Uses glob patterns to build a list of all files and runs it through ffmpeg.
  • filter_complex is used to hold the last frame for 2 seconds, which can be adjusted with the $FFMPEG_HOLD variable.

Syntax is below:

@TaylorBurnham
TaylorBurnham / _Intro.md
Last active January 15, 2023 16:20
Unifi Video Rsync to NAS with remux

I've made some changes to this to improve performance. Running prepare.sh takes too long on my CloudKey Gen 2, so I installed the qemu libraries to run it on my desktop where I will be extracting videos. The author of the remux utility has instructions for how to do this on the README.

I'm running seven total cameras and will synchronize all of the data to my Synology NAS, and from there I'll run the remux utility to extract videos. This is still a work in progress but I will eventually have all of this documented under my Unifi Protect Extract repository.

Requirements:

  • A passwordless SSH key generated on the user running it.
  • sync.sh saved to the user's home.

Fill out the variables in the sync.sh script and run it. It will only pull the standard ubv files that are written by Protect and skip timelapse and others. I found it easier to just synchronize the whole hierarchy than ha

@TaylorBurnham
TaylorBurnham / README.md
Last active April 27, 2021 15:25
Awesome Inclusivity

Why not do it right? This has been moved to Awesome Inclusivity.

Awesome Inclusivity

Possibly the start of something wonderful, and also a potential duplication of effort that the Awesome Diversity repo is up to.

Credits to #allies in hangops for starting this list.

Inclusive Language

@TaylorBurnham
TaylorBurnham / tarjoin.sh
Created May 10, 2021 12:25
Tar a directory with progress using pv and split it.
#!/bin/bash
INPUT=$1
cat "${INPUT}*.gz_*" | gzip - -d | tar xfv -
@TaylorBurnham
TaylorBurnham / _About.md
Created August 7, 2021 01:03
Standalone Frigate configuration with Mosquitto for an Intel NUC

This was set up on an Intel NUC8i5 with a Coral TPU M2 key. If you don't have one you should get it otherwise real time object detection will be a lesson in futility.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@TaylorBurnham
TaylorBurnham / Heart Rate to Parquet.ipynb
Created November 29, 2021 11:55
Fitbit Heart Rate data to Parquet
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.