Download the PHP package mjderoode/advent_of_code_helper without Composer

On this page you can find all versions of the php package mjderoode/advent_of_code_helper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package advent_of_code_helper

Advent of Code Helper, Laravel Package

Every year, I run into the same issues and start “hacking and cracking” as soon as Advent of Code begins. Not anymore! I wrote this Laravel package with two clear goals: to download your personal puzzle inputs and to prepare controller files so you don’t have to start hacking in your web.php.

This Laravel package can download all of your personal puzzle inputs for a specific year and, afterward, it prepares a default controller split into two parts, allowing you to solve each part of the daily Advent of Code challenges. I also prepared some options on how to view your solution.

My Laravel package is currently in a “WIP” (Work in Progress) phase, so please keep this in mind when using it.

Get your Session Cookie

1.   Log in to the Advent of Code website: https://adventofcode.com
2.   Open the developer console in your browser and navigate to the Cookies section
2.5  - For Chromium-based browsers, go to Application → Storage → Cookies, then click on the Advent of Code website URL.
3.   Look for the "session" cookie, and copy its value 
4.   Add the following key to your .env file: ADVENT_OF_CODE_SESSION_COOKIE, and paste your session cookie value here.

Installation

Install mjderoode/advent_of_code_helper with composer:

Add your session cookie value to the .env:

Optionally, you can disable routing by setting the following key in your .env file (must be a boolean; the default is true):

Usage/ Examples

The Laravel package includes two commands: aoc:import and aoc:try.

The aoc:import command is used to download your personal puzzle inputs and prepare the necessary Controller files. This command expects two parameters: the first (year) is mandatory with a default value of 2024, and the second (day) is optional.

To download all of your puzzle inputs from 2023, run:

By specifying the second argument, you can download the puzzle input for a specific day, for example day 3 of 2016.

The aoc:try command is used to test your solutions. This command expects three parameters: year, day, and part (with defaults: year=2024 and part=1).

Publishable assets

Don’t like the stub? No problem! Just run the following command, and the stub will be published, ready for you to edit as you like!

Try out your solutions

In this Laravel package, you have several options to try out your solutions. The first is through the command line—refer to the aoc:try command as explained in the previous section.

The second option is to view your solution in the browser. I’ve prepared a specific route for your Advent of Code controllers (see php artisan route:list, specifically aoc.solution). For example, to view your solution for “year 2016, day 2, part 2,” go to {{ YOUR APP URL HERE }}/2016/2/2.

TODO's

Tasks

Authors

License

The MIT License (MIT).


All versions of advent_of_code_helper with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version >=7.0
illuminate/support Version >=11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mjderoode/advent_of_code_helper contains the following files

Loading the files please wait ...