Skip to content

Instantly share code, notes, and snippets.

typedef intptr_t I;
typedef uintptr_t U;
typedef short S;
typedef unsigned short US;
typedef signed char C;
typedef unsigned char UC;
typedef void V;
U o, w, d, f;
U x, y, z;
void *p;
@luser-dr00g
luser-dr00g / mask.c
Created September 7, 2015 00:43
test program for cairo bitmask makes a big blue turkey
/* test program for cairo bit mask
makes a big blue turkey */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <cairo.h>
#include <X11/Xlib.h>
#include <cairo-xlib.h>
#include <unistd.h>
josh@LAPTOP-ILO10OOF ~/inca/olmec
$ cat ex.h
// predicate table contains predicate functions
// and associated enum values
#define PREDTAB(_) \
_( ANY = 1, qa, 1 ) \
_( VAR = 2, qp, gettag(x)==PROG \
|| (gettag(x)==PCHAR && getval(x)!=0x2190 /*leftarrow*/ ) ) \
_( NOUN = 4, qn, gettag(x)==LITERAL \
@luser-dr00g
luser-dr00g / chaos.ps
Last active March 27, 2016 05:22
The Chaos Game
/randomseed { (/dev/random)(r)file read pop srand } bind def
/random { % max => 0<num<max
rand 16#7fffffff div mul
} bind def
/genpoly { % n => [ [x0 y0] ... [xn-1 yn-1] ]
2 dict begin
/n exch def
/da 360 n div def
@luser-dr00g
luser-dr00g / dm3.pdf
Created January 31, 2018 22:07
malformed pdf file
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luser-dr00g
luser-dr00g / dm4.pdf
Created February 1, 2018 03:03
pdf with error in xref table?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@luser-dr00g
luser-dr00g / pd0.pdf
Created February 12, 2018 03:39
pdf with errors
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.