Skip to content

Instantly share code, notes, and snippets.

View Quackdoc's full-sized avatar

Mitchel Stewart Quackdoc

View GitHub Profile
@Quackdoc
Quackdoc / sdl-test.c
Created May 1, 2025 16:40
test translucent window
#include <SDL3/SDL.h>
#include <SDL3/SDL_render.h>
int main(int argc, char* argv[]) {
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not initialize SDL: %s", SDL_GetError());
return 3;
}
SDL_Window* window = SDL_CreateWindow(
"Translucent Window",
@Quackdoc
Quackdoc / serpent-chroot.sh
Last active February 4, 2025 17:56
simple script to start a serpent chroot
#!/bin/bash
mnt="/tmp/serpent"
mkdir -p /tmp/serpent-tmp
mkdir -p /tmp/serpent/tmp
mkdir -p /tmp/serpent/dev
mkdir -p /tmp/serpent/proc
mkdir -p /tmp/serpent/sys
sudo mount -o remount,rw,suid /tmp
@Quackdoc
Quackdoc / mpv.conf
Created January 9, 2025 19:12
updated mpv config
# vim: syntax=config
border = no
### Screen shots ###
screenshot-format=jxl
screenshot-directory=~/Pictures/mpv
screenshot-jxl-distance=1.0
screenshot-tag-colorspace=no
screenshot-high-bit-depth=yes
screenshot-jxl-effort=7
@Quackdoc
Quackdoc / xdg-screen-rec-gstreamer.py
Created July 21, 2024 16:16
record screen with gstreamer
#!/usr/bin/python3
import re
import signal
import dbus
from gi.repository import GLib
from dbus.mainloop.glib import DBusGMainLoop
import gi
gi.require_version('Gst', '1.0')
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
@Quackdoc
Quackdoc / stream.sh
Created October 9, 2023 04:08 — forked from digitalsignalperson/stream.sh
xdp screen cast example, modified to pipe to ffmpeg
mkfifo /tmp/gfifo
./xdp-screen-cast-ffmpeg.py & # or run in another terminal
# Note the gstreamer pipeline
# 'pipewiresrc fd=%d path=%u ! videorate ! video/x-raw,framerate=60/1 ! videoconvert ! filesink location=/tmp/gfifo'
# I specified a 60/1 frameerate. You can do other pre-processing here, or offload it to ffmpeg.
# Encode the stream and pipe to netcat
# note: must specify correct resolution here
# we can now use h264_nvenc, mpegts, and anything else ffmpeg has
@Quackdoc
Quackdoc / motion-blur.xml
Last active September 15, 2023 21:55
olive motion blur try 1
<?xml version="1.0"?>
<olive version="230220">
<nodes version="1">
<node version="1" id="org.olivevideoeditor.Olive.shader" ptr="2641025001424">
<label>unnamed</label>
<input id="enabled_in">
<primary>
<keyframing>0</keyframing>
<standard>
<track>true</track>
@Quackdoc
Quackdoc / apple-m1-cross.meson
Created August 19, 2023 09:18
m1 cross file
[binaries]
c = '/usr/bin/clang'
cpp = '/usr/bin/clang++'
cld = '/usr/bin/ld64'
cppldd = '/usr/bin/ld64'
ar = '/usr/bin/ar'
strip = '/usr/bin/strip'
[properties]
skip_sanity_check = true
@Quackdoc
Quackdoc / mpv-auto.sh
Created August 8, 2023 00:57
MPV compare settings
#!/bin/bash
tonemapping=(
bt.2390
bt.2446a
st2094-40
st2094-10
hable
mobius
reinhard
@Quackdoc
Quackdoc / hlg-bt2446a.xml
Created June 1, 2023 08:17
olive tonemap ported from hdr-toys
<?xml version="1.0"?>
<olive version="230220">
<nodes version="1">
<node version="1" id="org.olivevideoeditor.Olive.displaytransform" ptr="1991839047088">
<input id="enabled_in">
<primary>
<keyframing>0</keyframing>
<standard>
<track>true</track>
</standard>