Skip to content

Instantly share code, notes, and snippets.

@kylefmohr
kylefmohr / prox-certs.sh
Last active September 12, 2025 18:38
Auto-renew Proxmox's Web UI HTTPS certificate using Tailscale and Tailnets
#!/bin/bash
set -e # Exit immediately if a command exits with a non-zero status.
##
# This script automates renewing the Proxmox web UI TLS certificate
# using Tailscale's built-in HTTPS certificate feature.
# It is recommended to run this script using a cronjob, I'm using
# `0 2 1 */3 * /path/to/my/prox-certs.sh`
# in my crontab to run this every three months (the length of the certificate validity)
# v4: Checks for and installs jq if missing.
@kylefmohr
kylefmohr / stream.sh
Created May 10, 2025 17:02
Re-encoding a troublesome RTSP stream to YouTube Live's RTMP via ffmpeg
#!/bin/bash
ffmpeg \
-hide_banner \
-thread_queue_size 512 \
-fflags +genpts+discardcorrupt+igndts \
-err_detect ignore_err \
-use_wallclock_as_timestamps 1 \
-rtsp_transport tcp \
-stimeout 30000000 \
-re \
@kylefmohr
kylefmohr / script.js
Last active April 16, 2025 21:53
GreaseMonkey/TamperMonkey Userscript to bypass the NYTimes paywall (and others) by automatically redirecting to archive.is
// ==UserScript==
// @name NYTimes to Archive.is Redirector
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Automatically redirects nytimes.com pages (and others) to archive.is/newest/<original_url>
// @author Kyle
// @match *://*.nytimes.com/*
// @match *://*.rollingstone.com/*
// @match *://*.wsj.com/*
// @match *://*.theguardian.com/*
@kylefmohr
kylefmohr / userscript.js
Created December 18, 2024 14:24
Shodan Bluesky domain lookup
// ==UserScript==
// @name Bsky Domain History Lookup (Console Output)
// @namespace http://your-namespace.com
// @version 1.2
// @description Looks up the history of custom domains on bsky.app profiles via Shodan and logs JSON to console.
// @author You
// @match https://bsky.app/profile/*
// @grant GM_xmlhttpRequest
// @connect api.shodan.io
// ==/UserScript==
@kylefmohr
kylefmohr / WisDOT_API_Response.json
Created December 12, 2024 16:59
List of all Wisconsin DOT Public Traffic Cameras (as of 12/12/2024)
{
"draw": 0,
"recordsTotal": 468,
"recordsFiltered": 468,
"data": [
{
"DT_RowId": "1458--7",
"tooltipUrl": "/tooltip/Cameras/1458--7?lang=%7Blang%7D&noCss=true",
"agencyLogoEnabled": false,
"visible": 1,
@kylefmohr
kylefmohr / tenveo.cpp
Created October 2, 2024 00:49
Tenveo PTZ Remote Control IR Infrared Codes for Arduino/ESP32
#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
IRsend irsend(4);
void sendAll()
{
/*
Automatically Generated by AnalysIR - Batch Export Utility
@kylefmohr
kylefmohr / ir_nec_onforu_rgb_flood_lights.cpp
Created December 31, 2023 01:43
Infrared Remote Codes for "Onforu 4 Pack RGB LED Flood Light 500W Equivalent, DIY Color Changing Stage Lights with Remote, IP66 Indoor Outdoor Land"scape Floor Strobe Light
/*
See image here for how I mapped the numbers to the buttons https://i.imgur.com/TOTne17.png
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: kyle
Session History: Big Honkin Lights Remote Codes
Type : Key : Value : Bits : Carrier Frequency (kHz)
0 : NEC : 44 : 00FFE01F : 32 : 0
1 : NEC : 43 : 00FF609F : 32 : 0
2 : NEC : 42 : 00FFA05F : 32 : 24
@kylefmohr
kylefmohr / UNICROWN_DreamColor_5050_RGB_IR_Codes.cpp
Created December 25, 2023 03:31
Remote Control Infrared Codes for UNICROWN DreamColor 5050 RGB LED Strip Lights Remote Control
/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: kyle
Session History: Remote Control Infrared Codes for UNICROWN DreamColor 5050 RGB LED Strip Lights Remote Control
Type : Key : Value : Bits : Carrier Frequency (kHz)
0 : NEC : 4 : 00FF28D7 : 32 : 40
1 : NEC : 3 : 00FFC837 : 32 : 40
2 : NEC : 2 : 00FF8877 : 32 : 40
3 : NEC : 1 : 00FF08F7 : 32 : 31
4 : NEC : 8 Hours : 00FF02FD : 32 : 40
@kylefmohr
kylefmohr / Tatazone_RGB_COB_LEDs_Remote_IR_Codes.cpp
Created December 25, 2023 03:23
Remote Control Infrared Codes for "Tatazone 16.4ft Bluetooth RGB COB Led Strip Lights with Remote"
/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: kyle
Session History: Tatazone 16.4ft Bluetooth RGB COB Led Strip Lights with Remote
Type : Key : Value : Bits : Carrier Frequency (kHz)
0 : NEC : Timer2 : D564DA25 : 32 : 0
1 : NEC : Timer1 : D56404FB : 32 : 0
2 : NEC : Music2 : D564DC23 : 32 : 0
3 : NEC : Music1 : D564D22D : 32 : 0
4 : NEC : Christmas : D5649867 : 32 : 0
@kylefmohr
kylefmohr / Shield_Intents.MD
Created August 15, 2023 17:02 — forked from mcfrojd/Shield_Intents.MD
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-