Skip to content

Instantly share code, notes, and snippets.

View Sacristan's full-sized avatar

Ģirts Ķesteris Sacristan

View GitHub Profile
@WolfgangSenff
WolfgangSenff / gist:168cb0cbd486c8c9cd507f232165b976
Last active April 15, 2024 22:14
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.
@fworks
fworks / install-zsh-windows-git-bash.md
Last active April 19, 2024 19:52
Zsh / Oh-my-zsh on Windows Git Bash
@Orixe
Orixe / FootIK
Last active December 17, 2023 15:22
Free Foot IK system for unity
using UnityEngine;
[RequireComponent(typeof(Animator))]
public class FootIK : MonoBehaviour
{
[Header("Main")]
[Range(0, 1)] public float Weight = 1f;
[Header("Settings")]
public float MaxStep = 0.5f;
public float FootRadius = 0.15f;
@alexxxdev
alexxxdev / gist:1dd024cadea091ca64154f9616d5739a
Created August 16, 2018 15:08
remote: fatal: pack exceeds maximum allowed size
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
#if !DISABLESTEAMWORKS
// Unity 32bit Mono on Windows crashes with ThisCall/Cdecl for some reason, StdCall without the 'this' ptr is the only thing that works..?
#if (UNITY_EDITOR_WIN && !UNITY_EDITOR_64) || (!UNITY_EDITOR && UNITY_STANDALONE_WIN && !UNITY_64)
#define STDCALL
#elif STEAMWORKS_WIN
#define THISCALL
#endif
namespace Steamworks
#if !DISABLESTEAMWORKS
// Unity 32bit Mono on Windows crashes with ThisCall/Cdecl for some reason, StdCall without the 'this' ptr is the only thing that works..?
#if (UNITY_EDITOR_WIN && !UNITY_EDITOR_64) || (!UNITY_EDITOR && UNITY_STANDALONE_WIN && !UNITY_64)
#define STDCALL
#elif STEAMWORKS_WIN
#define THISCALL
#endif
namespace Steamworks
@ericmathison
ericmathison / gist:1d53b3f53fe68b0c351046df3422a4e0
Last active November 23, 2023 15:18
Deploy instructions for Rails using Puma, Nginx, and Ubuntu 18.04.

Deploy instructions for Rails using Puma, Nginx, and Ubuntu 18.04.

Sign up at www.atlantic.net (Select the Ubuntu 18.04 LTS operating system option). I was grandfathered in on Atlantic.net's $1 a month virtual private server (VPS) hosting. Unlike Heroku, you will have full control over the server. At some point in your application's lifetime this may become important to you for making customizations Heroku isn't capable of. Unless future limitations aren't a concern AND you don't want to learn how to set up a virtual private server, I wouldn't suggest using Heroku. The setup process below would be very similar for any of the other big hosting options like Amazon's EC2, DigitalOcean, etc.

Confirmation email will have log in instructions with IP, password and username.

Some of the commands below are run on the remote machine and others on your local development machine. I will prefix each command with one of the following:

remote-root#
remote$
@Hertzole
Hertzole / SceneObject.cs
Last active May 4, 2024 13:04
Unity scene object to easily assign scenes in the inspector.
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[System.Serializable]
public class SceneObject
{
[SerializeField]
private string m_SceneName;
#include <math_constants>
image Input = file("maze.png");
glsl vec4 initialState(vec2 pos) {
vec4 input = texture(Input, pos);
vec4 color = vec4(0.0, 0.0, 0.0, 1.0);
// Detect starting point
if (input.g > 0.5 && input.r + input.b < 1.0)
@PopupAsylumUK
PopupAsylumUK / CopyTransformsPositions.cs
Created June 13, 2017 21:43
An editor window for copying the local positions and rotations from 1 set of transforms to another, used in BeeBeeQ for copying a hand pose from left to right
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class CopyTransformPositions : EditorWindow {
public Transform sourceRoot;
public Transform targetRoot;