This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use App\Enums\Discount; | |
use Brick\Money\Money; | |
use Illuminate\Contracts\Support\Arrayable; | |
use InvalidArgumentException; | |
use WeakMap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
===================================================================== | |
==================== READ THIS BEFORE CONTINUING ==================== | |
===================================================================== | |
======== .-----. ======== | |
======== .----------------------. | === | ======== | |
======== |.-""""""""""""""""""-.| |-----| ======== | |
======== || || | === | ======== | |
======== || KICKSTART.NVIM || |-----| ======== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const getCalleeFromStackTrace = () => { | |
const e = new Error(); | |
const frame = e.stack.split(`\n`)[2]; // change to 3 for grandparent func | |
// const lineNumber = frame.split(`:`).reverse()[1]; | |
// const functionName = frame.split(` `)[5]; | |
const regex = /(\S+)\s+\(([^:]+):(\d+):(\d+)\)/; | |
const match = frame.trim().match(regex); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Actions; | |
use App\Enums\JWTTokenType; | |
use App\Models\Broadcast; | |
use App\Services\MuxApiClient; | |
use App\Values\MuxJWTToken; | |
use MuxPhp\ApiException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
export default { | |
props: { | |
jwtToken: String, | |
}, | |
data() { | |
return { | |
intervalId: undefined, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Enums; | |
use ArchTech\Enums\From; | |
use function array_flip; | |
use ArchTech\Enums\Values; | |
use ArchTech\Enums\Options; | |
use Illuminate\Support\Str; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<code> | |
<?php | |
namespace App\View\Components; | |
use Illuminate\Support\Str; | |
use Illuminate\View\Component; | |
class FormField extends Component | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Str::macro('compare', function (string $value, string $to, string $delimiter = ' ') { | |
return collect(explode($delimiter, $value)) | |
->zip(explode($delimiter, $to)) | |
->filter(function ($pair) { | |
return $pair->first() !== $pair->last(); | |
}) | |
->collapse(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Str::macro('diff', function (string $compare, string $to) { | |
// First we'll find the determine the bitwise difference between the two strings, using the bitwise XOR operator (^) to compare them. | |
// Then we'll utilize strspn to determine the position where a difference is found. | |
$from_start = strspn($compare ^ $to, "\0"); | |
// Next we'll determine the end position, by reversing both strings then utilizing strspn as before. | |
$from_end = strspn(Str::reverse($compare) ^ Str::reverse($to), "\0"); | |
// here we snip out original value | |
$value = Str::substr($compare, $from_start, (strlen($compare) - $from_end) - $from_start); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2020 Gentoo Authors | |
# Distributed under the terms of the GNU General Public License v2 | |
EAPI=7 | |
inherit cmake cmake-utils git-r3 | |
DESCRIPTION="TrinityCore WoW Private server for WoTLK 3.3.5a" | |
HOMEPAGE="https://trinitycore.org" | |
EGIT_REPO_URI="https://github.com/TrinityCore/TrinityCore.git" |
NewerOlder