Skip to content

Instantly share code, notes, and snippets.

View maartenpaauw's full-sized avatar
👨‍💻
Working on Filament PHP plug-ins

Maarten Paauw maartenpaauw

👨‍💻
Working on Filament PHP plug-ins
View GitHub Profile
@maartenpaauw
maartenpaauw / day11.php
Created December 12, 2023 08:04
Advent of Code 2023 - Day 11
<?php
declare(strict_types=1);
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
$input = "...#......
.......#..
@maartenpaauw
maartenpaauw / day10-part1.php
Created December 10, 2023 22:06
Advent of Code 2023 - Day 10 - Part 1
<?php
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
$input = "..F7.
.FJ|.
SJ.L7
|F--J
@maartenpaauw
maartenpaauw / day9.php
Created December 9, 2023 13:58
Advent of Code 2023 - Day 9
<?php
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Illuminate\Support\Stringable;
$input = "0 3 6 9 12 15
1 3 6 10 15 21
10 13 16 21 30 45";
@maartenpaauw
maartenpaauw / day8.php
Created December 8, 2023 12:37
Advent of Code 2023 - Day 8
<?php
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
use Illuminate\Support\Stringable;
$input = "LR
11A = (11B, XXX)
11B = (XXX, 11Z)
@maartenpaauw
maartenpaauw / day7.php
Created December 7, 2023 20:15
Advent of Code 2023 - Day 7
<?php
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
$input = "32T3K 765
T55J5 684
KK677 28
KTJJT 220
QQQJA 483";
@maartenpaauw
maartenpaauw / day5.php
Created December 6, 2023 21:18
Advent of Code 2023 - Day 5
<?php
use Illuminate\Support\Collection;
use Illuminate\Support\Stringable;
use Illuminate\Support\Str;
$input = "seeds: 79 14 55 13
seed-to-soil map:
50 98 2
@maartenpaauw
maartenpaauw / part6.php
Created December 6, 2023 10:40
Advent of Code 2023 - Part 6
<?php
final readonly class Boat
{
public function __construct(
private int $time,
private int $record,
) {
}
@maartenpaauw
maartenpaauw / day1.php
Created December 4, 2023 18:46
Advent of Code 2023 - Day 1
<?php
//Tinker away!
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
$input = "two1nine
eightwothree
abcone2threexyz
xtwone3four
@maartenpaauw
maartenpaauw / day2.php
Created December 4, 2023 18:44
Advent of Code 2023 - Day 2
<?php
//Tinker away!
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
final readonly class GameConfiguration
{
public function __construct(
public int $red = 0,
@maartenpaauw
maartenpaauw / day3.php
Created December 4, 2023 18:42
Advent of Code 2023 - Day 3
<?php
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
$input = "467..114..
...*......
..35..633.
......#...