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
#
# autoenv alias for 'cd' (basically conda/nix-shell/virtual-env triggered by cd)
#
# usage: put this in your .bashrc and see magic happening when 'cd'-ing to directories
#
cd(){
if [[ ! "$(readlink -f "$1")" =~ ^"$(pwd)" ]]; then # if not cd'ing to a subdir
test -f .env.leave && source .env.leave # cleanup environment
fi
bl_info = {
"name": "Environmake",
"author": "Albert Bozesan and GPT-4",
"version": (0, 2),
"blender": (4, 0, 0),
"location": "View3D > N Panel > Environmake",
"description": "Generate a 360 sphere with displacement from equirectangular textures!",
"warning": "",
"doc_url": "",
"category": "3D View",
@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