Skip to content

Instantly share code, notes, and snippets.

"""Add a PlayerMode node as first child of root to story quest scenes.
For each scene in scenes/quests/story_quests/ that has a Player instance
(uid iu2q66clupc6), this script:
- Adds an ext_resource for PlayerMode.gd
- Inserts a PlayerMode node as first child of the root
- Sets the mode based on the Player node's existing mode property
(0=COZY default, 1=FIGHTING, 2=HOOKING)
"""
@manuq
manuq / gist:c9870071e23afd2ef8e77f463949389f
Created March 16, 2026 20:05
add_player_mode_to_scenes.py
"""Add a PlayerMode node as first child of root to story quest scenes.
For each scene in scenes/quests/story_quests/ that has a Player instance
(uid iu2q66clupc6), this script:
- Adds an ext_resource for PlayerMode.gd
- Inserts a PlayerMode node as first child of the root
- Sets the mode based on the Player node's existing mode property
(0=COZY default, 1=FIGHTING, 2=HOOKING)
"""
--[[
Aseprite script to export all layers as sprite sheets.
]]
local spr = app.activeSprite
if not spr then
return print('No active sprite')
@manuq
manuq / ventilastation-setup.sh
Created November 12, 2025 11:23
Ventilastation setup
toolbox create --image quay.io/toolbx/ubuntu-toolbox:24.04
toolbox enter ubuntu-toolbox-24.04
sudo apt update
sudo apt install micropython python3.12-venv ffmpeg libglu1-mesa
git clone https://github.com/ventilastation/vsdk
cd vsdk
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
./vs-emu.sh
@manuq
manuq / eos-daily-report.py
Created February 3, 2021 16:27
Send daily report to Slack.
#!/usr/bin/env python3
"""
Usage
-----
Change the channel ID, specify the slackUserToken environment
variable, then pipe the report through this script.
#!/bin/bash
# bash multi flock
#
# allow 3 instances of a bash function running at the same time
run_instance() {
(
flock -n 99 || return 1
echo "starting instance $@..."
###############################################################################
#
# Bash helper functions for logging.
#
# Inspired in Python logging. Ready to source it in your bash script.
# It can redirect all the output to a file and also redirect all the
# trace to another file, which is useful for debugging.
#
# Usage: see how to use it in the test at the bottom.
#
#!/usr/bin/ruby
# Utility for Puppet that outputs orphaned resources. Orphaned are
# resources that where at one point managed by Puppet, but they no
# longer are.
#
# We need to require Puppet because deserializing the report produces
# Puppet objects.
<!DOCTYPE html>
<html lang="en">
<head>
<title>three.js canvas - geometry - cube</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #f0f0f0;
from math import sin, cos
from random import random
size(900,200)
speed(30)
def setup():
global cnt
cnt = 0.0