Skip to content

Instantly share code, notes, and snippets.

@weirddan455
weirddan455 / ids.txt
Last active November 17, 2021 16:04
Magic Arena Card Ids
6993 Forest
7065 Island
7153 Mountain
7193 Plains
7347 Swamp
9135 Mind Stone
13491 Ancestral Mask
14717 Captain Sisay
16555 Terravore
16569 Roar of the Wurm
@weirddan455
weirddan455 / json.c
Last active November 17, 2021 16:04
Program to extract Arena Ids from MTGJson dataset
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
typedef struct Card
{
@weirddan455
weirddan455 / aoc.c
Created December 8, 2021 09:43
Advent of Code Day 8 Part 2
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
typedef struct Digit
{
@weirddan455
weirddan455 / aoc.c
Created December 9, 2021 08:22
Advent of Code Day 9
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/stat.h>
typedef struct Point
{
@weirddan455
weirddan455 / aoc.c
Created December 14, 2021 11:25
Advent of Code Day 14
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
typedef struct Template
@weirddan455
weirddan455 / aoc.c
Created December 17, 2021 00:24
Advent of Code Day 16
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
uint64_t versionSum;
@weirddan455
weirddan455 / aoc.c
Created December 19, 2021 03:29
Advent of Code Day 18
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
typedef struct Element
@weirddan455
weirddan455 / aoc.c
Created December 20, 2021 02:54
Advent of Code Day 19
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
typedef struct Vector
@weirddan455
weirddan455 / aoc.c
Created December 21, 2021 22:57
Advent of Code Day 21 Part 2
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
typedef struct Player
{
int position;
int score;
@weirddan455
weirddan455 / aoc.c
Created December 23, 2021 22:05
Advent of Code Day 22 Part 2
#include <fcntl.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
typedef struct Instruction