Skip to content

Instantly share code, notes, and snippets.

View a9udn9u's full-sized avatar

Quan Gan a9udn9u

View GitHub Profile
@a9udn9u
a9udn9u / export-frigate-recordings.sh
Last active December 6, 2024 06:27
Export Frigate Recordings
#!/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:
@a9udn9u
a9udn9u / geforce-now-resolution-interceptor.py
Last active May 26, 2025 15:44
GeForce Now 1440P on Linux Chrome
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):
@a9udn9u
a9udn9u / rdr2-photo-converter.js
Created December 20, 2023 20:12
Convert RDR 2 photo mode file to JPG
// @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;