Skip to content

Instantly share code, notes, and snippets.

View griffi-gh's full-sized avatar

Lunyaaa~ griffi-gh

View GitHub Profile
@griffi-gh
griffi-gh / UEFN-GetTickEvents.verse
Last active November 16, 2025 15:31
Adds utility function to get `TickEvents` outside of `Component`
using. /Verse.org/Simulation
using. /Verse.org/Native
using. /Verse.org/SceneGraph
_dummy_component := class<final_super><unique>(component):
GetTickEvents_Internal<internal>(Component: component)<reads>: tick_events = Component.TickEvents;
(InComponent: component).GetTickEvents<public>()<transacts>: tick_events :=
Dummy := _dummy_component. Entity := InComponent.Entity;
Dummy.GetTickEvents_Internal(InComponent)
using. /Verse.org
using. /Verse.org/Native
using. /Verse.org/SceneGraph
using. /Verse.org/Simulation
tickable<public> := interface() {
var Cancelable_PreTick<private>: ?cancelable = false;
var Cancelable_PostTick<private>: ?cancelable = false;
OnBeginSimulation<public>(Component: component):void =
extend_callback<public>(t0: type, t1: type) := class<computes>:
Value<public>: t0;
Callback<public>: type { _(:t0, :t1): void };
Output<public>(Arg1: t1): void = Callback(Value, Arg1);
using. /Verse.org/SpatialMath
(InVector: vector3).Untransform<public>(Transform: transform)<computes><reads>: vector3 =
((InVector - Transform.Translation) * Transform.Rotation.Invert()) / Transform.Scale;
using. /Verse.org/SceneGraph
_mesh_editor_only_component<public> := class<final_super>(component):
OnAddedToScene<override>(): void =
if (Mesh := Entity.GetComponent[mesh_component]). Mesh.Disable();
@griffi-gh
griffi-gh / AGENTS.md
Last active March 26, 2026 17:57
LLM Use Policy (EXAMPLE)

LLM Use Policy

This project is licensed under the terms of the GNU General Public License (GPL).

While the GPL allows you to access and/or use this project in accordance with its terms, as the project developer and maintainer, I firmly but politely request that you refrain from the following behaviors:

You are NOT welcome to:

@griffi-gh
griffi-gh / lustrate-from-backup.sh
Created April 8, 2026 14:02
lustrate-from-backup.sh
#!/bin/bash
# Automatic lustrate script for Oracle OCI Ubuntu machines
# Usage:
# ./lustrate-from-backup.sh <hostname>
#
# This assumes the following:
#
# - Nix is already installed, in single-user mode
# curl -L https://nixos.org/nix/install | sh