Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/metaory/advent-of-code

Advent Of Code Solutions (2021-2022)
https://github.com/metaory/advent-of-code

advent-of-code advent-of-code-2021 advent-of-code-2022 aoc challenge coding-challenge

Last synced: 4 days ago
JSON representation

Advent Of Code Solutions (2021-2022)

Awesome Lists containing this project

README

        

# Advent Of Code

### metaory solutions

### How to run Rust Solutions

[TODO]

### How to run JavaScript Solutions

git clone [email protected]:metaory/advent-of-code.git
cd 2022/javascript
npm install

node index [day]

### Run a Solution

```bash
node index # prompt year & day & input type
node index day_1 # prompt year & day & input type, run day 1
node index day_2 basic # prompt year & run day 2 with basic input
node index 2021 day_4 input # run year 2021 day 4 with complete input
node index 2022 day_4b input # run year 2022 day 4 B with complete input
```

### Scaffold

```bash
year=2022
mkdir $year 2> /dev/null
for i in {1..10}; do
mkdir ${year}/day-${i} &&
echo "console.log('hello day ${i} !')" > ${year}/day-${i}/index.js &&
aoc -y ${year} -d ${i} download -i ${year}/day-${i}/input -p ${year}/day-${i}/puzzle.md;
done
```