Skip to content

Instantly share code, notes, and snippets.

View coderofsalvation's full-sized avatar

Coder of Salvation / Leon van Kammen coderofsalvation

View GitHub Profile
@coderofsalvation
coderofsalvation / TAPO-SDCARD-MERGE-MP4-README.md
Last active August 19, 2025 14:37
TAPO camera merge SD-card files to one MP4 #fast #nocloud #ffmpeg

TAPO camera's are pretty neat for hasslefree filming of events (splashproof, wide angle, scheduled recording, great auto-exposure-sharpening). However, due to limited memory/cpu you'll end up with segmented mp4 files on your SD-card. The app does not help either (*)

Solution with the shellscript below you can combine all separate TAPO videofiles to one file:

$ cd /run/media/yourTAPOSDcard
$ find $(pwd)/*tp000{41..70}.mp4 | ffmpeg.concat /tmp/merged.mp4
@coderofsalvation
coderofsalvation / midimonitor
Created August 3, 2025 20:34
ALSA midimonitor script to facilitate qtractor & sunvox for entering MSB/LSB/PC values.
#!/bin/sh
#
# usage:
#
# [code]$ midimonitor $(aseqdump -l | awk '/MYCONTROLLER/ { print $1 }')
# 32:0 Control change 0, controller 72, value 112, CCEEXXYY = C8007000
# 32:0 Control change 4, controller 72, value 112, CCEEXXYY = C8007000
# 32:0 Control change 0, controller 0, value 120, CCEEXXYY = 80007800
# 32:0 Control change 0, controller 32, value 64, CCEEXXYY = A0004000
# --- Bank: 15424

attempt to compile PlayerPro on Linux:

$ git clone https://git.code.sf.net/p/playerpro/gitcode
$ cd playerpro-gitcode
$ git reset 6e755d24 --hard # optional, but this is the latest commit afaik
$ git apply diff.patch
$ mkdir build
$ cd build
$ cmake ..
@coderofsalvation
coderofsalvation / watch.sh
Last active February 14, 2025 09:23
shellscript which forwards filesystem inotify events to webpage [inotify-tools + websocat]
#!/bin/sh
echo '
<h1>/tmp watcher</h1>
<pre>
try: $ touch /tmp/FOO
$ chmod +x /tmp/FOO
$ xattr -s foo -V bar /tmp/FOO
</pre>
diff --git a/src/milkyplay/PlayerBase.h b/src/milkyplay/PlayerBase.h
index 5f48517..b14013b 100644
--- a/src/milkyplay/PlayerBase.h
+++ b/src/milkyplay/PlayerBase.h
@@ -196,7 +196,9 @@ public:
virtual mp_sint32 adjustFrequency(mp_uint32 frequency);
virtual mp_sint32 setBufferSize(mp_uint32 bufferSize);
-
+
@coderofsalvation
coderofsalvation / .bashrc
Last active December 6, 2024 13:37
autoenv/direnv in one shell function
# minimalist version of https://github.com/hyperupcall/autoenv
cd(){
test -f .env.leave && source .env.leave # cleanup environment
builtin cd ${1:+"$@"} && {
test -f .env && source .env # setup environment / run scripts e.g.
test -d .git && git remote -v # react to implicit metadata
ls # list directories
}
}
@coderofsalvation
coderofsalvation / spec.md
Last active September 25, 2024 10:50
SuperShape MimeType + FileType Specification 0.1

3D Supershape FileFormat

  • fileformat: textual comma-separated floats
  • file extension: .ss3d ss2d
  • mimetype: model/supershape3D, model/supershape2D


render of values 7,1,1,20.45,-0.33,-3.54,6,1,1,-0.96,4.46,0.52,200

@coderofsalvation
coderofsalvation / multiversion-nix-package.md
Created September 16, 2024 08:45
run multiple version of nix package

flake

$ nix run --extra-experimental-features flakes blender-bin#blender_4_0

channels

$ nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable
@coderofsalvation
coderofsalvation / LDBrain.js
Created June 6, 2024 10:02
superfast cli/speech completion via levensteihn distance #NOLLM
function LDbrain(opts) {
const trainingData = [];
function trainKeyValue(key, properties) {
trainingData.push({ k: key, ...properties });
}
function train(data) {
for (let k in data) {
// wrap string in functions, so they can still be lazily evaluated with template vars
@coderofsalvation
coderofsalvation / URI.gd
Last active May 17, 2024 08:02
URI.gd: a Godot URL Parser #gdscript #openweb #https (document.location js-like object for Godot)
# URI/URL parser
#
# author: Leon van Kammen (coderofsalvation)
# SPDX-License-Identifier: MIT
# date: 16-05-2024
# comments: https://gist.github.com/coderofsalvation/b2b111a2631fbdc8e76d6cab3bea8f17
#
# Participants of the Open Web think & communicate in URI's: now with Godot (>=4) too!
# This class will not win the beauty contest related to RFC 3986, but here goes:
#