Skip to content

Instantly share code, notes, and snippets.

@DJZT
DJZT / index.php
Created March 2, 2021 09:09
Simple base autoloader with using spl_autoload_register example
<?php
declare(strict_types=1);
spl_autoload_register(function (string $class) {
echo $class;
$path = str_replace(['\\', 'App'], [DIRECTORY_SEPARATOR, ''], $class);
echo $path;
require_once 'src/'.$path.'.php';
});
@DJZT
DJZT / AbstractModel.php
Last active February 16, 2021 14:42
Laravel Eloquent UUID configuration
<?php
declare(strict_types=1);
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
abstract class AbstractModel extends Model
{
@DJZT
DJZT / fos_elastica.yaml
Created April 12, 2019 12:04
Example of fos elastica configuration
fos_elastica:
indexes:
obtao_example_index:
client: default
settings:
index:
analysis:
analyzer:
custom_analyzer :
type : custom
@DJZT
DJZT / make.sh
Last active May 5, 2016 12:24 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"