{"id":18535772,"url":"https://github.com/daniel5151/aoc21","last_synced_at":"2025-05-15T00:30:39.257Z","repository":{"id":79235960,"uuid":"433713834","full_name":"daniel5151/aoc21","owner":"daniel5151","description":"My solutions to Advent of Code 2021 (in Rust)","archived":false,"fork":false,"pushed_at":"2021-12-08T04:10:50.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-17T07:32:36.199Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniel5151.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-01T06:43:30.000Z","updated_at":"2021-12-08T04:10:53.000Z","dependencies_parsed_at":"2023-06-28T10:31:08.131Z","dependency_job_id":null,"html_url":"https://github.com/daniel5151/aoc21","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Faoc21","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Faoc21/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Faoc21/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel5151%2Faoc21/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel5151","download_url":"https://codeload.github.com/daniel5151/aoc21/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254250832,"owners_count":22039280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T19:27:20.389Z","updated_at":"2025-05-15T00:30:39.210Z","avatar_url":"https://github.com/daniel5151.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2021\n\nMy solutions to Advent of Code 2021.\n\n- Last year: \u003chttps://github.com/daniel5151/aoc20\u003e\n\nGoals for 2021:\n\n- Solve the questions (duh)\n- Each day should have two commits:\n  - The \"quick and dirty\" commit (rightanswer% speedrun)\n  - The \"idiomatic Rust\" commit (nice error handling, fancy iterators, etc...)\n- Solutions should have _reasonable_ (i.e: not strictly the _best_) space and time complexity\n- Solutions should terminate reasonably quickly\n\nSome non-goals:\n\n- Scoring super high on the leaderboard\n  - Not that I won't _try_ to land somewhere on the leaderboard 😉\n  - Only have until Dec 11th. I'm on east-coast time after that, and midnight coding != fast coding\n\n## Running\n\n(Assuming you've put the desired day's input into the `inputs` dir, either manually, or via `run.sh`)\n\n```bash\ncargo run --release --features extras -- \u003cday\u003e \u003cquestion\u003e\n```\n\nTests can be run using the standard `cargo test` flow.\n\n```bash\ncargo test -- dayX # only runs tests for the particular day\n```\n\n## Running (on the day of)\n\nManually copying question input? Nahhhh, we can do better than that.\n\nWhen tests are passing and you're ready for prime-time, skip `cargo` and use the `run.sh` script:\n\n```bash\n./run.sh \u003cday\u003e \u003cquestion\u003e\n# e.g: ./run 3 1\n```\n\nThe harness will automatically download question input if a `cookie.txt` is provided.\n\n`cookie.txt`'s should contain the following string:\n\n```\nsession=53616c...\n```\n\nGetting `cookie.txt` is easy:\n- Open Chrome\n- Navigate to _any_ day's input URL (e.g: https://adventofcode.com/2021/day/1/input)\n- Open the Chrome Network Inspector\n- Refresh the URL\n- Right click the `input` request, and \"copy \u003e copy as cURL\"\n    - the string should include a `-H 'cookie: \u003ccookie.txt\u003e'` component.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel5151%2Faoc21","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel5151%2Faoc21","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel5151%2Faoc21/lists"}