Skip to content

Instantly share code, notes, and snippets.

@bramreth
bramreth / Godot4FPS.gd
Last active January 10, 2026 20:36
The code for a first person movement youtube tutorial in Godot 4
extends CharacterBody3D
const SPEED = 5.0
const JUMP_VELOCITY = 4.5
# Get the gravity from the project settings to be synced with RigidDynamicBody nodes.
var gravity: float = ProjectSettings.get_setting("physics/3d/default_gravity")
@onready var neck := $Neck
@onready var camera := $Neck/Camera3d
@aaronfranke
aaronfranke / convert-to-godot4.sh
Last active April 2, 2024 16:20
This script bulk-renames many things in Godot 3 projects to hopefully make it easier to convert them to Godot 4.
#!/usr/bin/env bash
# This script bulk-renames many things in Godot 3 projects to hopefully
# make it easier to convert them to Godot 4. The goal is to do as much
# replacing as possible here so that the diffs Godot produces are smaller.
set -uo pipefail
IFS=$'\n\t'
# Loops through all text files tracked by Git.
@dpanter
dpanter / cpu_usage_per_core.sh
Last active December 19, 2023 07:50
cpu_usage_per_core.sh - Outputs per-core CPU use percentage, space separated one-liner.
#!/bin/bash
# cpu_usage_per_core.sh
# Outputs per-core CPU use percentage, space separated one-liner.
# Created 2020-05-14 - updated 2020-08-13
# Written for Siduction (Debian sid based distro)
# By dpanter https://gist.github.com/dpanter
# requires _mpstat_ (provided by Debian package _sysstat_)
# Failsafe for awk arithmetic ops, if locale uses comma decimal separator
LC_NUMERIC="C"
@NovemberDev
NovemberDev / godot_async_scene_loader.gd
Last active March 12, 2025 16:00
Asynchronously loads scenes in godot
# Loads a scene in the background using a seperate thread and a queue.
# Foreach new scene there will be an instance of ResourceInteractiveLoader
# that will raise an on_scene_loaded event once the scene has been loaded.
# Hooking the on_progress event will give you the current progress of any
# scene that is being processed in realtime. The loader also uses caching
# to avoid duplicate loading of scenes and it will prevent loading the
# same scene multiple times concurrently.
#
# Sample usage:
#
@op-ct
op-ct / virtualbox_create_vm.sh
Last active December 19, 2023 07:51 — forked from mitsuji/create_vm.sh
VirtualBox create vm shell script
#!/bin/sh
#
# adapted from https://gist.github.com/mitsuji/8397836
#
# For usage, run without arguments
#
VM_NAME=$1
DVD_PATH=${2:---}
OS_TYPE="${3:-${OS_TYPE:-RedHat_64}}"
<?php
//=========================================================================
// Skripta za posiljanje sms preko Simobilove Klape / Najdi.si / Tusmobil
// Verzija 2.50 (c) blackbfm @ slo-tech
//=========================================================================
// Pošiljanje:
// SendFreeSms("ponudnik", "uporabniskoime", "geslo", "stevilka", "sporocilo")
//
// Preverjanje stanja:
// SendFreeSms("ponudnik", "uporabniskoime", "geslo", "stevilka", "sporocilo", False)
<?php
//=========================================================================
// Skripta za posiljanje sms preko Simobilove Klape / Najdi.si / Tusmobil
// Verzija 2.40 (c) blackclw @ slo-tech
//=========================================================================
// Pošiljanje:
// SendFreeSms("ponudnik", "uporabniskoime", "geslo", "stevilka", "sporocilo")
//
// Preverjanje stanja:
// SendFreeSms("ponudnik", "uporabniskoime", "geslo", "stevilka", "sporocilo", False)