Solutions for Advent of Code 2020 (in php)

Overview

Advent of Code 2021 Solutions

Solutions to the 2021 edition of Advent of Code.

Running

Simply php day01.php and so forth should do the trick!

Lessons Learned

Some learned lesson for each day:

  1. Rushing first requires cleanup later.
  2. Many modern languages are very similar.
  3. Bitwise operators require refresher courses.
  4. Mutability can blindside you.
  5. Learning a language as you go makes you slow.
  6. Functional(ish) syntax would be very nice!
  7. Math can be intuitive.
  8. Wisdom lies with the crowd. I am not wise.
  9. TODO
  10. TODO
  11. TODO
  12. TODO
  13. TODO
  14. TODO
  15. TODO
  16. TODO
  17. TODO
  18. TODO
  19. TODO
  20. TODO
  21. TODO
  22. TODO
  23. TODO
  24. TODO
  25. TODO

Compendium Repositories

I've created a browser extension for Google Chrome and Mozilla Firefox. It is open source to spice up your private leaderboard page with graphs if you want to contribute!

In addition, you can also check my previous editions' repositories:

You might also like...
Webman quickly creates a verification code tool similar to Google verification code
Webman quickly creates a verification code tool similar to Google verification code

webman-captcha-grid webman quickly creates a verification code tool similar to Google verification code webman 快速创建一个类似于 Google 点图验证码的本地验证码扩展 介绍 webma

Code to accompany the YouTube video "Full PHP cURL API tutorial - how to use a REST API from PHP using cURL"

PHP cURL CRUD Example Example code to accompany this YouTube video. Note that the init_curl.php file contains a placeholder for an API key. DO NOT che

The VarExporter component allows exporting any serializable PHP data structure to plain PHP code.

The VarExporter component allows exporting any serializable PHP data structure to plain PHP code. While doing so, it preserves all the semantics associated with the serialization mechanism of PHP (__wakeup, __sleep, Serializable).

A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.
A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

A pure PHP implementation of the open Language Server Protocol. Provides static code analysis for PHP for any IDE.

Clean Code concepts adapted for PHP - A guide for producing readable, reusable, and refactorable PHP software

Clean Code concepts adapted for PHP - A guide for producing readable, reusable, and refactorable PHP software

Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard
Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard

M2 PHP version compatibility check How To use Requires PHP 7.3+ | PHP 8 This app will run PHP_CodeSniffer with phpcompatibility/php-compatibility on t

Opens an interactive PHP console for running and testing PHP code.

wp-cli/shell-command Opens an interactive PHP console for running and testing PHP code. Quick links: Using | Installing | Contributing | Support Using

Lock library to provide serialized execution of PHP code.

Requirements | Installation | Usage | License and authors | Donations php-lock/lock This library helps executing critical code in concurrent situation

Comments
  • Improve to more modern PHP

    Improve to more modern PHP

    This PR does the following:

    • Adds some bench mark to validate my improvements (Total improvement is from 1.5s to 1.0s)
    • Use explode vs. preg_split (Improves readability, PHP_EOL is correctly defined for each OS)
    • Use intval as a first class callback (Now when you would refactor the method would be taken into consideration)
    • Add type hints (Because you can)
    • Extracted the count from the loop (Avoids calling the count method 2000 times)
    • Removed overhead in solvePart2 (This saves the majority of time.)
    opened by DannyvdSluijs 1
Owner
Jeroen Heijmans
Software developer, gamer, chef, and e-sports fan from the Netherlands.
Jeroen Heijmans
YCOM Impersonate. Login as selected YCOM user 🧙‍♂️in frontend.

YCOM Impersonate Login as selected YCOM user in frontend. Features: Backend users with admin rights or YCOM[] rights, can be automatically logged in v

Friends Of REDAXO 17 Sep 12, 2022
Messaging solutions for PHP - It contains advanced features build on top of a transport component

It contains advanced features build on top of a transport component. Client component kind of plug and play things or consumption component that simplify message processing a lot. Read more about it in documentation.

Enqueue 175 Jan 3, 2023
Public solutions and challenges from sinf ctf 2021

SINFCTF2021 CTF Challenges (and official solutions) created for SINFCTF2021, a companion CTF for Semana de Informática 2021. There's a folder for each

NIAEFEUP 5 Sep 30, 2022
Developer-friendly framework heavily inspired by Laravel and based on Timber and Wpemerge solutions for WordPress themes development with Bedrock folder structure

Lightweight Brocooly (Brocket) Improved Controllers, Middleware and Routers, but slightly less powerful Container Open beta. Package in development Cr

Ihar Aliakseyenka 3 Mar 4, 2022
Result of our code-along meetup writing PHP 8.1 code

PHP 8.1 Demo Code This code demonstrates various PHP 8.0 and 8.1 features in a realistic, functional (but incomplete) codebase. The code is part of so

azPHP 2 Nov 14, 2021
Dead Code Detector (DCD) for PHP code.

This project is no longer maintained and its repository is only kept for archival purposes. PHP Dead Code Detector (PHPDCD) phpdcd is a Dead Code Dete

Sebastian Bergmann 406 Dec 30, 2022
⚗️ Adds code analysis to Laravel improving developer productivity and code quality.

⚗️ About Larastan Larastan was created by Can Vural and Nuno Maduro, got artwork designed by @Caneco, is maintained by Can Vural, Nuno Maduro, and Vik

Nuno Maduro 4.4k Jan 4, 2023
Free ZIP Code API - Free Access to Worldwide Postal Code Data

About Zipcodebase - Free Zip Code API Zipcodebase is a zip code API that was founded in 2019 to solve common issues with postal code data. As we have

SaaS Industries 2 Nov 26, 2022
Preload your sweet sweet code to opcache with a composer command, making your code faster to run.

Composer Preload Preload your sweet sweet code to opcache with a composer command, making your code run faster. Composer Preload is a composer plugin

Ayesh Karunaratne 197 Dec 6, 2022
The SensioLabs DeprecationDetector runs a static code analysis against your project's source code to find usages of deprecated methods, classes and interfaces

SensioLabs DeprecationDetector CAUTION: This package is abandoned and will no longer receive any updates. The SensioLabs DeprecationDetector runs a st

QOSSMIC GmbH 389 Nov 24, 2022