Skip to content

Instantly share code, notes, and snippets.

@beesandbombs
beesandbombs / cubes.pde
Created August 19, 2020 11:31
cube / cubes
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@beesandbombs
beesandbombs / arcDance.pde
Created February 28, 2020 17:52
arc dance
// arc dance by dave
// https://twitter.com/beesandbombs/status/1233403691673235457
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
@leommoore
leommoore / file_magic_numbers.md
Last active November 14, 2024 17:11
File Magic Numbers

File Magic Numbers

Magic numbers are the first bits of a file which uniquely identify the type of file. This makes programming easier because complicated file structures need not be searched in order to identify the file type.

For example, a jpeg file starts with ffd8 ffe0 0010 4a46 4946 0001 0101 0047 ......JFIF.....G ffd8 shows that it's a JPEG file, and ffe0 identify a JFIF type structure. There is an ascii encoding of "JFIF" which comes after a length code, but that is not necessary in order to identify the file. The first 4 bytes do that uniquely.

This gives an ongoing list of file-type magic numbers.

Image Files