Skip to content

ashmortar/advent-of-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

This Repo contains the solutions and helpers I have created for doing the Advent of Code challenges.

Setup

  • install go
  • create a file at the top level of the repo called aoc_cookie
  • paste the value of your session cookie from the advent of code site into the file

Running the code

Run a specific day

go run ./cmd/aoc 2020 1
# or
go run ./cmd/aoc -year 2020 -day 1

Run a specific year

go run ./cmd/aoc 2020
# or
go run ./cmd/aoc -year 2020

Run all years

go run ./cmd/aoc

Generating Setup Code

Create the next day chronologically

go run ./cmd/generate

Create a specific day

go run ./cmd/generate 2020 1
# or
go run ./cmd/generate -year 2020 -day 1

Fork and use for your own solutions?

If you want to use this repo as a starting point for your own solutions, you can fork it and then run the following command to remove all the solutions and generate the setup code for all the days.

Reset all years

go run ./cmd/cmd/generate -reset

Reset a year

go run ./cmd/generate -reset -year 2020

Reset a day

go run ./cmd/generate -reset -year 2020 -day 1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published