Skip to content

Instantly share code, notes, and snippets.

View fire's full-sized avatar

K. S. Ernest (iFire) Lee fire

View GitHub Profile
@mrcdk
mrcdk / globals.gd
Created August 16, 2023 13:28
Godot 4.x example of how to launch multiple instances and tile them by using an editor debugger plugin to communicate with each instance
# res://globals.gd added as an autoload
extends Node
func _ready() -> void:
EngineDebugger.register_message_capture("tile-instances", _on_tile_instances)
EngineDebugger.send_message.call_deferred("tile-instances:get_id", [])
from langchain.llms import Anthropic
from langchain.agents import load_tools, initialize_agent
from langchain.tools import AIPluginTool
PREFIX = """\n\nHuman: Answer the following questions as best you can. You have access to the following tools:"""
SUFFIX = """Begin!
Question: {input}
\n\nAssistant:
Thought:{agent_scratchpad}"""
@JosephCatrambone
JosephCatrambone / DecisionTree.gd
Created February 25, 2022 04:32
Basic Decision Tree in GDScript
# Sample Usage:
# var day_features = [
# # freezing, raining, foggy, sunny
# [0, 1, 0, 0],
# [0, 0, 0, 1],
# [0, 0, 0, 0],
# [0, 0, 1, 0],
# [1, 0, 0, 1],
# [1, 1, 0, 0],
# [1, 0, 1, 0],
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active September 24, 2024 07:18
Godot 4.0 Migration/Upgrade guide
## For a beginner-friendly version of the following (more advanced users likely will get better use of the below,
## if you're just starting out...), see this new gist:
## https://gist.github.com/WolfgangSenff/0a9c1d800db42a9a9441b2d0288ed0fd
This document represents the beginning of an upgrade or migration document for GDScript 2.0 and Godot 4.0. I'm focusing on 2D
at the moment as I'm upgrading a 2D game, but will hopefully have more to add for 3D afterward.
## If you want more content like this, please help fund my cat's medical bills at https://ko-fi.com/kyleszklenski - thank you very much! On to the migration guide.
@PJUllrich
PJUllrich / big-o.md
Last active October 14, 2024 21:37
Big-O Time Complexities for Elixir Data Structures

Big-O Time Complexities for Elixir data structures

Map [1]

Operation Time Complexity
Access O(log n)
Search O(log n)
Insertion O(n) for <= 32 elements, O(log n) for > 32 elements [2]
Deletion O(n) for <= 32 elements, O(log n) for > 32 elements
@mcheshkov
mcheshkov / build.sh
Last active October 29, 2023 18:40
Building OpenZFS for Fedora CoreOS
#!/bin/bash
FEDORA_MAJOR="38"
ARCH="x86_64"
KERNEL_VERSION="6.3.8-200.fc38"
ZFS_VERSION="2.1.12"
podman run \
--interactive \
--tty \
@hakanai
hakanai / pmx21.md
Last active February 18, 2023 17:28 — forked from felixjones/pmx21.md
PMX (Polygon Model eXtended) 2.0, 2.1 File Format Specifications

PMX (Polygon Model eXtended) 2.1

This is an English description of the .PMX file format used in Miku Miku Dance (MMD).

PMX is the successor to the .PMD format (Polygon Model Data).

This is work-in-progress! Please leave feedback in the comments.

Todo

@pojntfx
pojntfx / main.sh
Last active October 10, 2023 14:26
Enable Wayland for VSCode/VSCodium on Linux
#!/bin/bash
# VSCodium:
sudo mv /usr/bin/codium /usr/bin/codium.original
echo '/usr/bin/codium.original --enable-features=UseOzonePlatform --ozone-platform=wayland "$1"' | sudo tee /usr/bin/codium
sudo chmod +x /usr/bin/codium
# VSCode:
@lyuma
lyuma / rounded_trail_shaded.shader
Last active March 30, 2021 11:47
Rounded shader for a Unity Particle Trails and TrailRenderer, with shading.
// VERSION 0.3.1. Please get the latest version from:
// https://gist.github.com/lyuma/744e7fe35f7758add2f4468bb12f87f1
// Lyuma's Rounded Trail with Shading
// Based on phi16's rounded trail
// Based on Xiexe's Unity Lit Shader Templates:
// https://github.com/Xiexe/Unity-Lit-Shader-Templates
// Installation Notes:
// YOU MUST COPY ALL OF THE .cginc FILES FROM
@winston-yallow
winston-yallow / test.gd
Last active January 25, 2024 06:32
Godot 4.x Compute Example
extends Node
# Based on this tweet by Clay John:
# https://twitter.com/john_clayjohn/status/1306447928932753408
func _ready() -> void:
# Create a local rendering device.
var rd := RenderingServer.create_local_rendering_device()