Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| require 'vendor/autoload.php'; | |
| use GuzzleHttp\Stream\BufferStream; | |
| use GuzzleHttp\Stream\AsyncReadStream; | |
| use GuzzleHttp\Ring\Future; | |
| $loop = React\EventLoop\Factory::create(); | |
| $dnsResolverFactory = new React\Dns\Resolver\Factory(); | |
| $dnsResolver = $dnsResolverFactory->createCached('8.8.8.8', $loop); |
| (ns igorw.brainfuck) | |
| ; limitations: | |
| ; * does not support nested loops | |
| (defn- iter [code {:keys [ip tape p in out]}] | |
| (condp = (get code ip) | |
| \> {:p (inc p)} | |
| \< {:p (dec p)} | |
| \+ {:tape (update-in tape [p] inc)} |
| <?php | |
| require "vendor/autoload.php"; | |
| use Symfony\Component\EventDispatcher\EventDispatcher; | |
| use Symfony\Component\EventDispatcher\Event; | |
| $dispatcher = new EventDispatcher; | |
| $eventName = 'dave'; |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.