Skip to content

Instantly share code, notes, and snippets.

View falkreon's full-sized avatar

Falkreon falkreon

View GitHub Profile
@falkreon
falkreon / JRD.java
Created May 19, 2019 20:14
Webfinger object example
package io.github.ionch.aptest.ap;
import java.util.List;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
/**
@falkreon
falkreon / cybertruck_facts.md
Created November 27, 2019 20:26
Master List of Cybertruck Facts

People misunderstand the design a lot; the cybertruck is really the native-cybertron version of Devastator's foot.

The cybertruck is what would happen if EA asked themselves, "what if you could play as the loot crate?"

The cybertruck is what happens when you make something that is already "for men", for men.

With cybertruck Razr answered the question, "what if a car was RGB?"

The cybertruck is like a Tardis, but it's the same size on the inside.

@falkreon
falkreon / Lcm.java
Created December 11, 2019 19:07
Fraction shenanigans
/** Returns the greatest common divisor (factor) of positive integers a and b
* <p>Source: https://en.wikipedia.org/wiki/Binary_GCD_algorithm
*/
private static int gcdUnsigned(int u, int v) {
// simple cases (termination)
if (u == v) return u;
if (u == 0) return v;
if (v == 0) return u;
// look for factors of 2

*excerpt from slab6.txt in the SLAB6 download found at http://advsys.net/ken/download.htm#slab6 *

VOX file format

Both SLABSPRI&SLAB6(D) support a simpler, uncompressed voxel format using the VOX file extension. Here's some C pseudocode that describes the format:

long xsiz, ysiz, zsiz;          //Variable declarations
char voxel[xsiz][ysiz][zsiz];