Go read the blog post.
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 | |
// iterator impl: | |
class MapIterator extends IteratorIterator { | |
private $f; | |
public function __construct($f, $inner) { | |
parent::__construct($inner); | |
$this->f = $f; |
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__.'/silex.phar'; | |
$app = new Silex\Application(); | |
$app->register(new Silex\Extension\TwigExtension(), array( | |
'twig.path' => __DIR__.'/views', | |
'twig.class_path' => __DIR__.'/vendor/twig/lib', | |
)); |
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
-- place this file in | |
-- $(brew --prefix highlight)/share/highlight/themes/yawn.theme | |
Description = "Yawn" | |
Default = { Colour="#000000" } | |
Canvas = { Colour="#ffffff" } | |
Number = { Colour="#812024" } | |
Escape = { Colour="#696969" } | |
String = { Colour="#006124" } |
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
commit 935f32fd0941a5c54e1931f0668e05c52daa66d4 | |
Author: Igor Wiedler <igor@wiedler.ch> | |
Date: Thu May 31 19:19:40 2012 +0200 | |
Prototype of async DNS client | |
diff --git a/.gitignore b/.gitignore | |
new file mode 100644 | |
index 0000000..22d0d82 | |
--- /dev/null |
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 | |
// src/Foobar/Controller/FooController.php | |
namespace Foobar\Controller; | |
class FooController | |
{ | |
public function helloAction($request) | |
{ |
This release has two major improvements. The first one is that react/dns
is now using a promise based API. In case you missed it, react/promise is a PHP library for promises. Take a look at the README and familiarize yourself with it, as it will be used by many libs in the react ecosystem, including core.
The previous API was:
$dns->resolve('igor.io', function ($ip) {
echo "Yay, the IP is $ip.\n";
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_once __DIR__ . '/../lib/vendor/Silex/silex.phar'; | |
$app = new Silex\Application(); | |
$app['debug'] = true; | |
// Registering Symfony\Yaml and Symfony\Config | |
$app['autoloader']->registerNamespace('Symfony', __DIR__.'/../lib/vendor/symfony/src'); |
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 Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
class Csp implements HttpKernelInterface | |
{ | |
private $app; | |
private $options; |
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 React\Curry\Util as Curry; | |
$projects = array( | |
'react-php/react', | |
'cboden/Ratchet', | |
'nrk/predis-async', |