From 7c5c56b581442c875eb0049b538f2a47cccc8c19 Mon Sep 17 00:00:00 2001 From: Benjamin Kraft Date: Wed, 1 Jan 2025 18:29:58 +0100 Subject: [PATCH] init --- .env.example | 1 + .gitignore | 2 +- public/favicon.ico | Bin 0 -> 15406 bytes public/fetch.php | 17 +++++++++++++++++ public/index.php | 13 +++++++++++++ public/styles.css | 10 ++++++++++ 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .env.example create mode 100644 public/favicon.ico create mode 100644 public/fetch.php create mode 100644 public/index.php create mode 100644 public/styles.css 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 0000000000000000000000000000000000000000..5346e984a6a6d9c9e12c9459f8eaa58b4c414056 GIT binary patch literal 15406 zcmeHO32;@_8GZp|Q(PDoai~NPv{f-qF#=XVg>3JIpfXilsAB;|ivl7liYzXOFp3O_ zfPe@BA{3(_wUkBFB;+NifC9E7MG~Z8N2LVv?%)4A_x|^uyS*e5+nJ7U=FU0yoPYVw zfBy5I?Y>APB~m|f_Sq3mQzQ2`h(yvOkw|K)`F`0sk;oh_OG~rr+eab==S3oyF%7dY zhgr@^jedC>DJ@!TOpnEl9npA7Wi)P7s(gttJ%{VUgmfw}n&iZd8L<*d#(dCm@Q%dFo z6zMt8^`vCpuj+&jJiw5%j?x74HE({Vc+TxJjP9NE28~~|NJ+VIFNL3dEr|bWouBiO z9s{Yx!xq2tEh5+tKB@Z8D!bt?d+E}ND^2{CAEGTNLmhPGv3})?mOtzMA@lq{B66Wwau#*GS{-^nK^r|1NAdV3rF z`lS!4&A4~egFMPm=g?xDIAbgpk5nX^r-03BccAW!^+#FPVmd8%h>Bz0c?9pMY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+iZ)2qsN*9)Ufv>KK!s}=f&IXm>p(=PK&>yhBy29QHJkOYjV#dvN3=0 z-A7mMH+%gcbzy1O_rCRES2oOkkkUAIhw(`{XoBb9`#Ao8T`j+yKLRt(jIH%snaEF; z!l%2vzuUJD0RDQwKl4+!{(zW=Inaw=`4X>dyDa^?o1gUs<5Ay1l;PaFChKQi2F|CX z|7E@he&s*!;9fmUr&*4;BmCm~z>hV9@*hu(36sb6&(A1q)*R-{_QlAD>9%8@CKI$>mhMoz_|{QjXPLp+^>%QcI7I?smCzQ@-JN{mY?;mi7BDU94zMpu2<%aI#oi(J# zCTNdl-%vcDJB0_>aEGE}*7G$vKRgxv;DtXWTU&(5kHxFZ^TRKip08u}=B>My-KHGx zc&gqlQ|7fpZQ7vbs-w}8ssTY* zgUkH)7dmb`ruck0dH*wP z9h`bUv7g{SUAuBhj2W4Qlv=lFgQa0?*XH{T9WV0ScFaZplkYd&Eus|cAFv0)J}z2X ue-!r9I1|9R2Kxh_Z $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