My solutions to puzzles at adventofcode.com. Check out my collected tricks β¨ for solving AoC.
See also:
- erikw/hackerrank-solutions
- erikw/kattis-solutions
- erikw/leetcode-solutions
- erikw/project-euler-solutions
| Day | Part 1 | Part 2 |
|---|---|---|
| Day 1 | β | β |
| Day 2 | β | β |
brew bundle installsed 's/#.*$//' < apt-packages.txt | xargs sudo apt-get -y installbundle installnpm installpip install -r requirements.txtFetch your AoC Session Cookie and set it up as an environment variable by either:
- putting it a
.envfile in the repo's root dir asAOC_SESSION=... - export in your shell ('s startup file) as
export AOC_SESSION=.... - Or some other way according to Session Cookie Expired?
and now solve today's puzzle or a specific one:
bin/solve_day.sh # Solve today's puzzle with default language (ruby)
bin/solve_day.sh 19/5 # 2019 day 5
bin/solve_day.sh -l py # Solve with language, here PythonTo fetch input for an already solved problem:
bin/fetch_input.sh yy/mmTip
The default language can be set with an envvar, e.g., with dotenv in a .env fil,e which is also read by bin/solve_day.sh:
echo AOC_LANG=py >> .envUpdate AOC_SESSION in:
- The
.envfile for local development. - Codespaces secrets for GitHub Codespaces development.
- Action Secret for .github/workflows/readme-stars.yml.
- Vercel Envvar for erikw/adventofcode-badge.
- Then redeploy to restart the service.
- In the lined repo clone:
vercel env update -y AOC_SESSION && vercel deploy --prod
