Skip to content

Instantly share code, notes, and snippets.

View Woynert's full-sized avatar
🦐
Flamingo

Woynert

🦐
Flamingo
View GitHub Profile
@Woynert
Woynert / module_aabb.h
Created April 24, 2026 02:44
module_aabb.h
/*
I was testing for the obvious thing: check if 100% there is collision.
But it's better to check for the opposite: check when there is NO collision.
(Learned that from tsoding)
*/
#ifndef AABB_H
#define AABB_H
#include "raylib.h"
#include "typedef.h"
@Woynert
Woynert / webcam_fiter.sh
Created May 12, 2025 11:23
Webcam fast filters
#!/usr/bin/env bash
# See weffe project for more info
#exec ffmpeg -hide_banner -framerate 30 -i /dev/video1 -filter_complex "[0]split=1[v];[v]drawtext=font='Arial': textfile='./top.txt': x=(w-tw)/2: y=(h-text_h)/6: reload=1: fontsize=80: fontcolor='AntiqueWhite': borderw=4, drawtext=font='Arial': textfile='./bottom.txt':x=(w-tw)/2:y=5*(h-text_h)/6: reload=1: fontsize=120: fontcolor='AntiqueWhite': borderw=4[v];[v]format=yuv420p,fps=30[v]" -map [v] -f v4l2 "/dev/video7"
#exec ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -input_format mjpeg -i /dev/video1 -preset faster -hide_banner -filter_complex "[0]split=1[v];[v]drawtext=font='Arial': textfile='./top.txt': x=(w-tw)/2: y=(h-text_h)/6: reload=1: fontsize=80: fontcolor='AntiqueWhite': borderw=4, drawtext=font='Arial': textfile='./bottom.txt':x=(w-tw)/2:y=5*(h-text_h)/6: reload=1: fontsize=120: fontcolor='AntiqueWhite': borderw=4[v];[v]format=yuv420p,fps=30[v]" -map [v] -f v4l2 "/dev/video7"
#exec ffmpeg -f v4l2 -framerate 30 -video_size 1280x720 -inpu
@Woynert
Woynert / fps_controller.gd
Created April 6, 2024 20:31
fps_controller.gd
extends CharacterBody3D
@export var head: Node3D
const ACC = 0.8
const ACC_AIR = 0.3
const ACC_TURN = ACC * 0.8
const FRICTION = 0.6
const FRICTION_AIR = 0
const JUMP_VELOCITY = 6.5
const GRAVITY = 9.8 * 2
@Woynert
Woynert / godot-export.nix
Last active April 4, 2024 05:04
godot-export.nix
{ project_path ? ./src }:
let
pkgs = import
(builtins.fetchTarball {
# this revision contains blender 4.0.2
# https://hydra.nixos.org/eval/1804905
name = "nixos-23.11-1804905";
url = "https://github.com/nixos/nixpkgs/tarball/bb183e5637b6d48804a3ee0fc5ab38df51122d65";
sha256 = "14zjy9h6z9a7pc9v08zddshm4xh5j3vw321n5d3d4fal8k9as9hm";
@Woynert
Woynert / gen-nav-mesh.gd
Created March 14, 2024 15:37
Godot: Generate navigation mesh from ArrayMeshes recursively
@tool
extends NavigationRegion3D
@export var generate: bool = false:
set(value):
_on_generate()
var _source_nodes: Array[MeshInstance3D] = []
var _final_mesh: ArrayMesh
@Woynert
Woynert / securityPuzzle.js
Last active April 12, 2024 12:30
SecurityPuzzle - Productivity script
// ==UserScript==
// @name Youtube: Security puzzle
// @namespace Violentmonkey Scripts
// @match https://www.youtube.com/
// @match *://*.youtube.com/*
// @match *://*.youtu.be/*
// @grant none
// @version 1.0
// @author woynert
// @description 2/3/2023, 7:30:24 PM