My solutions to Advent of Code 2024.
I'm once again recycling the same home-grown harness I hacked together in previous years.
Will I actually stick with it this year? Unclear! Especially since I'm going on vacation on Dec 11th.
Update: Its December 10th, and look at that - I actually did 11 days of questions! But now its time for vacation, and I won't have a laptop, so it seems Day 11 is the end of the road for me this year...
(Assuming you've put the desired day's input into the inputs dir, either manually, or via run.sh)
cargo run --release -- <day> <question>Tests can be run using the standard cargo test flow.
cargo test -- dayX # only runs tests for the particular dayManually copying question input? Nahhhh, we can do better than that.
When tests are passing and you're ready for prime-time, skip cargo and use the run.sh script:
./run.sh <day> <question>
# e.g: ./run 3 1The harness will automatically download question input if a cookie.txt is provided.
cookie.txt's should contain the following string:
session=53616c...
Getting cookie.txt is easy:
- Open Chrome
- Navigate to any day's input URL (e.g: https://adventofcode.com/2024/day/1/input)
- Open the Chrome Network Inspector
- Refresh the URL
- Right click the
inputrequest, and "copy > copy as cURL"- the string should include a
-H 'cookie: <cookie.txt>'component.
- the string should include a