Skip to content

Instantly share code, notes, and snippets.

<?php
$var = 'testing';
?>

Hey there

undefined

<?php
$var = 'hello';
$CustomPaths = @(
@{Name = "Cubs"; Path = "C:\cubs"; Exclude = @('*.txt', '*.pdf')},
@{Name = "Cubs"; Path = "C:\cubs"; Exclude = @('*.txt', '*.pdf')},
@{Name = "Cubs"; Path = "C:\cubs"; Exclude = @('*.txt', '*.pdf')},
@{Name = "Cubs"; Path = "C:\cubs"; Exclude = @('*.txt', '*.pdf')},
)
# Handle Mapping all the custom values
forEach ($Location in $CustomPaths) {
@JacobBennett
JacobBennett / S3SwapUrlGenerator.php
Last active March 26, 2020 02:43
Regarding Filesystems
<?php
namespace App\Wilber\MediaLibrary\UrlGenerator;
use Illuminate\Contracts\Config\Repository as Config;
use Illuminate\Filesystem\FilesystemManager;
use Spatie\MediaLibrary\UrlGenerator\S3UrlGenerator;
class S3SwapUrlGenerator extends S3UrlGenerator
{
@JacobBennett
JacobBennett / problem.php
Created December 31, 2019 17:20
A little mess I had on my hands today
<?php
$start = Carbon::parse('2019-12-24');
$end = Carbon::parse('2020-01-04');
$birthDate = Carbon::parse('1985-12-24')->addDays(random_int(0,6));
// figure out if month and day of birthDate is between the $start and $end
@JacobBennett
JacobBennett / machine.js
Created December 12, 2019 17:39
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@JacobBennett
JacobBennett / machine.js
Last active December 10, 2019 18:42
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@JacobBennett
JacobBennett / machine.js
Last active December 10, 2019 18:47
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions