Skip to content

Instantly share code, notes, and snippets.

View Michael-Brooks's full-sized avatar
🤓
Geeking out

Michael Brooks Michael-Brooks

🤓
Geeking out
View GitHub Profile
@Michael-Brooks
Michael-Brooks / .env.example
Last active November 5, 2026 11:10
prores2hevc: watch a folder and GPU-encode ProRes/DNx renders to H.265 with VAAPI (Linux, systemd)
# prores2hevc settings
#
# Copy this file to .env in the same folder as prores2hevc.py, then edit it:
# cp .env.example .env
# nano .env
#
# Every setting is optional; delete or comment out a line to use its default.
# Variables set in the real environment override this file.
# Folder to watch for new renders (top level only). Encodes go to <folder>/Encoded/.
@Michael-Brooks
Michael-Brooks / README.md
Created November 5, 2026 10:24
youtube-upload: watch a folder and auto-upload new renders to YouTube (Linux, systemd, YouTube Data API)

youtube-upload: automatically upload new renders to YouTube (Linux)

This watches a folder and uploads every new video file to YouTube through the YouTube Data API v3. It's useful on Linux, where DaVinci Resolve has no built-in YouTube upload, but it works with any editor that renders to a folder.

What it does:

  • It watches only the top level of one folder. Subfolders are ignored, so keep caches and recordings there.
  • It waits until a file has stopped changing and no process has it open, then uploads it with your defaults (private by default).
  • It runs ffprobe first and skips broken renders, such as a failed render where the video is much shorter than the audio.
  • Intermediate codecs (ProRes, DNxHD, CineForm, FFV1 and so on) are re-encoded to H.265 on the GPU with VAAPI into YouTube encodes/. The encode is fully decoded to check it before upload. The intermediate is deleted only after a successful upload.
@Michael-Brooks
Michael-Brooks / CasterLabs.md
Last active December 5, 2023 08:27
CasterLabs Variable sheet

!hey

Will display something like "Hey username! Today's stream is stream_title"

Hey ${event.sender.username}! Today's stream is ${Koi.streamStates[event.streamer.platform].title}

@Michael-Brooks
Michael-Brooks / Dockerfile
Created March 17, 2022 16:51
Dockerfile specifically for setting up PHP and Apache with Azure applications
FROM php:7.4-apache
COPY . /var/www/html
WORKDIR /var/www/html
RUN docker-php-ext-install mysqli pdo pdo_mysql
EXPOSE 80 443
@Michael-Brooks
Michael-Brooks / vd
Created November 26, 2019 09:29
Some vagrant commands
cd ~/homestead && vagrant halt

Keybase proof

I hereby claim:

  • I am michael-brooks on github.
  • I am michaelbrooks (https://keybase.io/michaelbrooks) on keybase.
  • I have a public key ASC0pUdFLdzQByyxFmsFFkEoJMOhR76PGFB3bv7Mi_lEIgo

To claim this, I am signing this object:

server {
listen 80;
server_name DEFAULT_SERVER_NAME;
return 301 https://DOMAINNAME$request_uri$is_args$args;
}
server {
listen 80;
server_name *.DOMAINNAME;
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/centos-6.7"
@Michael-Brooks
Michael-Brooks / passwordValidation.php
Last active August 18, 2026 15:19
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
<?php
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
* Password is required with a minimum of 6 characters
* Should have at least 1 lowercase AND 1 uppercase AND 1 number
*/
$rules = [
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
];