This file contains 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
uri = URI('http://localhost:23517') | |
req = Net::HTTP::Post.new(uri, {'Content-Type' => 'application/json'}) | |
req.body = { | |
uuid: SecureRandom.uuid, | |
payloads: [ | |
{ | |
type:'log', | |
content: { | |
values: [ | |
'hey' |
This file contains 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 | |
class Check | |
{ | |
public function needsToRun(): bool | |
{ | |
if (!$this->belongsToTeamOnActiveSubscriptionOrOnGenericTrial()) { | |
return false; | |
} |
This file contains 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
name: Psalm | |
on: | |
push: | |
paths: | |
- '**.php' | |
- 'psalm.xml' | |
jobs: | |
psalm: |
This file contains 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 | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
return new class extends Migration { | |
public function up(): void | |
{ | |
$this |
This file contains 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 | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Support\Facades\Schema; | |
class MigrateToJetstream extends Migration | |
{ | |
public function up() | |
{ |
This file contains 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 | |
function curry($f, $argument) | |
{ | |
return function (...$arguments) use ($f, $argument) { | |
return $f(...array_merge([$argument], $arguments)); | |
}; | |
} | |
function add(...$numbers) |
This file contains 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 | |
function undot(array $dottedArray) | |
{ | |
$undottedArray = []; | |
foreach ($dottedArray as $key => $value) { | |
Arr::set($undottedArray, $key, $value); | |
} |
This file contains 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\Services\NotificationChannels\Discord; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\RequestOptions; | |
use Illuminate\Notifications\Notification; | |
class DiscordChannel | |
{ |
This file contains 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 Spatie\Mailcoach\Http\App\Queries\Filters; | |
use Illuminate\Database\Eloquent\Builder; | |
use Illuminate\Support\Arr; | |
use Illuminate\Support\Str; | |
use Spatie\QueryBuilder\Filters\Filter; | |
class FuzzyFilter implements Filter |
This file contains 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
@setup | |
require __DIR__.'/vendor/autoload.php'; | |
(new \Dotenv\Dotenv(__DIR__, '.env'))->load(); | |
$appName = "my-app.com"; | |
$repository = "spatie/{$appName}"; | |
$baseDir = "/home/forge/{$appName}"; | |
$releasesDir = "{$baseDir}/releases"; | |
$currentDir = "{$baseDir}/current"; | |
$newReleaseName = date('Ymd-His'); |