Skip to content

Instantly share code, notes, and snippets.

View hiulit's full-sized avatar
💻
Working

hiulit

💻
Working
View GitHub Profile
@WolfgangSenff
WolfgangSenff / ShakeCamera2D.gd
Last active January 26, 2023 17:13
Camera shake from KidsCanCode
extends Camera2D
# Courtesy of KidsCanCode: http://kidscancode.org/godot_recipes/3.x/2d/screen_shake/ (this may change in the near future, so it may require a search)
# If you intend to use this, don't forget to turn on camera rotation! And keep in mind that smaller numbers are often the most useful - huge numbers make this thing *really* shake
# 3.5.x
export var decay = 0.8 # How quickly the shaking stops [0, 1].
export var max_offset = Vector2(100, 75) # Maximum hor/ver shake in pixels.
export var max_roll = 0.1 # Maximum rotation in radians (use sparingly).
export (NodePath) var target # Assign the node this camera will follow.
@Gemba
Gemba / donutdodo_controller_mapping.py
Created June 30, 2023 10:50
Workaround to remap the Donut Dodo controller buttons to Retropie's Joypad definition.
#! /usr/bin/env python3
# Remaps the Donut Dodo Controller buttons to the values of Retropie's Joypad
# definition. cf. https://retropie.org.uk/forum/topic/34334/
# Usage:
#
# 1. Run Donut Dodo and in the "Remap Controller" Menu select Factory Reset
# once. This will create a
# /opt/retropie/configs/ports/donutdodo/controller_mapping.dat
@Grunerd
Grunerd / LabelFontScaler.gd
Last active October 11, 2023 17:44
LabelFontScaler for Control Node in Godot 4
extends Control
# ensure that you attach this script to the parent node of your ui elements
# ensure that you link the signal "resize" of this control node to this script
#
@export_enum("Horizontal","Vertical") var scaleMode = "Vertical"
# cache for all labels and ther initial font size
@zeusdeux
zeusdeux / build_zdx.sh
Created June 16, 2024 01:25
Build static universal raylib as libraylib.a on macos (libraylib.a)
#! /bin/sh
set -e
function build_raylib_macos {
curr_dir="$(basename $(pwd))"
if [[ "$curr_dir" != "src" ]];
then
@jmcerrejon
jmcerrejon / shutdown.app
Created April 18, 2025 16:19
Close all apps that are currently open and shut down your Mac using the Automator script. Because I prefer to switch to a Mac and start from scratch 😉
on run {input, parameters}
tell application "System Events"
set appList to name of every application process where background only is false
end tell
repeat with appName in appList
try
do shell script "killall '" & appName & "'"
end try
end repeat