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
cca0def37dad:/app# SPX_ENABLED=1 SPX_FP_LIVE=1 SPX_METRICS=wt,zm,zmac,zmab,zmfb php test.php | |
*** SPX Report *** | |
Global stats: | |
Called functions : 2.0M | |
Distinct functions : 3 | |
Wall time : 1.95s |
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
cca0def37dad:/app# SPX_ENABLED=1 SPX_FP_LIVE=1 SPX_METRICS=wt,zm,zmac,zmab,zmfb php test.php | |
*** SPX Report *** | |
Global stats: | |
Called functions : 2.0M | |
Distinct functions : 3 | |
Wall time : 1.78s |
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 | |
/** | |
Usage: ->with(...WithConsecutive::create(...$withCodes)) | |
*/ | |
declare(strict_types=1); | |
namespace App\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
/** | |
* Calculates the geodesic distance between two points specified by radian latitude/longitude using the | |
* Haversine formula (hf) | |
*/ | |
function hf($lat1, $lng1, $lat2, $lng2) | |
{ | |
$R = 6371e3; | |
$lng1 = deg2rad($lng1); | |
$lat1 = deg2rad($lat1); |
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
/** | |
* Calculates the geodesic distance between two points specified by radian latitude/longitude using | |
* Vincenty inverse formula for ellipsoids (vif) | |
*/ | |
function vif($lng1, $lat1, $lng2, $lat2) | |
{ | |
$lng1 = deg2rad($lng1); | |
$lat1 = deg2rad($lat1); | |
$lng2 = deg2rad($lng2); | |
$lat2 = deg2rad($lat2); |
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
<FQCN>: | |
shortName: <string> | |
description: <string> | |
iri: <string> | |
itemOperations: | |
get: | |
method: GET | |
produces: ~ | |
summary: ~ | |
description: ~ |
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
# Follow https://gist.github.com/oleg-andreyev/05fae22548ccdff8deebde144c4cbe7f | |
# nproc alias https://gist.github.com/oleg-andreyev/053b90ef33d2c29446ef466a2817d01c | |
function is_osx { | |
local uname=$(uname) | |
if [ "$uname" = "Darwin" ]; then | |
return 0 | |
else | |
return 1 |
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
# Follow https://gist.github.com/oleg-andreyev/05fae22548ccdff8deebde144c4cbe7f | |
# nproc alias https://gist.github.com/oleg-andreyev/053b90ef33d2c29446ef466a2817d01c | |
# avoid brew cleanup | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
# icu4c must be >= 64.0 | |
brew install icu4c [email protected] krb5 oniguruma libedit | |
export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:/usr/local/opt/bison/bin:/usr/local/opt/krb5/bin:/usr/local/opt/krb5/sbin:/usr/local/opt/[email protected]/bin:$PATH" |
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
curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash | |
PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j$(nproc)" phpenv install 7.3.2 | |
git clone https://github.com/oleg-andreyev/MinkSelenium2Driver -b fix-master-build | |
cd MinkSelenium2Driver | |
composer install | |
docker run -p 4444:4444 -v /dev/shm:/dev/shm --shm-size 2g selenium/standalone-firefox:2.53.1 | |
php -dmemory_limit=3G -S localhost:8002 -t ./vendor/mink/driver-testsuite/web-fixtures | |
phpenv local 7.3.2 |
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
alias nproc="sysctl -n hw.physicalcpu" |
NewerOlder