Skip to content

Instantly share code, notes, and snippets.

@fguillen
fguillen / GodotVSUnity.md
Last active October 21, 2025 11:04
My Godot VS Unity compare list

Godot is worst (IMO)

  • No way to disable a node (godotengine/godot-proposals#370) neither in code :? (https://godotengine.org/qa/49696/how-to-disable-enable-a-node?show=49754#a49754)
  • Poorer script editor: No multi-cursor (possibility of integrate with VSCode)
  • No realtime Node/Component values on play mode (only explicit external variables)
  • Separate play window and When pause play mode the game screen is hidden
  • Less reactive editor interface. Drag and drop textures
  • Many tricks in KinematicBody like "is in floor" passing a special value to UP in move_and_slide
  • Using -1 to mean Default :?
  • External variables changes don't get activated until you blur the field
@fguillen
fguillen / git_tips.md
Created December 19, 2010 20:53
Git Tips

(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )

Git tips

Global git user

git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"

Repository git user

cd /develop/myrepo

@fguillen
fguillen / lines_per_commit_counter.sh
Created June 11, 2025 13:56
Script to count the number of lines written on each commit and calculating num lines/hour
#!/bin/bash
# Navigate to your Git repo before running this script
# LLM generated
commits=($(git rev-list --reverse HEAD))
prev_time=0
printf "%-10s | %-30s | %-14s | %-17s | %s\n" "Commit" "Message" "Lines Changed" "Hours Since Last" "Lines/Hour"
@fguillen
fguillen / preload_materials.gd
Last active April 16, 2025 11:01
Godot preload and cache Shader Materials to avoid freeze in play mode
# Create a Scene with a Node
# Add this script to it
# Add the Scene to the Autoloads
# Fulfill the material Array with all the Materials that are causing freeze
# It also works with Materials from ParticlesSystems
# preload_materials.gd
extends Node
# Load the array through Inspector
@fguillen
fguillen / code_style.gd
Last active March 28, 2025 14:39
Godot GD script template with the order of the code sections
# meta-name: Code style template
# meta-description: Empty script with the order of the code sections
# -- 01 @tool
# -- 02 class_name
# -- 03 extends
extends _BASE_
# -- 04 # docstring
#
@fguillen
fguillen / ruby_dev_mac_setup.rb
Last active January 17, 2025 15:26
Ruby dev Mac setup
# Execute:
# curl -o /tmp/ruby_dev_mac_setup.rb https://gist.githubusercontent.com/fguillen/dd5600dd45dbac993578e288e1f9f77a/raw/ruby_dev_mac_setup.rb && ruby /tmp/ruby_dev_mac_setup.rb
COMMANDS = [
{
description: "Install XCode command line tools",
command: "xcode-select --install",
already_installed: "xcode-select --print-path"
},
{
require "sqlite3"
module ActiveRecord
class Mini
attr_reader :attributes
def initialize(attributes = {})
@attributes = attributes
end

Friendlyrb conference notes

Day 1

I am attending Friendlyrb in Bucharest. In addition to being fascinated by the overwhelming magnificence of the architecture here, I am having a super nice time around fantastic Ruby people, inspiration, and enjoyable talks about Ruby and friendly technologies.

These are some short summaries of what has been talking here today:

Rosa Gutierrez: Invalid byte sequence in UTF-8 😭

@fguillen
fguillen / beer_time.rb
Last active June 25, 2024 16:39
Announce the beer time
# Simple but necessary script (for Mac) to announce when the beer time is comming
# You can configure your crontab like this
# 0 17 * * 5 ruby $HOME/scripts/beer_time.rb >> /var/log/beer_time.log 2>&1
beer_hour = ARGV[0] || 18
def say(message)
`afplay /System/Library/Sounds/Hero.aiff`
`afplay /System/Library/Sounds/Hero.aiff`
`say "#{message}"`
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,