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\Support; | |
use Illuminate\Database\Eloquent\Relations\Relation; | |
use Illuminate\Support\Arr; | |
final readonly class AutoEagerLoadEntity | |
{ | |
public function __construct( |
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\Models\Contracts; | |
interface IsSearchEntity | |
{ | |
public function getSearchIdentifier(): string|int; | |
public function getSearchLabel(): string|int; |
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\Telescope; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Laravel\Telescope\EntryType; | |
class CustomTelescopePrune 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
.no-p { | |
padding: 0px !important | |
} | |
.no-p-t { | |
padding-top: 0px !important | |
} | |
.no-p-r { | |
padding-right: 0px !important |
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
Country | Alpha-2 code | Alpha-3 code | Numeric code | Latitude (average) | Longitude (average) | |
---|---|---|---|---|---|---|
Afghanistan | AF | AFG | 4 | 33 | 65 | |
Albania | AL | ALB | 8 | 41 | 20 | |
Algeria | DZ | DZA | 12 | 28 | 3 | |
American Samoa | AS | ASM | 16 | -14.3333 | -170 | |
Andorra | AD | AND | 20 | 42.5 | 1.6 | |
Angola | AO | AGO | 24 | -12.5 | 18.5 | |
Anguilla | AI | AIA | 660 | 18.25 | -63.1667 | |
Antarctica | AQ | ATA | 10 | -90 | 0 | |
Antigua and Barbuda | AG | ATG | 28 | 17.05 | -61.8 |
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 | |
path=$1 | |
if [ -z $path ] | |
then | |
echo "Path can not be empty" | |
else | |
chown -R $USER:www-data $path | |
find $path -type f -exec chmod 664 {} \; |
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
function dd($var) { | |
return highlight_string("<?php\n\$data =\n" . var_export($var, true) . ";\n?>"); | |
die(''); | |
} |
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
# sources | |
https://medium.com/@blanselle/utiliser-expect-dans-un-script-bash-869ef35a512e |
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\Seeder; | |
class AnyTableSeeder extends Seeder | |
{ | |
private $max = 100; | |
public function run() | |
{ |
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
// wp-content/plugins/payline-woocommerce-master/class-wc-gateway-payline.php | |
function payline_callback() | |
{ | |
if (isset($_GET['order_id'])) { | |
$this->generate_payline_form($_GET['order_id']); | |
exit; | |
} | |
$this->SDK = new PaylineSDK($this->settings['merchant_id'], $this->settings['access_key'], $this->settings['proxy_host'], $this->settings['proxy_port'], $this->settings['proxy_login'], $this->settings['proxy_password'], $this->settings['environment']); |
NewerOlder