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
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 |
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
// 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 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 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 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 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
RTDIR = ${REQUEST_TRACKER_DIR} | |
echo: | |
@echo "${WOW}" | |
## | |
## RequestTracker | |
## -------------- | |
## |
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
docker run \ | |
--name=mysql_host \ | |
-dit -e MYSQL_ROOT_PASSWORD=mysql \ | |
-p 3306:3306 \ | |
mysql:5.7 |
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); | |
/* | |
* (c) Alexandre Rock Ancelet <pierstoval@gmail.com> and Studio Agate. | |
* | |
* Licensed with MIT | |
*/ |
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
# Change the current background according to a distant URL. | |
# Needs the "feh" package to work. | |
DISPLAY=:0 XAUTHORITY=$HOME/.Xauthority feh --bg-center http://rammb.cira.colostate.edu/ramsdis/online/images/latest/himawari-8/full_disk_ahi_natural_color.jpg | |
# Source: https://twitter.com/docteur_klein/status/1130730930031779840 |
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); | |
namespace Tests; | |
use Symfony\Bundle\FrameworkBundle\KernelBrowser; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase as BaseWebTestCase; | |
use Symfony\Component\BrowserKit\Cookie; | |
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; |