Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View billyquith's full-sized avatar
🏠
Working from home

Bill Quith billyquith

🏠
Working from home
View GitHub Profile
@ruby0x1
ruby0x1 / hash_fnv1a.h
Last active December 30, 2023 00:40
FNV1a c++11 constexpr compile time hash functions, 32 and 64 bit
#pragma once
#include <stdint.h>
//fnv1a 32 and 64 bit hash functions
// key is the data to hash, len is the size of the data (or how much of it to hash against)
// code license: public domain or equivalent
// post: https://notes.underscorediscovery.com/constexpr-fnv1a/
inline const uint32_t hash_32_fnv1a(const void* key, const uint32_t len) {

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active April 21, 2024 23:26
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);
@positron
positron / create_empty_cl.py
Last active July 7, 2022 02:42
Create an empty perforce changelist in p4python and save the changelist number
from P4 import P4
client = P4()
# set client.port, client.client, etc here
change = client.fetch_change()
change['Files'] = [] # this contains all the files in default otherwise
ret = client.save_change(change) # ['Change 1234 created.']
new_cl = ret.split()[1]
# now you can do stuff like