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'; |
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 { |
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
const Ffmpeg = require(‘fluent-ffmpeg’); | |
const STREAM_URL = ‘http://icecast.radio24.ch/radio24-rc-96-aac'; | |
const VOLUME_THRESHOLD = -50; // volume threshold | |
getMeanVolume(STREAM_URL, function(meanVolume){ | |
if(meanVolume <= VOLUME_THRESHOLD){ | |
console.log(“WE HAVE A PROBLEM! VOLUME IS TOO LOW!”); | |
}else{ | |
console.log(‘ALL GOOD!’); | |
} |
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, |
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", |
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'; |
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
// grab the chrome object | |
var chrome = Application('Google Chrome'); | |
// create a new chrome window | |
var window = chrome.Window().make(); | |
// set the links you want to open | |
var links = [ | |
"https://gmail.com", | |
"https://soundcloud.com", |
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}; |
NewerOlder