diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..4e99fdc --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +SESSION_COOKIE= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 65584ca..fd76151 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .idea .env node_modules - +input/* diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..5346e98 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/fetch.php b/public/fetch.php new file mode 100644 index 0000000..e4ab226 --- /dev/null +++ b/public/fetch.php @@ -0,0 +1,17 @@ + $value){ + $_ENV[$key] = $value; +} + + +for ($i = 1; $i <= 25; $i++){ + $context = stream_context_create([ + 'http' => [ + 'header' => 'Cookie: session=' . $_ENV["SESSION_COOKIE"] . '\r\n' + ] + ]); + $contents = file_get_contents("https://adventofcode.com/2024/day/$i/input", context: $context); + + file_put_contents("../input/$i.txt", $contents); +} \ No newline at end of file diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..843bb27 --- /dev/null +++ b/public/index.php @@ -0,0 +1,13 @@ + + + + AoC 2024 Solutions + + + + + + + \ No newline at end of file diff --git a/public/styles.css b/public/styles.css new file mode 100644 index 0000000..f6de69f --- /dev/null +++ b/public/styles.css @@ -0,0 +1,10 @@ +@import url('https://fonts.googleapis.com/css2?family=Red+Hat+Mono:ital,wght@0,300..700;1,300..700&display=swap'); + +body { + background-color: rgb(30, 30, 30); +} + +* { + color: white; + font-family: "Red Hat Mono", serif; +} \ No newline at end of file