Skip to content

erikw/advent-of-code-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code Solutions 🎄

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. Also check out my collected tricks ✨.

See also:

2024 Results

Day Part 1 Part 2

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

Session Cookie

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=....

Solve a Puzzle

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

bin/solve_day.sh           # Solve today's puzzle with default lanuage (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 file which is also read by bin/solve_day.sh:

echo AOC_LANG=py >> .env

Session Cookie Expired?

Update: