<?php
class A {}
class B extends A {}
This file contains hidden or 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
| MYSQL_VERSION=8.0 | |
| # Check if the "mysql" container is running | |
| number_of_running_containers=$(docker ps --filter "name=mysql" | grep -w "mysql" | wc -l) | |
| if [ $number_of_running_containers = "1" ] ; then | |
| echo "MySQL is already running:" | |
| docker ps --filter "name=mysql" | |
| echo "You can stop it by executing \"docker stop mysql\"" |
This file contains hidden or 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 | |
| $finder = PhpCsFixer\Finder::create() | |
| ->exclude([ | |
| 'vendor', | |
| ]) | |
| ->in([ | |
| __DIR__.'/src/', | |
| __DIR__.'/tests/' | |
| ]) |
This file contains hidden or 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 | |
| $h = fopen('php://memory', 'ab+'); | |
| $gd = @imagecreate(110, 20); | |
| if (false === $gd) { | |
| throw new \RuntimeException('GD image is invalid'); | |
| } |
This file contains hidden or 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 BENCHMARK SCRIPT | | |
| --------------------------------------------------- | |
| Start : 2018-08-23 08:37:29 | |
| PHP version : 7.3.0beta2 | |
| Platform : Linux | |
| Each test executed 10000 times | |
| --------------------------------------------------- | |
| test_array_reverse 650.660 sec. | |
| test_array_key_last 0.049 sec. |
This file contains hidden or 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
| // LOOOTS of stuff there: https://github.com/denysdovhan/wtfjs | |
| // From https://www.destroyallsoftware.com/talks/wat | |
| [] + []; // empty string | |
| [] + {}; // [object Object] | |
| {} + []; // 0 | |
| {} + {}; // NaN | |
| Array(16); // ,,,,,,,,,,,,,,,, (array with 16 undefined elements) | |
| Array(16).join('wat'); // watwatwatwatwatwatwatwatwatwatwatwatwatwatwatwat (array with 16 "wat" strings) |
This file contains hidden or 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
| REM Batch file for Windows only | |
| REM This script takes images from a | |
| SET EXTENSION=jpg | |
| REM This is NOT an usual glob pattern. | |
| REM This example matches 4 digits, like "DSC_0243". | |
| SET PATTERN=DSC_%04d" | |
| ffmpeg.exe -r 24 -i %PATTERN%.%EXTENSION% -s hd720 -vcodec libx264 out.mp4 |
Place this at the "root" of your git repos, or even your projects directory.
Like /var/www/git_gc.bash for example, if you save many projects under this dir.
This script will run git reflog expire and git gc with extra options to save
some space when working with heavy & often rebased projects.
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Title</title> | |
| <style type="text/css"> | |
| * { margin: 0; padding: 0; box-sizing: border-box; } | |
| iframe { | |
| overflow: hidden; | |
| border: solid 1px black; |