Skip to content

Instantly share code, notes, and snippets.

View ivastly's full-sized avatar
💭
making the world a better place for someone else

Vasily Pyatykh ivastly

💭
making the world a better place for someone else
View GitHub Profile
<?php declare(strict_types=1);
/**
* @Revs(10000)
* @Iterations(3)
* @Warmup(1)
* @BeforeMethods({"init"})
*/
class LoopConditionalBench
{
phantom:
address: "1.2.3.4:80" # [Target's address]:[target's port]
ssl: false
header_http: "1.1"
headers:
- "[Host: example.com]"
- "[Connection: close]"
uris:
- "/"
- "/reviews"
@ivastly
ivastly / ArduinoSignals.ino
Created August 30, 2020 14:42
Paper Signals Arrow Robot Custom behavior
void loop() {
SetActionLEDOn();
if (WiFi.status() == WL_CONNECTED) {
String response = mySignal.getJsonHTTP(ApiHost, "/check_this_minute_hotline.php");
Serial.println(response);
@ivastly
ivastly / run_xhprof_viewer.sh
Last active November 23, 2020 17:13
Run Dockerized XHProf Viewer oneliner
# dumps must be in ./xhprof folder, named like uniqid() . 'appname.xhprof';
# use tideways_xhprof extension to generate them https://github.com/tideways/php-xhprof-extension
docker run --rm -p 81:8080 -v $(pwd)/xhprof:/mnt/files/private/xhprof -d --name xhprof wodby/xhprof
@ivastly
ivastly / php-reflection-library-example.php
Created February 14, 2021 15:40
Usage of php-reflection library - reading private property of an object in PHP.
<?php
declare(strict_types=1);
require_once __DIR__ . '/../vendor/autoload.php';
class ParentClass
{
private $property = 'parent private property';
}