Skip to content

Instantly share code, notes, and snippets.

@xdl
xdl / RenderIndirect.py
Last active December 15, 2023 01:13
Render selected (and everything else indirectly)
bl_info = {
"name": "Quick Export",
"author": "Lionbark",
"version": (1),
"blender": (3, 6, 0),
"location": "3D Viewport > Side panel",
"description": "Render only selected objects, everything else indirect only",
"warning": "",
"doc_url": "",
"category": "Render",
@xdl
xdl / RenderSolo_v_1.py
Created September 28, 2023 11:42
Blender addon that renders all the objects in the 'solo' Collection individually (and omits them from the overall render)
bl_info = {
"name": "Render Solo ",
"author": "Lionbark",
"version": (1),
"blender": (3, 6, 0),
"location": "3D Viewport > Side panel",
"description": "Render objects in the solo collection individually",
"warning": "",
"doc_url": "",
"category": "Render",
@xdl
xdl / prose.twee
Created October 13, 2020 11:56
Twee file publishable on Itch (compiling with Tweego)
:: Stylesheet [stylesheet]
body {
overflow-y: scroll;
}
:: Script [script]
var audio = document.createElement('audio');
audio.src = 'background.ogg';
@xdl
xdl / Console.gd
Created June 11, 2020 23:36
Godot debug/interpreter console
extends Control
# Mostly inspired off https://www.youtube.com/watch?v=80cwYGvKB9U
# and https://github.com/godotengine/godot/issues/8003
onready var input_node: LineEdit = $Input
onready var output_node: TextEdit = $Output
# Dump some commands in here for convenience
var history = ["get_tree().get_root().get_node('Main')"]
@xdl
xdl / gist:b5d1f8e17174b49ec523
Created April 18, 2015 21:16
Global Alignment
module GlobalAlignmentProblem(
solve
) where
import Data.Array
import qualified Data.Map as M
data Input = Input {string1 :: String,
string2 :: String
}
@xdl
xdl / prolog.md
Last active January 3, 2016 04:49

Prolog tips

Using recursion

Counting occurrences in a list

count_word(_,[],0).
count_word(W,L,C) :-
	L = [H|T],

count_word(W, T, X),

C++ Cheatsheet

Functions

  • Declared like so:

      int encode_character(char c, char multitap);
    
  • To pass a value by reference, prepend the & before the argument name: