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 | |
function minify_output($buffer){ | |
$search = array('/\>[^\S ]+/s','/[^\S ]+\</s','/(\s)+/s'); | |
$replace = array('>','<','\\1'); | |
if (preg_match("/\<html/i",$buffer) == 1 && preg_match("/\<\/html\>/i",$buffer) == 1) { | |
$buffer = preg_replace($search, $replace, $buffer); | |
} | |
return $buffer; | |
} |
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 | |
/** | |
* Benchmarks BulkInserter at various batch sizes. | |
* | |
* Before running this script, make sure to: | |
* | |
* - set your PDO parameters in this file | |
* - run composer install | |
* - import setup.sql into your database |
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 | |
class TimeoutClass extends Thread { | |
public function __construct(callable $cb, int $time, $args){ | |
$this->callback = $cb; | |
$this->args = $args; | |
$this->time = $time * 1000; | |
} | |
public function run(){ | |
usleep($this->time); |
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\Casts; | |
use Carbon\Carbon; | |
use Illuminate\Contracts\Database\Eloquent\CastsAttributes; | |
class LocalizedDateTime implements CastsAttributes | |
{ | |
/** |
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 Closure; | |
class RemoveEmoji | |
{ | |
/** | |
* Clean not allowed UTF-8 chars | |
* | |
* @param $text |
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
FROM php:7.2-fpm | |
COPY app /var/www/ | |
EXPOSE 9000 |
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
artifacts: | |
when: on_failure | |
paths: | |
- tests/Browser/screenshots |
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
# clone repo | |
git clone https://github.com/imarc/laravel-echo-example | |
cd laravel-echo-example | |
# install php dependencies | |
composer install | |
composer run-script install-tasks | |
# install npm dependencies and build | |
npm install |
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 declare(strict_types=1); | |
require_once __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\Process\Process; | |
$process = new Process(['php', 'index.php']); | |
echo "Starting process\n"; | |
$process->start(); |
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 | |
/** | |
alfabeto fonético internacional | |
Definição1 | |
Alfabeto para fins aeronáuticos, que se destina a padronizar o processo de soletrar certas expressões. | |
Fonte1 | |
BRASIL. Comando da Aeronáutica. Departamento de Controle do Espaço Aéreo. CNS/ATM Glossário. Disponível em: http://www.decea.gov.br/cnsatm/glossario. Acesso em: 14 mar. 2012. (texto adaptado) | |
Nota adicional1 | |
Este alfabeto encontra-se normatizado pela Organização de Aviação Civil Internacional - OACI e pela legislação brasileira, de acordo com a seguinte correspondência: A – Alfa B – Bravo C – Charlie D – Delta E – Echo F – Foxtrot G – Golf H – Hotel I – India J – Juliett K – Kilo L – Lima M – Mike N – November O – Oscar P – Papa Q – Quebec R – Romeo S – Sierra T – Tango U – Uniform V – Victor W – Whiskey X – X-Ray Y -Yankee Z – Zulu |