My solutions to puzzles at adventofcode.com. Also check out my collected tricks ✨.
See also:
- erikw/hackerrank-solutions
- erikw/kattis-solutions
- erikw/leetcode-solutions
- erikw/project-euler-solutions
Day | Part 1 | Part 2 |
---|
brew bundle install
sed 's/#.*$//' < apt-packages.txt | xargs sudo apt-get -y install
bundle install
npm install
pip install -r requirements.txt
Fetch your AoC Session Cookie and set it up as an environment variable by either:
- putting it a
.env
file in the repo's root dir asAOC_SESSION=...
- export in your shell ('s startup file) as
export AOC_SESSION=...
.
and now solve today's puzzle or a specific one:
bin/solve_day.sh # Solve today's puzzle with default lanuage (ruby)
bin/solve_day.sh 19/5 # 2019 day 5
bin/solve_day.sh -l py # Solve with language, here Python
To fetch input
for an already solved problem:
bin/fetch_input.sh yy/mm
Tip
The default language can be set with an envvar, e.g. with dotenv in a .env
file which is also read by bin/solve_day.sh
:
echo AOC_LANG=py >> .env
Update:
AOC_SESSION
in local.env
for local development.AOC_SESSION
in Codespaces secrets for GitHub Codespaces development.AOC_SESSION
in Action Secret for .github/workflows/readme-stars.yml.SESSION
in Vercel Envvar for erikw/adventofcode-badge.- Then redeploy to restart the service.