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
#!/bin/bash | |
# Check if ffmpeg is installed | |
if ! command -v ffmpeg &> /dev/null; then | |
echo "Error: ffmpeg is not installed or not in the PATH." >&2 | |
echo "Please install ffmpeg to use this script." >&2 | |
exit 1 | |
fi | |
interval=3 |
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\Http\Livewire; | |
use Livewire\Component; | |
use Native\Laravel\Facades\Shell; | |
class ExternalLink extends Component | |
{ | |
public $url; |
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
// fork of https://gist.github.com/b-nnett/2749adb44566239e4c85ad1a8937c2bc | |
// origin by @B_nnett → https://twitter.com/joshm/status/1648346253355282432?s=20 | |
/* | |
To set up this boost for chat.openai.com: | |
1) open Arc browser and login at chat.openai.com. | |
2) Head over to the + button in your sidebar and select New Boost. | |
Or hit ⌘ + T and type New Boost into your Command Bar. | |
3) Click the `Code` button. |
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\Traits; | |
use Carbon\Carbon; | |
trait FilterableByDates | |
{ | |
public function scopeToday($query, $column = 'created_at') | |
{ |
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\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\Concerns\CallsCommands; | |
use Illuminate\Support\Facades\Http; | |
use Laravel\Forge\Forge; | |
use Laravel\Forge\Resources\Daemon; |
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 | |
$url = "https://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2?callback=Request.JSONP.request_map.request_0"; | |
$content = file_get_contents($url); | |
$content = substr($content, strlen("Request.JSONP.request_map.request_0(")); | |
$content = substr($content, 0, strlen($content) - 2); | |
$content = json_decode($content); |
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
/*! | |
* hnl.mobileConsole - javascript mobile console - v1.2.6 - 26/10/2016 | |
* Adds html console to webpage. Especially useful for debugging JS on mobile devices. | |
* Supports 'log', 'trace', 'info', 'warn', 'error', 'group', 'groupEnd', 'table', 'assert', 'clear' | |
* Inspired by code by jakub fiala (https://gist.github.com/jakubfiala/8fe3461ab6508f46003d) | |
* Licensed under the MIT license | |
* | |
* Original author: @hnldesign | |
* Further changes, comments: @hnldesign | |
* Copyright (c) 2014-2016 HN Leussink |
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
/** | |
* @author Siv.S | |
* @date 03/may/2014 at 11:32 | |
* | |
* convertImgToBase64 | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat='image/png'] | |
* @author HaNdTriX | |
* @example |
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 ThemosisValetDriver extends BasicValetDriver | |
{ | |
/** | |
* Determine if the driver serves the request. | |
* | |
* @param string $sitePath | |
* @param string $siteName | |
* @param string $uri |
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
// inside boot() | |
resolve(EngineManager::class)->extend('elasticsearch', function () { | |
return new ElasticsearchEngine(ClientBuilder::fromConfig(config('scout.elasticsearch.config')), config('scout.elasticsearch.index')); | |
}); |
NewerOlder