Skip to content

Instantly share code, notes, and snippets.

View LukeLambert's full-sized avatar

Luke Lambert LukeLambert

View GitHub Profile
@LukeLambert
LukeLambert / uvcsnapshot.py
Last active May 23, 2022 14:01
A quick-and-dirty script to grab a JPEG snapshot from a Ubiquiti camera at a specified interval.
#!/usr/bin/env python
"""Grab a JPEG snapshot from a Ubiquiti camera at a specified interval.
Usage: python uvcsnapshot.py -i INTERVAL -c CAMERA -p PASSWORD -o OUTPUT
Required arguments:
-i interval in seconds
-c camera IP address
-p camera password
-o path to output directory
@LukeLambert
LukeLambert / proxyable-tinypilot.conf
Last active April 10, 2024 23:02
An nginx config to make Tinypilot work with reverse proxies like Traefik, Caddy, Cloudflare Tunnel, ngrok, etc. Updates to Tinypilot should not delete or overwrite this file.
# Save this file as /etc/nginx/sites-enabled/proxyable-tinypilot.conf
# Restart nginx: service nginx restart
# Point your reverse proxy to 127.0.0.1:8899
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
# scheme used to connect to this server
map $http_x_forwarded_proto $proxy_x_forwarded_proto {
default $http_x_forwarded_proto;
'' $scheme;
}