This file contains hidden or 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 artisan tinker --execute ' | |
$composer = json_decode(file_get_contents(base_path("composer.json")), true); | |
$deps = $composer["require"] ?? []; | |
$allPackages = collect($deps)->keys(); | |
// Filter packages to only those that require filament/filament | |
$filamentPlugins = $allPackages->filter(function ($package) { | |
// Skip filament/filament itself | |
if ($package === "filament/filament") { | |
return true; |
This file contains hidden or 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 | |
# Temporary Artisan command runner | |
TMP_FILE="app/Console/Commands/__TempCheckFilamentCompat.php" | |
# Check if it's already installed | |
if [ ! -f artisan ]; then | |
echo "❌ This is not a Laravel project (no artisan file found)." | |
exit 1 | |
fi |
This file contains hidden or 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\Support\Facades\Http; | |
class CheckFilamentCompat extends Command | |
{ | |
/** |
This file contains hidden or 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 my_elementor_maintenance_mode_whitelist_ips() { | |
// IPs Whitelist | |
$whitelist = [ | |
'127.0.0.1', | |
'88.123.181.218', | |
]; |
This file contains hidden or 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 | |
add_filter( 'attachment_fields_to_edit', function( $form_fields, $post ) { | |
$form_fields[ 'elementor_carousel_custom_link' ] = array( | |
'label' => __( 'Custom link', 'elementor' ), | |
'input' => 'text', | |
'value' => get_post_meta( $post->ID, 'elementor_carousel_custom_link', true ), | |
'helps' => __( 'This will add a link to images in Elementor Carousel', 'elementor' ), | |
); |
This file contains hidden or 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 | |
define('BASEDIR', "splitted/"); | |
$unite = 0; | |
foreach( glob("MODULE*/*/imsmanifest.xml") as $file ) { | |
$chapitre = 0; | |
$parent_dir = dirname($file); | |
$dest_parent_dir = BASEDIR . $parent_dir; | |
$xmlstr = file_get_contents($file); |
This file contains hidden or 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
$curUser = (Get-ChildItem Env:\USERNAME).Value | |
$curComp = (Get-ChildItem Env:\COMPUTERNAME).Value | |
$pvmaj = $Host.Version.Major | |
$pvmin = $Host.Version.Minor | |
$psversion = "$pvmaj.$pvmin" | |
$identity = "$curUser@$curComp" | |
#----------------------------------------------------- | |
# WINDOW TITLE |
This file contains hidden or 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\Eloquent\Collection; | |
// Register in 'boot()' method in app/Providers/AppServiceProvider.php | |
// This allows you to call ->paginate() on an Eloquent Collection | |
Collection::macro('paginate', function ($perPage = 10, $current_page = null, $options = []) { | |
$current_page = $current_page ?: (Paginator::resolveCurrentPage() ?: 1); | |
return (new LengthAwarePaginator($this->forPage($current_page, $perPage)->values()->all(), $this->count(), $perPage, $current_page, $options))->withPath(''); | |
}); |
This file contains hidden or 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 | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# Replace "username" by your username | |
ME="username" |
This file contains hidden or 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 | |
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi | |
# Replace "username" by your username | |
ME="username" |
NewerOlder