Skip to content

Instantly share code, notes, and snippets.

View aglitchman's full-sized avatar
☄️
Defolding

Artsiom Trubchyk aglitchman

☄️
Defolding
View GitHub Profile
@vadi2
vadi2 / Lua 5.1 to 5.4 breaking changes.md
Created March 1, 2025 08:20
Lua 5.1 to 5.4 breaking changes

I'll research the breaking changes introduced in Lua versions 5.2, 5.3, and 5.4 that may cause scripts written in Lua 5.1 to break. This will include changes in language syntax, libraries, and runtime behavior. I'll provide a structured breakdown of these changes so you can better understand their impact on your scripts.

I'll update you once I have the findings.

Lua 5.2 – Breaking Changes (from Lua 5.1)

Syntax and Language Changes

  • New Reserved Keyword (goto): Lua 5.2 introduces a goto statement, making "goto" a reserved word (Lua 5.2 readme). Any Lua 5.1 code using goto as an identifier will fail to compile in 5.2. The fix is to rename such variables or avoid using "goto" as a name. Lua 5.2 also added labels (::label::) for goto, but this is new functionality and doesn’t affect 5.1 compatibility except for the keyword reservation.
  • Identifier Character Restrictions: In Lua 5.1, identifier names
@SoapyMan
SoapyMan / imgui_curve.hpp
Last active August 5, 2025 11:24
ImGui 1D Curve Editor Control
// [src] https://github.com/ocornut/imgui/issues/123
// [src] https://github.com/ocornut/imgui/issues/55
// v1.23 - selection index track, value range, context menu, improve manipulation controls (D.Click to add/delete, drag to add)
// v1.22 - flip button; cosmetic fixes
// v1.21 - oops :)
// v1.20 - add iq's interpolation code
// v1.10 - easing and colors
// v1.00 - jari komppa's original
@atyuwen
atyuwen / opt_fsr.fxh
Last active March 6, 2026 03:51
An optimized AMD FSR implementation for Mobiles
//==============================================================================================================================
// An optimized AMD FSR 1.0 implementation for Mobiles
// EASU and RCAS are combined in a single pass.
// Based on https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_fsr1.h
// Details can be found: https://atyuwen.github.io/posts/optimizing-fsr/
// Distributed under the MIT License. Copyright (c) 2021 atyuwen.
// -- FsrEasuSampleH should be implemented by calling shader, like following:
// AH3 FsrEasuSampleH(AF2 p) { return MyTex.SampleLevel(LinearSampler, p, 0).xyz; }
//==============================================================================================================================
void FsrMobile(

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

'''
Crude script to analyze which CPU features are used by a given executable/library.
Created on Jun 2, 2019
@author: SleepProgger
'''
import json
import argparse
import sys
@podgorskiy
podgorskiy / FrustumCull.h
Created July 12, 2017 10:33
Ready to use frustum culling code. Depends only on GLM. The input is only bounding box and ProjectionView matrix. Based on Inigo Quilez's code.
#include <glm/matrix.hpp>
class Frustum
{
public:
Frustum() {}
// m = ProjectionMatrix * ViewMatrix
Frustum(glm::mat4 m);
@skratchdot
skratchdot / gh-pages.sh
Last active December 1, 2022 16:26
Initialize gh-pages branch
# create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .
touch README.md
git add README.md
git commit -m 'initial gh-pages commit'
git push origin gh-pages
# add gh-pages as submodule
git checkout master
@jgranick
jgranick / install.sh
Last active December 17, 2015 19:09
DO NOT DO THIS ANYMORE. The following script installs a 32-bit version of Neko, instead of the 64-bit version that comes with the Haxe 3 install. Your Neko install should match your OS X install, which means unless you are running an OLD system, you want the 64-bit version. OpenFL does properly support 64-bit Neko, and expects this on 64-bit sys…
#!/bin/sh
# Download Neko
curl -L http://nekovm.org/_media/neko-2.0.0-osx.tar.gz > neko-2.0.0-osx.tar.gz
# Extract and copy files to /usr/lib/neko
@minikomi
minikomi / goserv.go
Created September 2, 2012 02:59
Simple static server in go
package main
import (
"flag"
"log"
"net/http"
"os"
)