Skip to content

Instantly share code, notes, and snippets.

View jasontucker's full-sized avatar

Jason Tucker jasontucker

View GitHub Profile
// --- GLOBAL CONFIGURATION ---
var CACHE_DURATION_DAYS = 7;
var VIDEO_DURATION_THRESHOLD = 120; // 2 minutes
// NOTE: UPDATE THESE WITH YOUR ACTUAL IDs
var PLAYLIST_ID = 'ADD YOUR ID HERE';
var SPREADSHEET_ID = 'THE SPREADSHEET ID';
var CHANNEL_IDS = [
'UCEJM4kRM01cY-2NeJ4-3nbw', 'UCZkGmgbBziqGCYI3x9hVQPg', 'UC5OdB-sGz9atv-tJINwWOTg',
'UCtf6aq_atnqF6shEam6m1sQ', 'UCsphzld6v6ghCl_RyvihNgA', 'UC4ijq8Cg-8zQKx8OH12dUSw',
@jasontucker
jasontucker / doorbell_message.yaml
Created September 29, 2025 17:23
Home Assistant - Update Doorbell with Day-Specific Message at 1:10am
alias: Update Doorbell with Day-Specific Message at 1:10am
triggers:
- at: "00:01:10"
trigger: time
actions:
- choose:
- conditions:
- condition: or
conditions:
- condition: state
@jasontucker
jasontucker / generate-server-snapshot.sh
Created September 7, 2025 19:51
Generate server snapshot + WikiDocs pages (Unraid)
#!/bin/bash
# =======================================
# Generate server snapshot + WikiDocs pages (Unraid)
# - Standard pages + per-disk pages (folder per disk with content.md)
# - Disks inventory (Active + Previously Active) with clean dates (M/D/YYYY)
# - Disk age (SMART POH), tenure, manufacture date (best-effort)
# - Per-disk pages include breadcrumb
# - Capacity parsing fixed (no "\1")
# - Suggestions page: scores disks + CPU section
# - Hardware page: CPU sensors + GPU section using vendor tools (GPU Statistics plugin parity)
views:
- title: Home
sections:
- type: grid
cards:
- type: heading
heading_style: title
heading: Driveway
- type: custom:advanced-camera-card
cameras:
alias: Backyard PTZ Control
description: ""
triggers:
- trigger: state
entity_id:
- input_button.backyard_ptz_view_home
to: null
id: Home
- trigger: state
entity_id:
#!/bin/bash
NVR_ADDRESS="https://$1"
NVR_USERNAME="$2"
PASSWORD="$3"
CAMERA_ID="$4"
PRESET_NUMBER="$5"
echo "Controlling camera with ID: $CAMERA_ID and PTZ Preset Number: $PRESET_NUMBER"
COOKIE_TEMP=$(mktemp)
HEADERS_TEMP=$(mktemp)
function cleanup {
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/brands.min.css" integrity="sha512-DJLNx+VLY4aEiEQFjiawXaiceujj5GA7lIY8CHCIGQCBPfsEG0nGz1edb4Jvw1LR7q031zS5PpPqFuPA8ihlRA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>
.gh-button {display:none;}
.gh-portal-triggerbtn-wrapper {display:none;}
.gh-form {display:none;}
.gh-portal-triggerbtn-iframe{display:none;}
:where(.nav, .gh-head-menu) .nav-instagram a,
@jasontucker
jasontucker / ha-unifi-doorbell-message.yaml
Created November 9, 2024 19:50
Calendar based Dynamic Doorbell Message for Ubiquiti Unifi Doorbell using Home Assistant
# automations.yaml
alias: "Update Doorbell with Day-Specific Message at 4:10am"
trigger:
- platform: time
at: "00:04:10" # Run daily at midnight
action:
- choose:
- conditions:
- condition: or
# automations.yaml
# Update Unifi Doorbell with Day-Specific Message in Home Asssistant
# pulling data from build in calendar and "home calendar" that has custom events listed in it.
# This only works if you have alreadys set these messages in the doorbell as a custom message.
alias: "Update Doorbell with Day-Specific Message"
trigger:
- platform: time
at: "00:00:00" # Run daily at midnight
action:
@jasontucker
jasontucker / update-youtube-playlists.py
Last active July 24, 2024 18:05
with pushover support
#!/usr/bin/env python3
import os
import pickle
import requests
import google.auth.transport.requests
from google.oauth2.credentials import Credentials
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from datetime import datetime, timedelta