Advent of Code Solutions 🎄

May 6, 2026 · View on GitHub

Total stars from all years GitHub language count GitHub top language Languages Used SLOC GitHub last commit (branch) Update README ⭐ Lint

Open in GitHub Codespaces

AoC Banner

My solutions to puzzles at adventofcode.com. Check out my collected tricks ✨ for solving AoC.

See also:

2024 Results

DayPart 1Part 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

All Results

Stars 2015

Stars 2016

Stars 2017

Stars 2018

Stars 2019

Stars 2020

Stars 2021

Stars 2022

Stars 2023

Stars 2024

Development Setup

Per Environment

macOS

brew bundle install

Debian/Ubuntu

sed 's/#.*$//' < apt-packages.txt | xargs sudo apt-get -y install

Ruby

bundle install

JavaScript

npm install

Python

pip install -r requirements.txt

Fetch your AoC Session Cookie and set it up as an environment variable by either:

  • putting it a .env file in the repo's root dir as AOC_SESSION=...
  • export in your shell ('s startup file) as export AOC_SESSION=....
  • Or some other way according to Session Cookie Expired?

Solve a Puzzle

and now solve today's puzzle or a specific one:

bin/solve_day.sh           # Solve today's puzzle with default language (ruby)
bin/solve_day.sh 19/5      # 2019 day 5
bin/solve_day.sh -l py     # Solve with language, here Python

To fetch input for an already solved problem:

bin/fetch_input.sh yy/mm

Tip

The default language can be set with an envvar, e.g., with dotenv in a .env fil,e which is also read by bin/solve_day.sh:

echo AOC_LANG=py >> .env

Update AOC_SESSION in: