generate_dir.sh
is a Bash script for creating a directory for solutions to Advent of Code and initializing a Rust project in it. It creates a src/main.rs file based on template.rs
and injects the user provided sample solution to part 1 of the challenge into a unit test. It also prompts the user to enter the sample input file. If the user has set the AOC_SESSION environment variable, it will download the problem input, otherwise it will prompt the user to provide the problem input as well. Finally, the script opens the rust file, the sample input file, and the problem input file after they have been created.
To get your session token:
- Go to advent of code website
- Open developer console
- Navigate to "application tab"
- Copy "session" cookie
Day | Part 1 | Part 2 |
---|---|---|
Day 1 | ⭐ | ⭐ |
Day 2 | ⭐ | ⭐ |
Day 3 | ⭐ | ⭐ |
Day 4 | ⭐ | ⭐ |
Day 5 | ⭐ | ⭐ |
Day 6 | ⭐ | ⭐ |
Day 7 | ⭐ | ⭐ |
Day 8 | ⭐ | ⭐ |
Day 9 | ⭐ | ⭐ |
Day 10 | ⭐ | ⭐ |
Day 11 | ⭐ | ⭐ |
Day 12 | ⭐ | ⭐ |
Day 13 | ⭐ | ⭐ |
Day 14 | ⭐ | ⭐ |
Day 15 | ⭐ | ⭐ |
Day 16 | ⭐ | ⭐ |
Day 17 | ⭐ | ⭐ |
Day 18 | ⭐ | ⭐ |
Day 19 | ⭐ | ⭐ |
Day 20 | ⭐ | ⭐ |
Day 21 | ⭐ | ⭐ |
Day 22 | ⭐ | ⭐ |
Day 23 | ⭐ | ⭐ |
Day 24 | ⭐ | ⭐ |
Day 25 | ⭐ | ⭐ |