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 | |
# | |
# Export Frigate video recordings to a remote location using Rclone. | |
# | |
# Prerequisites: | |
# 1. Frigate is configured to save recordings | |
# 2. Rclone is configured to read from / write to a remote server | |
# | |
# This script does the following each time it runs: |
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
import json | |
import re | |
from mitmproxy import http | |
url_pattern = re.compile(r"^.*\.nvidiagrid.net/v2/session") | |
user_agent_pattern = re.compile(r"(Mozilla\/[\d\.]+) \(.+?\)") | |
def request(flow: http.HTTPFlow) -> None: | |
# Check if the request matches the regex pattern | |
if url_pattern.match(flow.request.pretty_url): |
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
// @ts-check | |
const fsp = require('node:fs/promises'); | |
const {basename, join} = require('path'); | |
const INPUT_FILE_PREFIX = 'PRDR'; | |
const OUTPUT_FILE_SUFFIX = '.jpg'; | |
const BUFSIZE = 4192; // 4 KB | |
const usage = () => { | |
const {argv} = process; |