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
bundle install
npm install
pip install -r requirements.txt
Fetch your AoC Session Cookie and store as an envvar or in .env
as $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
Tip
The default language could 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.