Skip to content

Instantly share code, notes, and snippets.

class_name SmoothFollow3D extends Node3D
@export var target : Node3D
@export var offset = Vector3(0, 0, 0)
@export var speed = 0.0
@export var cam_relative_offset = true
func _ready():
global_position = getPosition()
global_rotation = target.global_rotation
@barraIhsan
barraIhsan / 8BitDoUltimate2Wireless.md
Last active January 25, 2026 12:20
8BitDo Ultimate 2 Wireless on GNU/Linux, SteamOS, and Windows

Most of the source comes from: Steam Beta Forum

Thank you so much to everyone in the forum for contributing, for reaching out to 8BitDo to request switching between XInput/DInput/Switch mode on the dongle, to Valve for adding support on DInput mode, to the SDL developers (and 8bitdo) for adding support on DInput mode, and finally, to the Linux kernel developers for adding support on XInput mode.

This gist summarizes everything from that forum.

Switching Mode

So after the latest firmware update (as the time of writing: Controller 1.06, Adapter 1.04), its now possible to switch to DInput and Switch mode by holding B (DInput) or Y (Switch) while turning on t

class_name ThreadInstancer
extends Node
## Instantiate a scene in a thread and adds its nodes to the scene tree in batches.
# Signals
signal scene_loaded(scene: PackedScene)
signal root_node_instantiated(node: Node)
signal node_instantiated(node: Node)
signal batch_instantiated
@tool
class_name ProceduralBridge
extends Node3D
##############################
## EXPORT VARIABLES
##############################
@export var physics_server: bool = false:
set(value):
@elementbound
elementbound / proximity-fade.gdshaderinc
Last active March 29, 2025 01:50
Proximity Fade shader include for Godot
/**
* Proximity Fade shader include
*
* Based on Godot's proximity fade shader feature:
* https://github.com/godotengine/godot/blob/97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b/scene/resources/material.cpp#L1643
*
* Usage:
// Include snippet
#include "proximity-fade.gdshaderinc"
@sixels
sixels / Arch Secure Laptop Install.md
Last active February 15, 2024 01:01 — forked from Th3Whit3Wolf/Arch Secure Laptop Install.md
My install instruction for a secure Arch Linux (sway) laptop workstation

What's Cool

  • Encrypted root partition
    • AES-256 bit cipher
    • Argon2id variant for PBKDF
    • Sha3-512 bit hash
  • rEFInd bootloader
    • With dreary theme
    • Optimal Settings (optimized for aesthetics, and boot time)
  • Boot into backups thanks to refind-btrfs
@jhilker98
jhilker98 / nord.css
Last active April 7, 2022 17:42
themes for hugo chroma css
:root {
--nord0: #2e3440;
--nord1: #3b4252;
--nord2: #434c5e;
--nord3: #4c566a;
--nord4: #d8dee9;
--nord5: #e5e9f0;
--nord6: #eceff4;
--nord7: #8fbcbb;
--nord8: #88c0d0;
/**
* An approximate port of https://github.com/s-macke/VoxelSpace
* using Kotlin and JavaFX.
*
* Run with : kotlinc -script voxel.kts
*
* Click on the panel to "fly".
*
* Twitter: @CedricChampeau
*/
@bvaughn
bvaughn / react-lifecycle-cheatsheet.md
Last active January 4, 2026 21:31
React lifecycle cheatsheet

React lifecycle cheatsheet

Method Side effects1 State updates2 Example uses
Mounting
componentWillMount Constructor equivalent for createClass
render Create and return element(s)
componentDidMount DOM manipulations, network requests, etc.
Updating
componentWillReceiveProps Update state based on changed props
@staltz
staltz / introrx.md
Last active January 27, 2026 12:57
The introduction to Reactive Programming you've been missing