View HashFunction.ts
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
import * as crypto from 'crypto'; | |
import * as fs from 'fs'; | |
import * as path from 'path'; | |
/** | |
* Interface for Webpack's hashFunction | |
*/ | |
export interface IHashFunction { | |
update: (data: string | Buffer, encoding: string) => IHashFunction; | |
digest: (encoding: string) => string | Buffer; |
View stream.php
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 | |
$confirmedEmails = yield $db->select() | |
->stream() | |
->filter(fn (User $user) => $user->isEmailConfirmed()) | |
->map(fn (User $user) => $user->getEmail()) | |
->toArray(); | |
$pagedConfirmedUsers = yield $db->select() | |
->stream() |
View timer-replay.php
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 | |
use Amp\Loop\Internal\TimerQueue; | |
use Amp\Loop\Watcher; | |
require __DIR__ . '/vendor/autoload.php'; | |
$input = \file_get_contents('/home/kelunik/Downloads/tq-A805-3.log'); | |
$timerQueue = new TimerQueue; |
View Form.vue
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
<template> | |
<VueForm action="/api/test.json"> | |
<FormLabel label="First name"> | |
<FormInput name="firstName"/> | |
</FormLabel> | |
<FormLabel label="Last name"> | |
<FormInput name="lastName"> | |
</FormLabel> | |
View cmd.txt
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
gdb --batch --command=gdb.bt -return-child-result --args ./a.out |
View MulticastDns.php
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 | |
namespace Kelunik\LightD; | |
use Amp\Deferred; | |
use Amp\Delayed; | |
use Amp\Dns\DnsException; | |
use Amp\Dns\Record; | |
use Amp\Loop; | |
use Amp\Promise; |
View example.php
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 | |
class EventManager { | |
private $handlers; | |
public function onEvent(callable $callback) { | |
$this->handlers[] = $callback; | |
} | |
public function invoke(Event $event) { |
View mysql.php
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 | |
use Amp\Loop; | |
use Amp\Mysql\ConnectionConfig; | |
use Amp\Mysql\Pool; | |
use Amp\Mysql\ResultSet; | |
use Amp\Mysql\TimeoutConnector; | |
use Amp\Socket\ClientTlsContext; | |
use Illuminate\Support\Collection; |
View Field.php
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 | |
namespace Amp\Http\Server\FormParser; | |
final class Field { | |
/** @var string */ | |
private $name; | |
/** @var string */ | |
private $value; |
View concurrent-requests.php
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 | |
require __DIR__ . '/vendor/autoload.php'; | |
use Amp\Loop; | |
use Amp\Artax; | |
$queue = new SplQueue; | |
$waiting = new Amp\Deferred; | |
$http = new Artax\DefaultClient; |
NewerOlder