#!/bin/bash | |
# | |
# git-mv-with-history -- move/rename file or folder, with history. | |
# | |
# Moving a file in git doesn't track history, so the purpose of this | |
# utility is best explained from the kernel wiki: | |
# | |
# Git has a rename command git mv, but that is just for convenience. | |
# The effect is indistinguishable from removing the file and adding another | |
# with different name and the same content. |
<?php | |
namespace React\SocketClient; | |
use React\SocketClient\ConnectorInterface; | |
use React\EventLoop\LoopInterface; | |
use React\Promise\Timer; | |
class TimeoutConnector implements ConnectorInterface | |
{ |
$cancellable = new Promise(function () { }, function ($resolve, $reject) { $reject(); }); | |
$uncancellable = uncancellable($cancellable); | |
assertPending($cancellable); | |
assertPending($uncancellable); | |
// this is a NO-OP | |
$uncancellable->cancel(); | |
assertPending($cancellable); | |
assertPending($uncancellable); |
$retry = function ($request, $next) { | |
return $next($request)->then(null, function ($error) use ($request, $next) { | |
// the $next failed. discard $error and retry once again: | |
return $next($request); | |
}); | |
}; | |
$runner = new MiddlewareRunner(array( | |
$retry, | |
function ($request, $next) { |
<?php | |
$loop = React\EventLoop\Factory::create(); | |
$loop->addSignal(SIGINT, function () use ($loop) { | |
echo 'CTRL+C caught'; | |
// cleanup... | |
// cleanup... | |
$loop->removeSignal(SIGINT); | |
}); |
C:\Users\lappy>ipconfig /all | |
Windows IP Configuration | |
Host Name . . . . . . . . . . . . : lappy-PC | |
Primary Dns Suffix . . . . . . . : | |
Node Type . . . . . . . . . . . . : Hybrid | |
IP Routing Enabled. . . . . . . . : No | |
WINS Proxy Enabled. . . . . . . . : No |
Think about "PHP" for a few seconds… What came to mind? It’s very likely you thought about your average product catalog, a blogging platform or how the platform is inferior to things like Node.js. But wait, it’s 2018! What if I told you PHP’s huge ecosystem has way more to offer and PHP is not inferior at all to its evil cousin Node.js?
Hands-on workshop given at PHPYorkshire (2018-04-13)
In this hands-on tutorial you will learn about the core concepts of async PHP and why you too should care about ReactPHP being a real thing. The workshop has a strong focus on sparking the idea that PHP can be way faster and more versatile than you probably thought. Bring along an open mind and through lots of interesting examples and live demos learn why what sounds crazy at first might soon be a valuable addition in your toolbox.
You’re already familiar with PHP and want to learn what ReactPHP is all about? Then this tutorial is for you! We will