https://github.com/neofox/advent-of-code-elixir
Advent Of Code solutions in elixir
https://github.com/neofox/advent-of-code-elixir
Last synced: over 1 year ago
JSON representation
Advent Of Code solutions in elixir
- Host: GitHub
- URL: https://github.com/neofox/advent-of-code-elixir
- Owner: Neofox
- Created: 2024-11-30T11:56:04.000Z (over 1 year ago)
- Default Branch: 2024
- Last Pushed: 2024-12-09T07:17:10.000Z (over 1 year ago)
- Last Synced: 2025-01-29T17:44:31.518Z (over 1 year ago)
- Language: Elixir
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code Elixir version
## Runing steps
### Dependencies update
```bash
mix deps.get
```
### Running tests
```bash
mix test
```
### Running a day (day 1 part 1 for example)
```bash
mix d01.p1
```
if you want to run the benchmark, you can add the `-b` flag
```bash
mix d01.p1 -b
```
### Optional Automatic Input Retriever
This starter comes with a module that will automatically get your inputs so you
don't have to mess with copy/pasting. Don't worry, it automatically caches your
inputs to your machine so you don't have to worry about slamming the Advent of
Code server. You can do enanle it by creating a `config/secrets.exs` file containing
the following:
```elixir
import Config
config :advent_of_code, AdventOfCode.Input,
allow_network?: true,
session_cookie: "..." # yours will be longer
```
After which, you can retrieve your inputs using the module:
```elixir
AdventOfCode.Input.get!(day, year)
AdventOfCode.Input.get!(7)
AdventOfCode.Input.delete!(7, 2019)
```