Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

My solutions for Advent of Code written in TypeScript

License

tbusser/advent-of-code

Repository files navigation

βœ¨πŸŽ„ Advent of Code πŸŽ„βœ¨

These are my solutions for the puzzles of Advent of Code. I enjoy writing code in TypeScript so that's what did. This repository contains everything you need to run my solutions.

Setup

The solutions require NodeJS version 22.1.0 to run. In addition you need a couple of packages, these can be installed by running the pnpm install command from the root folder of the project.

Running the solutions

To run a specific solution you can use the following command:

pnpm solve <year>/<day>/<part>

For instance to run the solution for day 2, part 1 you need the command:

pnpm solve 2015εΉ΄2月1ζ—₯

Puzzle input

Each solution requires the puzzle input. When there is no input.txt file in the day folder, the input will be downloaded from the Advent of Code website. Because the input is different per account a session ID cookie is needed. To get your session ID cookie, visit Advent of Code website and login. Using the inspector of the browser, find the value of the session cookie. This value needs to be inserted in the .env file that you will have to create in the root folder of the project. See the .env.example file for what it should look like.

If you want to use input other than the input from the Advent of Code website, you can create the input.txt file yourself and fill it with whatever input you want to use for your solution.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /