Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/erikw/advent-of-code-solutions

My solutions to puzzles at https://adventofcode.com/
https://github.com/erikw/advent-of-code-solutions

advent-of-code adventofcode aoc competitive-programming programming-challenges solutions

Last synced: about 2 months ago
JSON representation

My solutions to puzzles at https://adventofcode.com/

Awesome Lists containing this project

README

        

# Advent of Code Solutions 🎄

[![Total stars from all years](https://img.shields.io/badge/dynamic/json?logo=data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAQEBAQEBAQEBAQGBgUGBggHBwcHCAwJCQkJCQwTDA4MDA4MExEUEA8QFBEeFxUVFx4iHRsdIiolJSo0MjRERFwBBAQEBAQEBAQEBAYGBQYGCAcHBwcIDAkJCQkJDBMMDgwMDgwTERQQDxAUER4XFRUXHiIdGx0iKiUlKjQyNEREXP/CABEIAEAAQAMBIgACEQEDEQH/xAAcAAEAAgIDAQAAAAAAAAAAAAAABggFBwMECQH/2gAIAQEAAAAAo+ZXkwwNz5LQwnkD3pk68TyBrFb2kfbiejq3H30t5vM/jFs4d0tlVAMhcWlS5tScQAf/xAAYAQADAQEAAAAAAAAAAAAAAAABBQYCBP/aAAgBAhAAAABtxDuVyOa9rAi/ysLH/8QAGAEAAwEBAAAAAAAAAAAAAAAAAQIEAAP/2gAIAQMQAAAAnbL0oM3Osxl8n//EADYQAAEEAQEEBwYEBwAAAAAAAAIBAwQFBgcACBEhEBITIDEyQRQVIlNhchYXMFJic4KRkqPB/9oACAEBAAE/AOmkpLTI7SJS0sQpM+USgyyKoimqJx9dsgx+4xa2k0d9CKJYx0BXWTVFUe0BDHmPFOaL393xvtNXcR+jr5f4sntvLN9TWDIS/fGgH/oEe7K0xz6JQV2UHi85ynmxhlNSWG+2RGj5oTiBxIEVPUujduDr6wYx9AnF/aKe29E31NWZxfMrIRdFdpjntpSzsji4xNSpiR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7uyqpb7LBWCBWxPJOVXgrNzex2QS3z1i0ey7MMhLLDY3U7fAJXYam1D9EO5Jn//2Q==&labelColor=black&color=118a03&label=all&query=allStars&url=https://adventofcode-badge-vert.vercel.app/api)](#)
[![GitHub language count](https://img.shields.io/github/languages/count/erikw/advent-of-code-solutions)](#)
[![GitHub top language](https://img.shields.io/github/languages/top/erikw/advent-of-code-solutions)](#)
[![SLOC](https://img.shields.io/tokei/lines/github/erikw/advent-of-code-solutions?logo=codefactor&logoColor=lightgrey)](#)
[![GitHub last commit (branch)](https://img.shields.io/github/last-commit/erikw/advent-of-code-solutions/main)](#)

My solutions to puzzles at [adventofcode.com](https://adventofcode.com/). Also check out my collected [tricks](tricks.md).

```perl
`}-' `}-'
___ `}-' `}-' ____/`-, _____/`-,
"-_/}__ `}-'_/`-, /`-,( _,,.{-,_(__,,,.(
[(_.-'`--,__ ____/`-,.(,-`}-'_,>___\/`-, >|`---\
[(__\___\ _`-(--...(..-'_`./`-,/(--,,.( // / >
|_______/-' >`---\ / ( `{ >`---\
__|___|__) / \ / \ /`--/< / \ /|
/ \/ \
```

See also:
* [erikw/hackerrank-solutions](https://github.com/erikw/hackerrank-solutions/)
* [erikw/kattis-solutions](https://github.com/erikw/kattis-solutions/)
* [erikw/leetcode-solutions](https://github.com/erikw/leetcode-solutions/)
* [erikw/project-euler-solutions](https://github.com/erikw/project-euler-solutions)

## 2022 Results

| Day | Part 1 | Part 2 |
| :---: | :---: | :---: |
| [Day 1](https://adventofcode.com/2022/day/1) | ⭐ | ⭐ |
| [Day 2](https://adventofcode.com/2022/day/2) | ⭐ | ⭐ |
| [Day 3](https://adventofcode.com/2022/day/3) | ⭐ | ⭐ |
| [Day 4](https://adventofcode.com/2022/day/4) | ⭐ | ⭐ |
| [Day 5](https://adventofcode.com/2022/day/5) | ⭐ | ⭐ |
| [Day 6](https://adventofcode.com/2022/day/6) | ⭐ | ⭐ |
| [Day 7](https://adventofcode.com/2022/day/7) | ⭐ | ⭐ |
| [Day 8](https://adventofcode.com/2022/day/8) | ⭐ | ⭐ |
| [Day 9](https://adventofcode.com/2022/day/9) | ⭐ | ⭐ |
| [Day 10](https://adventofcode.com/2022/day/10) | ⭐ | ⭐ |
| [Day 11](https://adventofcode.com/2022/day/11) | ⭐ | ⭐ |
| [Day 12](https://adventofcode.com/2022/day/12) | ⭐ | ⭐ |
| [Day 13](https://adventofcode.com/2022/day/13) | ⭐ | ⭐ |
| [Day 14](https://adventofcode.com/2022/day/14) | ⭐ | ⭐ |
| [Day 15](https://adventofcode.com/2022/day/15) | ⭐ | ⭐ |

## Development Setup
### Env: Ruby
```shell
brew bundle install
bundle install
```

### Env: JavaScript
```shell
npm install
```

### Solve puzzle
and now solve today's puzzle or a specific one

```shell
bin/solve_day.sh
bin/solve_day.sh 19/5 # 2019 day 5
bin/solve_day.sh -l rb # Solve with language, here ruby
```

## Session Cookie Expired?
Update:
* `AOC_SESSION` in local `.env`
* `AOC_SESSION` at [Action Secret](https://github.com/erikw/advent-of-code-solutions/settings/secrets/actions) for [.github/workflows/readme-stars.yml](.github/workflows/readme-stars.yml)
* `SESSION` at [Vercel Envvar](https://vercel.com/erikw/adventofcode-badge/settings/environment-variables) for [stackcats/adventofcode-badge](https://github.com/stackcats/adventofcode-badge)
* Then [redeploy](https://vercel.com/erikw/adventofcode-badge/deployments) to restart the service.