I hereby claim:
- I am karkowg on github.
- I am karkowg (https://keybase.io/karkowg) on keybase.
- I have a public key ASDhBGKYZ-uUadqaclICvx6upL3S9b7DFP659mB7JosvCgo
To claim this, I am signing this object:
| <?php | |
| namespace App\Support; | |
| use Illuminate\Http\RedirectResponse; | |
| use Illuminate\Routing\Router; | |
| use Illuminate\Support\Carbon; | |
| use Illuminate\Support\Facades\URL; | |
| use InvalidArgumentException; |
| <?php | |
| use Illuminate\Foundation\Bus\PendingDispatch; | |
| use Illuminate\Support\Fluent; | |
| if (! function_exists('dispatch_if')) { | |
| function dispatch_if(bool $boolean, mixed $job) : PendingDispatch|Fluent | |
| { | |
| if ($boolean) { | |
| return dispatch($job); |
| const makeVideoPlayerMachine = ({ mode, inactivityTimeout }) => Machine({ | |
| initial: 'paused', | |
| context: { | |
| mode, | |
| inactivityTimeout, | |
| }, | |
| states: { | |
| paused: { | |
| on: { | |
| PLAY: 'playing', |
| const askQuestion = (question) => Promise.resolve('asked'); | |
| const askQuestionMachine = Machine({ | |
| id: 'askQuestion', | |
| initial: 'form', | |
| context: { | |
| question: '', | |
| email: '', | |
| name: '', | |
| }, |
| const needsPin = ctx => [ctx.webcast.isPrivate, ctx.viewer.needsPin].every(Boolean); | |
| const needsRegistration = ctx => [ctx.webcast.hasRegistration, ctx.viewer.needsRegistration].every(Boolean); | |
| const makeWebcastMachine = ({ webcast, viewer }) => Machine({ | |
| id: 'webcast', | |
| initial: 'guard', | |
| context: { | |
| viewer: { | |
| email: viewer.email, | |
| name: viewer.name, |
| function randomInt(max) { | |
| return Math.floor(Math.random() * Math.floor(max)); | |
| } | |
| function getViewersCount() { | |
| return Promise.resolve(({ viewersCount: randomInt(10) })); | |
| } | |
| const statsMachine = Machine({ | |
| id: 'stats', |
| function randomInt(max) { | |
| return Math.floor(Math.random() * Math.floor(max)); | |
| } | |
| function getViewersCount() { | |
| return Promise.resolve({ viewersCount: randomInt(10) }); | |
| } | |
| const fetchMachine = Machine({ | |
| id: 'fetch', |
| function dayjs() { | |
| return new Date(); | |
| } | |
| function goLive(uid) { | |
| return Promise.resolve({ startedAt: dayjs() }); | |
| } | |
| function stopLive(uid) { | |
| return Promise.resolve(); |
| <?php | |
| /** | |
| * Function to wrap select constraints for eager loading | |
| * a relationship when using Eloquent's 'with' method. | |
| * | |
| * @param array $columns Columns to select from the relation table. | |
| * @param bool $distinct Select only distinct rows? | |
| * | |
| * @example |
I hereby claim:
To claim this, I am signing this object: