Skip to content

Instantly share code, notes, and snippets.

import random
const word verareg=$9f20
byte verahi @verareg+0
byte veramid @verareg+1
byte veralo @verareg+2
byte veradat @verareg+3
@steven2358
steven2358 / ffmpeg.md
Last active July 25, 2024 14:53
FFmpeg cheat sheet
//---------------------------------------------------------------------------------------
// Copyright (c) 2001-2014 by PDFTron Systems Inc. All Rights Reserved.
// Consult legal.txt regarding legal and license information.
//---------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// This sample demonstrates the basic usage of high-level digital signature API in PDFNet.
//
// The following steps are typically used to add a digital signature to a PDF:
//
@JulienPalard
JulienPalard / curry.py
Created August 1, 2014 10:51
KISS Python curry
#!/usr/bin/env python
def curry(func):
"""
Decorator to curry a function, typical usage:
>>> @curry
... def foo(a, b, c):
... return a + b + c
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 24, 2024 14:58
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);
@xlphs
xlphs / MyIOContext.cpp
Last active June 24, 2022 18:12
MyIOContext
#include <cstdio>
#include <string>
class MyIOContext {
public:
std::string datafile;
AVIOContext *ioCtx;
uint8_t *buffer; // internal buffer for ffmpeg
int bufferSize;
FILE *fh;
@shakesoda
shakesoda / waveframe.rsm
Created January 8, 2014 19:22
WaveFrame's RS format spec
waveframe's .rs format
----------------------
Waveframe's implementation of the .rs format is nothing more than a specific
definition of what Waveframe looks for. It may or may not match shakesoda's
wishes for the format, though it tries to stay as close to the spec as possible.
=={ Standard Sections }==
These standard sections may include nonstandard elements.
See each section's intro text for more information.
--
This format is meant to be very easy to parse, flexible and deterministic. A
section may only be defined once. If multiple are defined using the same
identifier then only the first will be parsed.
Sections are marked by lines beginning with -- <identifier>. Blank identifiers
or ones that aren't searched for will be completely ignored and may contain
anything. Spaces, Tabs, and Newlines (LF, CRLF) are ignored.
Note: the version tag is _required_ to guarantee compatibility - if you don't
@Bobbias
Bobbias / file format breakdown
Created October 10, 2012 01:16
ojn file format information so far
OJN file documentation
LITTLE ENDIAN
HEADER
INT genre
FLOAT bpm
short easy-leve
short med-level
@kazupon
kazupon / Makefile
Created September 25, 2012 17:16
lua: native C-API coroutine sample
INCDIR = $(HOME)/opt/local/include/luajit-2.0
LIBDIR = $(HOME)/opt/local/lib
LIB = -lluajit-51
all: native
native:
cc --std=c99 -o native-co native.c -I$(INCDIR) -L$(LIBDIR) $(LIB) -pagezero_size 10000 -image_base 100000000
clean: