Skip to content

Instantly share code, notes, and snippets.

View Cdaprod's full-sized avatar
🫠
Learn something new everyday!

David Cdaprod

🫠
Learn something new everyday!
View GitHub Profile
@Cdaprod
Cdaprod / README.md
Last active July 24, 2025 19:09
Protect Your Code: This workflow ensures every file you create gets proper protection while being flexible enough for different business models (proprietary vs. dual licensing for your big projects).​​​​​​​​​​​​​​​​

Here’s a complete workflow to automatically apply your own protections to files via CI Workflow.

How to Use This Workflow

1. Initial Setup

# Save the script as protect-files.sh
chmod +x protect-files.sh
@Cdaprod
Cdaprod / dce-v1.sh
Last active July 24, 2025 17:58
Docker Exec Selector & Functioning Alias
##### dce example output #####
## Select a service:
## 1) video-api
## 2) video-web
## ?# 1
## Connecting to service: video-api
##############################
unalias dce
# V1: Docker Compose Exec with built-in service selectiondce() {
@Cdaprod
Cdaprod / obs-scripts_move_recording_to_unc.py
Created July 17, 2025 18:09
• Every time the Stream Deck (or any other trigger) stops a recording, the finished file is moved to your UNC share \\cda-desktop\b\Video\_INCOMING\sources\OBS-NDI-GARAGE. • If the share isn’t currently mapped, the script attempts a one-shot net use so it works even when OBS is running elevated. • All status / errors are written to the normal O…
"""
Move each finished recording to a UNC share.
OBS ▶ Tools ▸ Scripts ▸ + ▸ select this file
---------------------------------------------------------
• Works with Simple or Advanced output mode.
• No change to your regular Recording Path is required;
in fact, keeping it on a local SSD makes the initial write faster.
---------------------------------------------------------
Tested with Python 3.11 + OBS 30.
@Cdaprod
Cdaprod / .md
Created July 4, 2025 16:59
Raspberry Pi 5 - VideoCoreVII GPU - Configuration Support

Updating Drivers for Ubuntu on Raspberry Pi 5 to support the VideoCore VII GPU

✅ GPU Support Overview

  1. Mesa / V3D (OpenGL ES & Vulkan) drivers included, thanks to upstream support merged since Mesa 23.3 .
  2. Initial desktop installs (e.g., Ubuntu 24.04/24.10) sometimes exhibit slow graphics, GNOME animation lag, even green-screen artifacts—likely due to incomplete or mismatched Mesa stacks .
  3. Community feedback highlights that while OpenGL ES/Vulkan are available, you may need to install or update Mesa packages manually (mesa-vulkan-drivers, etc.) .

To Update Drivers:

@Cdaprod
Cdaprod / docker-blender-all-in-one.sh
Created June 30, 2025 22:00
Blender-in-Docker “Factory-Startup” one-liner that procedurally creates a scene (plane textured with a phone-screen video, sun light, animated camera with Bézier easing), then headlessly renders the result to an H.264 MP4—no pre-existing .blend required. Ideal as a reproducible, copy-paste gist for anyone needing quick 3-D perspective moves on v…
docker run --rm -i -v "$PWD":/w linuxserver/blender:4.4.3 \
blender --factory-startup -b --python - <<'PY'
import bpy, math, os
vid = "/w/phone_screen.mp4" # <<< your vertical video
assert os.path.exists(vid), "Video missing"
# ------------------------------------------------------ build objects
bpy.ops.mesh.primitive_plane_add(size=2)
plane = bpy.context.object
@Cdaprod
Cdaprod / two_cam_auto_vfx.py
Created June 30, 2025 18:04
Dual camera (hero+witness) tracking system for VFX with BPY in blender Python scripting.
# /scripts/two_cam_auto_vfx.py
"""
Two-Camera VFX Auto-Rig -- Audio-Sync, Insta360-aware Edition
─────────────────────────────────────────────────────────────────────────────
• Imports hero + witness plates
• Automatically aligns them via audio-waveform cross-correlation
• Auto-detects FPS, resolution & 360⇆rectilinear
• Injects missing XMP → always pano-aware
• Tracks witness plate on a seeded grid, iteratively cleans & re-solves
• Builds RigRoot ▶ WitnessCam ▶ HeroCam hierarchy
@Cdaprod
Cdaprod / Ndi-Moviepy.md
Created June 16, 2025 16:22
NDI+Moviepy Notebook

NDI Stream to MoviePy Professional Video Processing

A comprehensive system for capturing NDI streams, recording them, and processing with MoviePy for professional video production workflows.

📦 Cell 1: Install Dependencies

# Install required packages
!pip install ndi-python opencv-python ipywidgets moviepy numpy pillow
# Note: Ensure NDI SDK/Runtime is installed on your system
@Cdaprod
Cdaprod / run-llama-cuda-server.ps1
Created June 15, 2025 19:38
Running dockerized `ghcr.io/ggml-org/llama.cpp` CUDA Server
docker run --gpus all --restart unless-stopped -d `
-v "B:\Models:/models" `
-p 8000:8000 `
ghcr.io/ggml-org/llama.cpp:server-cuda `
-m /models/llama-2-7b-chat.Q4_K_M.gguf `
--port 8000 --host 0.0.0.0 -n 512 --n-gpu-layers 35

🎬 CDAProd — NodeVideo Expressions Guide

⚙️ Built by David Cannan — DevOps Engineer & AI Solutions Architect
💡 Self-made | #devopsdad | #tripletdad | #hacktheplanet

GitHub - Cdaprod Blog LinkedIn

@Cdaprod
Cdaprod / Cinematic_Text_Expression.md
Last active June 11, 2025 17:36
Mini script - Motion Expression Fx for NodeVideo

Simple Cinematic Example for Text

fadeInDuration = 1.5
delay = (index - 1) * 0.2
t = time - (thisLayer.startTime + delay)

progress = clamp(t / fadeInDuration, 0, 1)
easeT = ease(progress, 0, 1)