Skip to content

Instantly share code, notes, and snippets.

View HoughIO's full-sized avatar
🖥️
Hacking'

Graham Hough HoughIO

🖥️
Hacking'
View GitHub Profile
@HoughIO
HoughIO / fix-kittycam.sh
Created March 11, 2026 04:21
Kittycam fix - clean names
#!/bin/bash
# Quick fix - restore working names without fancy quotes
sudo tee /opt/kittycam/web/index.html > /dev/null << 'HTMLEOF'
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, viewport-fit=cover">
<meta name="theme-color" content="#0a0a0a">
@HoughIO
HoughIO / update-kittycam.sh
Last active March 11, 2026 06:23
KittyCam Trading Cards Update
#!/bin/bash
# KittyCam Trading Cards Update Script
set -e
cd /opt/kittycam/web
echo "🎴 Downloading trading cards..."
curl -L "https://tmpfiles.org/dl/28383140/trading-cards-bundle.zip" -o /tmp/tc.zip
echo "📦 Extracting..."
sudo unzip -o /tmp/tc.zip -d /opt/kittycam/web/
@HoughIO
HoughIO / trading-cards.html
Last active March 11, 2026 06:41
Trading cards with back button
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pet Trading Cards</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
@HoughIO
HoughIO / upgrade-themes-v2.sh
Created March 11, 2026 16:45
Kevin & Todd Cam - Themes + Name Fix
#!/bin/bash
# Kevin & Todd Cam - Themes + Name Fix Update
# Run on Pi: bash upgrade-themes-v2.sh
echo "🐱 Upgrading with themes + name fix..."
# Update the index.html
sudo tee /opt/kittycam/web/index.html > /dev/null << 'HTMLEOF'
<!DOCTYPE html>
<html lang="en">
@HoughIO
HoughIO / upgrade-themes-v3.sh
Created March 11, 2026 16:51
Kevin & Todd Cam v3 - HD in settings, fixed colors
#!/bin/bash
# Kevin & Todd Cam - Themes v3 (HD in settings, fixed colors)
# Run on Pi: bash upgrade-themes-v3.sh
echo "🐱 Upgrading..."
sudo tee /opt/kittycam/web/index.html > /dev/null << 'HTMLEOF'
<!DOCTYPE html>
<html lang="en">
<head>
@HoughIO
HoughIO / upgrade-gacha.sh
Created March 11, 2026 16:59
KittyCam Gacha Server
#!/bin/bash
# Kevin & Todd Cam - Gacha System
# Run on Pi: bash upgrade-gacha.sh
echo "🎰 Installing gacha system..."
# Install Flask if needed
pip3 install flask --quiet 2>/dev/null || sudo pip3 install flask --quiet
# Create gacha server
@HoughIO
HoughIO / upgrade-gacha-ui.sh
Created March 11, 2026 16:59
KittyCam Gacha UI
#!/bin/bash
# Kevin & Todd Cam - Gacha UI
# Run on Pi AFTER upgrade-gacha.sh
echo "🎴 Installing gacha UI..."
sudo tee /opt/kittycam/web/trading-cards.html > /dev/null << 'HTMLEOF'
<!DOCTYPE html>
<html lang="en">
<head>
@HoughIO
HoughIO / upgrade-daily-report.sh
Created March 11, 2026 17:18
KittyCam Daily Viewing Report
#!/bin/bash
# Kevin & Todd Cam - Daily Viewing Report
# Run on Pi
echo "📊 Installing daily viewing report..."
# Update gacha server to include view tracking
sudo tee /opt/kittycam/gacha_server.py > /dev/null << 'PYEOF'
#!/usr/bin/env python3
from flask import Flask, jsonify, request
@HoughIO
HoughIO / upgrade-daily-report-ui.sh
Created March 11, 2026 17:19
KittyCam Daily Report UI
#!/bin/bash
# Add view tracking to the main page
# Run AFTER upgrade-daily-report.sh
echo "📊 Adding view tracking to frontend..."
# Add view logging to the index.html init function
sudo sed -i 's|async function init(){|async function init(){\n // Log view\n fetch("/api/log-view", {method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({page:"live"})}).catch(()=>{});|' /opt/kittycam/web/index.html
echo "✅ View tracking added!"
@HoughIO
HoughIO / kittycam.nginx.conf
Created March 11, 2026 17:22
KittyCam nginx config
server {
listen 8080;
server_name _;
root /opt/kittycam/web;
index index.html;
proxy_buffering off;
proxy_request_buffering off;
location = /auth {