View ask-question.php
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\Console\Command; | |
use Pgvector\Laravel\Vector; | |
use OpenAI\Laravel\Facades\OpenAI; | |
use App\Models\Document; | |
class AskQuestion extends Command | |
{ | |
protected $signature = 'app:ask-question'; |
View process-post.php
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 Pgvector\Laravel\Vector; | |
use Illuminate\Console\Command; | |
use App\Models\Document; | |
use App\Models\Post; | |
use OpenAI\Laravel\Facades\OpenAI; | |
class ProcessPosts extends Command { |
View gist:e46b1d3a90b3d967dc92ff8c97d7f11e
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
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"PUT", | |
"POST", | |
"GET", | |
"HEAD", |
View Kernel.php
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
protected $middlewareGroups = [ | |
'web' => [ | |
\App\Http\Middleware\EncryptCookies::class, | |
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, | |
\Illuminate\Session\Middleware\StartSession::class, | |
// \Illuminate\Session\Middleware\AuthenticateSession::class, | |
\Illuminate\View\Middleware\ShareErrorsFromSession::class, | |
\App\Http\Middleware\VerifyCsrfToken::class, | |
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
View laravel-extended-enums.php
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\Enums; | |
use Illuminate\Support\Collection; | |
enum DeclineCodes: string | |
{ | |
case CALL_ISSUER = 'call_issuer'; | |
case CARD_NOT_SUPPORTED = 'card_not_supported'; |
View NewRelicLogger.php
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\Logging; | |
use Auth; | |
use Monolog\Logger; | |
use Illuminate\Http\Request; | |
use Monolog\Handler\BufferHandler; | |
use NewRelic\Monolog\Enricher\{Handler, Processor}; |
View osascript
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
chrome = Application("Google Chrome"); | |
windows = chrome.windows; | |
for(i = 0; i < windows.length; i++){ | |
tabs = windows[i].tabs; | |
for(j = 0; j < tabs.length; j++){ | |
url = tabs[j].url(); | |
if(url.match(/soundcloud.com/)){ | |
tabs[j].execute({ javascript: "document.querySelector('.playControl').click();" }); |
View playpause-youtube.js
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
var chrome = Application("Google Chrome"); | |
var windows = chrome.windows; | |
for(i = 0; i < windows.length; i++){ | |
var tabs = windows[i].tabs; | |
for(j = 0; j < tabs.length; j++){ | |
var url = tabs[j].url(); | |
if(url.match(/youtube.com/)){ | |
tabs[j].execute({ javascript: "document.querySelector('.ytp-play-button').click();" }); |
NewerOlder