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
/** | |
* Get a temporary filename with a specific extension | |
* @method temporary_filename | |
* @param string $dir The directory where it tries to create the temporary file | |
* @param string $extension The extension of the file (default: '') | |
* @param string $prefix The prefix of the file (default: '') | |
* @param integer $retry The number of times it tries to create a random filename (default: 100) | |
* @return string|FALSE | |
*/ | |
function temporary_filename($dir, $extension = '', $prefix = '', $retry = 100) { |
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 array_clone($array) { | |
return array_slice($array, 0, null, true); | |
} |
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 | |
$content = file_get_contents(__DIR__ . '/project/public/index.php'); | |
$content = str_replace("__DIR__.'/../", "__DIR__.'/../project/", $content); | |
file_put_contents(__DIR__ . '/project/public/index.php', $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
<?php | |
use GuzzleHttp\Client; | |
function remote_file_size($url) { | |
$client = new Client(); | |
$response = $client->head($url); | |
$headers = $response->getHeader('Content-Length'); | |
return end($headers); | |
} |
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
/* | |
* A spacing extension to Bulma.io | |
* | |
* This extension implements rules likes: | |
* has-margin-none, has-padding-medium, has-margin-bottom-large, has-margin-auto | |
* | |
* The classes are built as follows (in rem): | |
* | |
* has-margin | |
* -(*|top|right|bottom|left) |
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
/*! debug.css | MIT License | zaydek.github.com/debug.css */ | |
*:not(path):not(g) { | |
color: hsla(210, 100%, 100%, 0.9) !important; | |
background: hsla(210, 100%, 50%, 0.5) !important; | |
outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; | |
box-shadow: none !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
<?php | |
use Google\Protobuf\Struct; | |
function struct2array(Struct $struct) { | |
return json_decode($struct->serializeToJsonString(), true); | |
} |
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
<VirtualHost *:80> | |
DocumentRoot "D:/Projects/<project>/public_html" | |
ServerName <project>.local | |
ServerAlias <project>.local | |
<Directory "D:/Projects/<project>/public_html"> | |
AllowOverride All | |
Require all Granted | |
</Directory> | |
</VirtualHost> |
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
@echo off | |
SET /P FOLDER=Please enter the project folder: | |
IF "%FOLDER%"=="" GOTO Error | |
mkdir %FOLDER% | |
cd %FOLDER% | |
call laravel new project --auth | |
move project/public public_html | |
cd project | |
composer require filippo-toso/models-generator filippo-toso/test-email --dev | |
php artisan vendor:publish --tag=config --provider="FilippoToso\ModelsGenerator\ServiceProvider" |
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 | |
/** | |
* Copyright 2021 Filippo Toso | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
* modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software | |
* is furnished to do so, subject to the following conditions: | |
* |
OlderNewer