Skip to content

Instantly share code, notes, and snippets.

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active June 21, 2025 01:13
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);
@hotwatermorning
hotwatermorning / lldb.txt
Created February 17, 2017 08:51
Step into std::function with lldb of Xcode
(lldb) settings show target.process.thread.step-avoid-regexp
target.process.thread.step-avoid-regexp (regex) = ^std::
(lldb) settings set target.process.thread.step-avoid-regexp ""
http://stackoverflow.com/questions/19413181/step-into-stl-sources-in-xcode-5
@YukiSnowy
YukiSnowy / main.cpp
Last active April 3, 2025 13:45
example SDL2 Vulkan application
// Windows
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan-1
// Linux
// g++ *.cpp -o vulkan -lSDL2main -lSDL2 -lvulkan
// https://vulkan-tutorial.com/
#include <iostream>
using namespace std;
#include <SDL2/SDL.h>
@lixianyang
lixianyang / kind_static_ips.sh
Created February 22, 2022 14:49 — forked from seguidor777/kind_static_ips.sh
This script assign static IP to all nodes of a kind cluster
#!/bin/bash
set -e
# Workaround for https://github.com/kubernetes-sigs/kind/issues/2045
all_nodes=$(kind get nodes --name "${CLUSTER_NAME}" | tr "\n" " ")
declare -A nodes_table
ip_template="{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}"
echo "Saving original IPs from nodes"
@AmulyaX
AmulyaX / libfprint-custom-build.txt
Last active June 12, 2025 10:29
Use custom built libfprint to add fixes for specific drivers
# Clone fprintd source code
git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
# Checkout to our good guy who made a patch for sensor
# 1c7a:0587 LighTuning Technology Inc. ETU905A88-E
git fetch "https://gitlab.freedesktop.org/thameruddin/libfprint.git" 'egismoc-0587'
git checkout -b 'libfprint-egismoc-0587' FETCH_HEAD
# Try building the code
cd libfprint