Skip to content

Instantly share code, notes, and snippets.

View filiptibell's full-sized avatar

Filip Tibell filiptibell

View GitHub Profile
@filiptibell
filiptibell / MoarConnectors.luau
Created September 13, 2025 21:55
Even more connectors between jecs & vide (raw source, not for direct consumption)
local function createSingleSource<T>(component: ECS.Component<T>, owned: true?): EcsSourceSingle<T>
local currentId, currentVal
if owned == true then
currentId, currentVal = W:Find(component, NetworkOwned)
else
currentId, currentVal = W:Find(component)
end
local src: VIDE.Source<T?> = VIDE.Source(currentVal)
@filiptibell
filiptibell / ObserverAddon.luau
Last active September 13, 2025 21:46
Connector to create a source for many entities & their component values using jecs + vide
--!nonstrict
--!native
--!optimize 2
local jecs = require(path.to.jecs)
type Description<T...> = jecs.Query<T...>
type ObserverArm = (<a>(
PatchedWorld,
@filiptibell
filiptibell / HooksCache.luau
Last active January 3, 2025 01:27
Hooks cache & component changes iterator for Jecs
--!strict
--!native
--!optimize 2
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Jecs = require(ReplicatedStorage.Packages.Jecs)
local World = require(script.Parent.World)
type Entity = Jecs.Entity<nil>
@filiptibell
filiptibell / push-ollama-model.sh
Last active September 9, 2024 12:20
Push safetensors Ollama model with all quantizations
#!/usr/bin/env bash
# This script will create and push all the different quantizations of a
# Modelfile in the current directory, tagged using the following format:
#
# - <model_name>:<model_size>-<quantization>
#
# This is the standard format used by Ollama for pushing models.
# Example using the Llama 2 7b model:
#
@filiptibell
filiptibell / remodelTypes.d.lua
Last active November 11, 2022 19:45
Type declarations for Remodel, to be used with Luau LSP
-- Type definitions for remodel 0.11.0
declare class RemodelInstance
Name: string
ClassName: string
Parent: RemodelInstance
function Clone(self): RemodelInstance
function Destroy(self): ()
function GetChildren(self): {RemodelInstance}
function GetDescendants(self): {RemodelInstance}