Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rjelierse/adventofcode

All solutions for Advent of Code through the years
https://github.com/rjelierse/adventofcode

advent-of-code advent-of-code-2016 advent-of-code-2017 advent-of-code-2018 golang

Last synced: 11 days ago
JSON representation

All solutions for Advent of Code through the years

Awesome Lists containing this project

README

        

# Advent of Code

Monorepo for all AoC solutions

* [2018](./2018)
* [2017](./2017)
* [2016](./2016)

## Set up new year

```sh
YEAR=2018
mkdir -p ${YEAR}
sed s/YEAR/${YEAR}/g main.tpl > ${YEAR}/main.go
for DAY in {01..25}; do
mkdir -p ${YEAR}/${DAY}
sed s/DAY/day${DAY}/g solve.tpl > ${YEAR}/${DAY}/solve.go
done
git add -N ${YEAR}
```

## Create runtime

```sh
YEAR=2018
go build -o adventofcode-${YEAR} ./${YEAR}
```

## Solve puzzle

```sh
YEAR=2018
DAY=01
./adventofcode-${YEAR} day${DAY} -input ${YEAR}/${DAY}/input.txt
```