Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mheob/advent-of-code-2023
My personal template for Advent of Code
https://github.com/mheob/advent-of-code-2023
advent-of-code advent-of-code-2023 typescript
Last synced: 1 day ago
JSON representation
My personal template for Advent of Code
- Host: GitHub
- URL: https://github.com/mheob/advent-of-code-2023
- Owner: mheob
- License: mit
- Created: 2023-12-02T11:50:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-27T13:06:11.000Z (about 1 year ago)
- Last Synced: 2024-05-01T21:57:52.529Z (9 months ago)
- Topics: advent-of-code, advent-of-code-2023, typescript
- Language: TypeScript
- Homepage:
- Size: 391 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🎄 Advent of Code Template
- **Bun & TypeScript**
- Automatic day setup
- Puzzle input automatically fetched
- Performance metricsThis template is strongly inspired by the template from [matijaoe](https://github.com/matijaoe/advent-of-code/).\
Thanks for your inspiration!## Setup
Ensure [`bun`](https://bun.sh/) is installed:
```sh
bun -v
```if not installed, run this:
```sh
curl -fsSL https://bun.sh/install | bash
```Install dependencies:
```sh
bun install
```Set up a new day:
```sh
bun setup 1
```Run day solutions:
```sh
bun day 1
```For automatic puzzle input retrieval, define `.env` file with `session` cookie from [adventofcode.com](https://adventofcode.com):
```env
SESSION=
YEAR=2023
```## Structure
Generated day structure:
```ts
import { parseLines, readInput } from 'io';const input = await readInput('day-01');
export const part1 = () => {
const lines = parseLines(input);
// TODO: add your code goes here
return lines.length;
};
````bun day ` output:
```text
🕯️ Your result for day :
🌲 Part One: 70698 (1.11 ms)
🎄 Part Two: 140471 (383.5 µs)
```## Days
⭐ / ❌
| Day | Part 1 | Part 2 | Solution | Advent of Code link |
| :-: | :----: | :----: | :------------------: | :--------------------------------------------: |
| 01 | ⭐ | ⭐ | [Link](./src/day-01) | [Day 01](https://adventofcode.com/2023/day/1) |
| 02 | ⭐ | ⭐ | [Link](./src/day-02) | [Day 02](https://adventofcode.com/2023/day/2) |
| 03 | ⭐ | ⭐ | [Link](./src/day-03) | [Day 03](https://adventofcode.com/2023/day/3) |
| 04 | ⭐ | ⭐ | [Link](./src/day-04) | [Day 04](https://adventofcode.com/2023/day/4) |
| 05 | ⭐ | ⭐ | [Link](./src/day-05) | [Day 05](https://adventofcode.com/2023/day/5) |
| 06 | ⭐ | ⭐ | [Link](./src/day-06) | [Day 06](https://adventofcode.com/2023/day/6) |
| 07 | ⭐ | ⭐ | [Link](./src/day-07) | [Day 07](https://adventofcode.com/2023/day/7) |
| 08 | ⭐ | ⭐ | [Link](./src/day-08) | [Day 08](https://adventofcode.com/2023/day/8) |
| 09 | ⭐ | ⭐ | [Link](./src/day-09) | [Day 09](https://adventofcode.com/2023/day/9) |
| 10 | ⭐ | ⭐ | [Link](./src/day-10) | [Day 10](https://adventofcode.com/2023/day/10) |
| 11 | ⭐ | ⭐ | [Link](./src/day-11) | [Day 11](https://adventofcode.com/2023/day/11) |
| 12 | ⭐ | ⭐ | [Link](./src/day-12) | [Day 12](https://adventofcode.com/2023/day/12) |
| 13 | ⭐ | ⭐ | [Link](./src/day-13) | [Day 13](https://adventofcode.com/2023/day/13) |
| 14 | ⭐ | ⭐ | [Link](./src/day-14) | [Day 14](https://adventofcode.com/2023/day/14) |
| 15 | ⭐ | ⭐ | [Link](./src/day-15) | [Day 15](https://adventofcode.com/2023/day/15) |
| 16 | ⭐ | ⭐ | [Link](./src/day-16) | [Day 16](https://adventofcode.com/2023/day/16) |
| 17 | ⭐ | ⭐ | [Link](./src/day-17) | [Day 17](https://adventofcode.com/2023/day/17) |
| 18 | ⭐ | ⭐ | [Link](./src/day-18) | [Day 18](https://adventofcode.com/2023/day/18) |
| 19 | ⭐ | ⭐ | [Link](./src/day-19) | [Day 19](https://adventofcode.com/2023/day/19) |
| 20 | ⭐ | ⭐ | [Link](./src/day-20) | [Day 20](https://adventofcode.com/2023/day/20) |
| 21 | ⭐ | ⭐ | [Link](./src/day-21) | [Day 21](https://adventofcode.com/2023/day/21) |
| 22 | ⭐ | ⭐ | [Link](./src/day-22) | [Day 22](https://adventofcode.com/2023/day/22) |
| 23 | ⭐ | ⭐ | [Link](./src/day-23) | [Day 23](https://adventofcode.com/2023/day/23) |
| 24 | ⭐ | ❌ | [Link](./src/day-24) | [Day 24](https://adventofcode.com/2023/day/24) |
| 25 | ⭐ | ❌ | [Link](./src/day-25) | [Day 25](https://adventofcode.com/2023/day/25) |