Skip to content

Instantly share code, notes, and snippets.

M Joshua Ryan luser-dr00g

Block or report user

Report or block luser-dr00g

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@luser-dr00g
luser-dr00g / pd0.pdf
Created Feb 12, 2018
pdf with errors
View pd0.pdf
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 Feb 1, 2018
pdf with error in xref table?
View dm4.pdf
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 / dm3.pdf
Created Jan 31, 2018
malformed pdf file
View dm3.pdf
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 / chaos.ps
Last active Mar 27, 2016
The Chaos Game
View chaos.ps
/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
View parsing.typescript
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 / mask.c
Created Sep 7, 2015
test program for cairo bitmask makes a big blue turkey
View mask.c
/* 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>
View a8086pi.c
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;
View a8086p.c
#include<ctype.h>
#include<stdint.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/stat.h>
#include<unistd.h>
typedef intptr_t I; typedef uintptr_t U;
typedef short S; typedef unsigned short US;
typedef signed char C; typedef unsigned char UC;
@luser-dr00g
luser-dr00g / shapes.ps
Created Sep 23, 2014
A few small drawing functions: polygons, spirals, and stars.
View shapes.ps
%polygon.ps
%rad n {proc} atpoly -
%call proc having rotated+scaled
%so (1,0) is each vertex of rad-radius n-polygon
/atpoly {
%3 args (atpoly)=
4 dict begin /p exch def /n exch def % rad
/m matrix currentmatrix def
%(rad2=)print rad2 =
%dup (atpoly: rad=)print =
@luser-dr00g
luser-dr00g / font_transform_test.c
Created Sep 23, 2014
testing FT_Set_Transform with FT_Render_Glyph and accessing advance vector
View font_transform_test.c
//make font_transform_test CFLAGS=`freetype-config --cflags ` LDLIBS=`freetype-config --libs` LDLIBS+=`pkg-config fontconfig --libs` LDLIBS+='-lm'
/*
* Xpost - a Level-2 Postscript interpreter
* Copyright (C) 2013, Michael Joshua Ryan
* Copyright (C) 2013, Vincent Torri
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
You can’t perform that action at this time.