Skip to content

Instantly share code, notes, and snippets.

View Alexisgt01's full-sized avatar

Alexis Gatuingt Alexisgt01

View GitHub Profile
@Alexisgt01
Alexisgt01 / IsSearchEntity.php
Created January 23, 2024 10:52
Search and fill pattern
<?php
namespace App\Models\Contracts;
interface IsSearchEntity
{
public function getSearchIdentifier(): string|int;
public function getSearchLabel(): string|int;
@Alexisgt01
Alexisgt01 / CustomTelescopePrune.php
Created July 30, 2022 15:52
Laravel Telescope - Custom prune entries by type
<?php
namespace App\Console\Commands\Telescope;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Laravel\Telescope\EntryType;
class CustomTelescopePrune extends Command
{
@Alexisgt01
Alexisgt01 / helpers.css
Created October 14, 2021 08:17 — forked from SoftCreatR/helpers.css
CSS Helper Classes
.no-p {
padding: 0px !important
}
.no-p-t {
padding-top: 0px !important
}
.no-p-r {
padding-right: 0px !important
@Alexisgt01
Alexisgt01 / countries_codes_and_coordinates.csv
Created October 13, 2021 18:36 — forked from tadast/countries_codes_and_coordinates.csv
Countries with their (ISO 3166-1) Alpha-2 code, Alpha-3 code, UN M49, average latitude and longitude coordinates
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
#!/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 {} \;
function dd($var) {
return highlight_string("<?php\n\$data =\n" . var_export($var, true) . ";\n?>");
die('');
}
@Alexisgt01
Alexisgt01 / Automatiser le remplisage BASH
Last active July 30, 2020 14:51
Base de connaissance
# sources
https://medium.com/@blanselle/utiliser-expect-dans-un-script-bash-869ef35a512e
@Alexisgt01
Alexisgt01 / AnyTableSeeder.php
Created May 27, 2020 15:05
Laravel seeder : visual feedback
<?php
use Illuminate\Database\Seeder;
class AnyTableSeeder extends Seeder
{
private $max = 100;
public function run()
{
@Alexisgt01
Alexisgt01 / Avant
Last active May 26, 2020 12:57
Modification ma valise en carton
// 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']);
@Alexisgt01
Alexisgt01 / Config.php
Last active July 14, 2020 19:48
Get data from a directory and merge it into an array
<?php
namespace Core\Service;
class Config
{
/**
* @var string $directory
* Directory
*/