Skip to content

Instantly share code, notes, and snippets.

View fire's full-sized avatar

K. S. Ernest (iFire) Lee fire

View GitHub Profile
@fire
fire / 3d-formats.md
Created March 30, 2022 18:45 — forked from meshula/3d-formats.md
3d file formats, last mile vs. interchange
@fire
fire / clean_all_svgs.sh
Created March 27, 2022 14:46 — forked from j3j5/clean_all_svgs.sh
Apply SVG Cleaner to all the SVGs on a given folder
# https://github.com/RazrFalcon/svgcleaner/ must be installed
find . -type f -name "*.svg" | sudo xargs -I file svgcleaner file file
@fire
fire / gltf_merge_anim.py
Created March 3, 2022 07:07 — forked from scurest/gltf_merge_anim.py
Quick code to convert a glTF with multiple non-overlapping animations to one with a single animation.
#!/bin/env python
"""Merge mutiple glTF 2.0 animations into one."""
import json
import sys
def merge(gltf):
# Maps (node, path) to (input, output, interpolation)
target_to_sampler = {}
for animation in gltf.get('animations', []):
for channel in animation['channels']:
@fire
fire / reclaimWindows10.ps1
Created July 3, 2021 06:14 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@fire
fire / tilt.shift.glsl
Created January 26, 2021 20:30 — forked from ruby0x1/tilt.shift.glsl
Tilt shift shader, modified from something @grapefrukt gave me
// Modified version of a tilt shift shader from Martin Jonasson (http://grapefrukt.com/)
// Read http://notes.underscorediscovery.com/ for context on shaders and this file
// License : MIT
uniform sampler2D tex0;
varying vec2 tcoord;
varying vec4 color;
/*
Take note that blurring in a single pass (the two for loops below) is more expensive than separating
@fire
fire / Parse16BitFloat.shader
Created October 11, 2020 03:16 — forked from lyuma/Parse16BitFloat.shader
Godot Shader to extract the raw 16-bit integer in a FORMAT_RGBAH texture.
shader_type spatial;
render_mode unshaded;
uniform usampler2D data_tex;
/*
Use with the following GDScript code:
var data_img = Image.new()
var data := PoolByteArray()
var indexin = 0x8400
@fire
fire / gist:5959c3d7d6a22974f25baa6007ce48d4
Last active August 8, 2023 16:59 — forked from chinhodado/gist:6fc37def3e12ea09f785
How to use meld with Sourcetree on the Mac.
  • Install meld
  • In SourceTree, go to Tools/Options/Diff
  • In External Diff Tool, choose Custom
  • Enter /usr/local/bin/meld in Diff Command and $LOCAL $REMOTE in Arguments
  • In External Merge Tool, choose Custom
  • Enter /usr/local/bin/meld in Merge Command and $LOCAL $MERGED $REMOTE in Arguments
  • Click Ok and restart SourceTree
@fire
fire / StateRecorder.gd
Created February 14, 2020 06:55 — forked from Xrayez/StateRecorder.gd
State recorder using AnimationPlayer in Godot
# This is a prototype of the state recorder that can be used in a replay system
extends AnimationPlayer
var nodes = []
var animations = {}
var properties = ["global_position", "global_rotation"]
func _init():
set_name("state_recorder")
@fire
fire / repo-rinse.sh
Created February 8, 2020 16:21 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@fire
fire / LineUtil.cs
Created June 11, 2019 05:34 — forked from sinbad/License.txt
Unity 2D Line Segment Intersection
using UnityEngine;
public static class LineUtil {
public static void Swap<T>(ref T lhs, ref T rhs) {
T temp = lhs;
lhs = rhs;
rhs = temp;
}
public static bool Approximately(float a, float b, float tolerance = 1e-5f) {