Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vorban/laravel-advent-of-code
Laravel Advent of Code template repository.
https://github.com/vorban/laravel-advent-of-code
advent-of-code laravel template
Last synced: about 1 month ago
JSON representation
Laravel Advent of Code template repository.
- Host: GitHub
- URL: https://github.com/vorban/laravel-advent-of-code
- Owner: vorban
- License: mit
- Created: 2023-11-08T07:41:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-01T09:11:53.000Z (about 1 year ago)
- Last Synced: 2023-12-08T21:28:02.000Z (about 1 year ago)
- Topics: advent-of-code, laravel, template
- Language: PHP
- Homepage:
- Size: 153 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-advent-of-code
Advent of Code template repository.
**This is not made to be hosted.** This is made to boostrap
your yearly Advent of Code solving routine as a Laravel dev,
by removing the hassle of preparing a php environment with
appropriate helpers.Released under the MIT License.
See [LICENSE](./LICENSE).Copyright :copyright: 2023 {{ $your_name }}
## AoC compliance and usage of this template
This repository does follow the [automation guidelines](https://www.reddit.com/r/adventofcode/wiki/faqs/automation) on the [/r/adventofcode](https://www.reddit.com/r/adventofcode/) community wiki. Specifically:
- No automation is provided
- Outbound calls to the /events endpoint are cached for 24h (see `app/Console/UpdateBadgesCommand.php`)
- Once inputs are downloaded, they are cached locally indefinitly (see `app/Console/PrepareCommand`)
- If you suspect your input is corrupted, you can run the command again to regenerate from cache. Manual deletion of cache files is required to enable a fresh download.The User-Agent header is set to information you need to provide in your `.env`.
It must be set to the owner of the end-repository (**not the template repository owner**).This template repository is provided as-is,
as detailed in the [LICENSE](./LICENSE) file.By using this template repository, you become the
one and only maintainer of your new repository.By using this template repository, you take responsability
over your usage of the provided scripts. The original author
designed them to be executed 25 times a year, no more.Although a Laravel application, this code is not fit
to be hosted. Specifically, the code as-is is not fit
for any kind of automation or production environments.## Installation
First, click on "use this template" and generate a new repo based on this one.
```sh
git clone [email protected]:{{ $your_name }}/{{ $your_repo_name }}.git
cd advent-of-codecp .env.example .env
```**Specify in the .env the values for**:
- your GitHub username
- your GitHub email
- the name of your repositoryThese are **required** by the AoC maintainers to track
abusive use of the website.
Without those values, the scripts **will** get banned.### Using docker ?
```sh
docker run --rm --interactive --tty --volume $PWD:/app composer installvendor/bin/sail up -d
echo Enjoy!
```### Got a local dev environment ?
```sh
composer install
echo Enjoy!
```## Usage
Use `sail` or `php` depending on wether you want to use docker or not.
```sh
# generate code file and download input
sail artisan aoc:prepare {year} {day}# hopefully first try !
sail artisan aoc:run {year} {day} {--example}# once you're done for the day
sail artisan aoc:update-badges
```