Skip to content

Instantly share code, notes, and snippets.

@BinaryKitten
BinaryKitten / AppServiceProvider.php
Last active June 8, 2024 08:33
streamedPsrResponse Macro
<?php
declare(strict_types=1);
namespace App\Providers;
use Illuminate\Http\Client\Response as HttpClientResponse;
use Illuminate\Support\ServiceProvider;
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
use Symfony\Component\HttpFoundation\StreamedResponse;
<?php
declare(strict_types=1);
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Pseudo\Filters\FilterInterface;
use App\Pseudo\Filters\FilterClassOne;
use App\Pseudo\Filters\FilterClassTwo;
<?php
declare(strict_types=1);
namespace Tests;
use App\SomeClass;
use App\AnotherClass;
use PHPUnit\Framework\TestCase;
use Tests\Traits\TestsObjects;
@BinaryKitten
BinaryKitten / phpunit.bat
Created September 3, 2021 17:25 — forked from jrfnl/phpunit.bat
PHPUnit PHP/PHPUnit switching script example
@echo off
::
:: PHP ??? have Xdebug + Blackfire.
:: PHP 7.4.14 has Xdebug with coverage
:: PHP 7.4.15 has Xdebug with develop + trace
::
:set PHPBIN=C:\wamp\bin\phpcli_x86\php5.2.17\php.exe
:set PHPBIN=C:\wamp\bin\phpcli_x86\php5.3.29\php.exe
:set PHPBIN=C:\wamp\bin\phpcli_x86\php5.4.45\php.exe
:set PHPBIN=C:\wamp\bin\php\php5.5.38\php.exe
<?php
declare(strict_types=1);
namespace App\Plans;
use \Exception;
class InvalidPlanClassException extends Exception
{
<?php
declare(strict_types=1);
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class DbMacrosProvider extends ServiceProvider
{
@BinaryKitten
BinaryKitten / toRawSql.php
Last active January 22, 2023 21:52
toRawSql.php
<?php
declare(strict_types=1);
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Query\Builder as QueryBuilder;
QueryBuilder::macro(
'toRawSql',
function () {
<?php
// this is routes/web.php
Route::twillioWebhook('/blah', Controller::class);
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class RemovePercentageCommissionFeesFromAuctionListings extends Migration
{
The Juggernaut
Each piece is high armour stat, the main idea is to be in cover and then burst out and run at your enemies and hit them.
While having higher defence for limited time.
2pc: +5% hazard protection
+25% melee damage
3pc: +15% Explosive resistance
+10% Hazard protection