Skip to content

Instantly share code, notes, and snippets.

View ReFreezed's full-sized avatar
🔨
Working on Lua tools

Marcus Thunström ReFreezed

🔨
Working on Lua tools
View GitHub Profile
@MikuAuahDark
MikuAuahDark / io_open_wide.lua
Last active August 20, 2020 01:02
LuaJIT io.open monkeypatch in Windows to load UTF-8 filenames
-- io.open patch to allow UTF-8 filenames in Windows
-- Copyright (c) 2020 Miku AuahDark
-- You can use portion of this code or as a whole without my permission.
local ffi = require("ffi")
if ffi.os ~= "Windows" then
-- Not Windows
return
end
@Egor-Skriptunoff
Egor-Skriptunoff / utf8_filenames.lua
Last active August 30, 2023 06:45
UTF-8 filenames on Windows in pure Lua
------------------------------------------------------------------------------------------------------------------------------
-- Module: utf8_filenames
------------------------------------------------------------------------------------------------------------------------------
-- Filename: utf8_filenames.lua
-- Version: 2019-07-13
-- License: MIT (see at the end of this file)
-- This module modifies standard Lua functions so that they work with UTF-8 filenames on Windows:
-- io.open
-- io.popen
@andrewrk
andrewrk / microsoft_craziness.h
Created September 1, 2018 14:35
jonathan blow's c++ code for finding msvc
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@MawKKe
MawKKe / split_ffmpeg.py
Last active August 7, 2021 21:50
MOVED TO: https://github.com/MawKKe/audiobook-split-ffmpeg | Split audio file with ffmpeg based on chapter metadata
#!/usr/bin/env python3
import sys
import os
import re
import subprocess as sub
import argparse
import tempfile
import json
from concurrent.futures import ThreadPoolExecutor, as_completed
@jtanx
jtanx / keybindings.json
Created April 23, 2017 09:33
Visual Studio Code disable MRU tab switching
[
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
}
]
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 5, 2024 09:04
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@mkottman
mkottman / cacert.pem
Last active April 10, 2020 13:44
A simple Lua IMAP client. Prerequisites: LuaSocket and LuaSec
##
## ca-bundle.crt -- Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Sat Dec 29 20:03:40 2012
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
##
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@perky
perky / ProFi.lua
Created May 30, 2012 20:32
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()