I hereby claim:
- I am alexeyshockov on github.
- I am alexeyshockov (https://keybase.io/alexeyshockov) on keybase.
- I have a public key ASDd7Y2ZklOhKdpNZkRBzgWqx98Q5yAV3XPkNZ38SyMkaQo
To claim this, I am signing this object:
| import logging | |
| import structlog | |
| from structlog.contextvars import bound_contextvars | |
| from structlog.processors import CallsiteParameter as CsParam | |
| from structlog.typing import FilteringBoundLogger | |
| from structlog_stdlib_extras import StructlogHandler | |
| <?php | |
| use Twig\Environment; | |
| use Twig\Loader\ArrayLoader; | |
| function twig_template(string $template): callable | |
| { | |
| $twigEnvironment = new Environment($loader = new ArrayLoader()); | |
| $loader->setTemplate($templateName = md5($template), $template); |
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| use GuzzleHttp\Client; | |
| use GuzzleHttp\Pool; | |
| use GuzzleHttp\Promise\CancellationException; | |
| use GuzzleHttp\Psr7\Request; | |
| require 'vendor/autoload.php'; | |
| $client = new Client(); |
| <?php | |
| /* | |
| * | |
| * To set up: | |
| * 1. Install composer. | |
| * 2. Run `php composer.phar require guzzlehttp/guzzle | |
| * 3. Run this test script with one of the following arguments: | |
| * 3.1. php guzzle-pool-test.php curl (to use GuzzleHttp\Handler\CurlHandler) | |
| * 3.2. php guzzle-pool-test.php multicurl (to use GuzzleHttp\Handler\MultiCurlHandler) |
| <?php | |
| /** | |
| * | |
| * Object map proof of concept. | |
| * | |
| */ | |
| class Map implements IteratorAggregate, ArrayAccess, Countable | |
| { |
| Removing: /usr/local/Cellar/ack/2.14... (3 files, 182.7KB) | |
| Removing: /usr/local/Cellar/ack/2.16... (4 files, 190.7KB) | |
| Removing: /usr/local/Cellar/ant/1.10.0... (1,617 files, 36.6MB) | |
| Removing: /usr/local/Cellar/bash/4.4.5... (146 files, 8.8MB) | |
| Removing: /usr/local/Cellar/bash-completion/1.3_1... (188 files, 605.9KB) | |
| Removing: /usr/local/Cellar/boost/1.63.0... (12,491 files, 397.1MB) | |
| Removing: /usr/local/Cellar/carthage/0.18.1... (49 files, 12.4MB) | |
| Removing: /usr/local/Cellar/carthage/0.20.1... (64 files, 22.4MB) | |
| Removing: /usr/local/Cellar/colordiff/1.0.16... (8 files, 54.4KB) | |
| Removing: /usr/local/Cellar/colordiff/1.0.17... (10 files, 57.9KB) |
| #!/usr/bin/env php | |
| <?php | |
| $file = $argv[1]; | |
| $date = (new DateTime())->modify('-1 day'); | |
| $doc = new SimpleXMLElement(file_get_contents($file)); | |
| foreach ($doc->trk->trkseg->children() as $k => $trkpt) { |
| <?php | |
| namespace GuzzleDynamicRequests; | |
| require __DIR__ . '/vendor/autoload.php'; | |
| use GuzzleHttp\Client; | |
| use GuzzleHttp\Psr7\Response; | |
| // Do not extend IteratorIterator, because it cashes the return values somehow! |
| $ php imap-test.php | |
| int(1) | |
| string(0) "" |