Skip to content

Instantly share code, notes, and snippets.

View mtdowling's full-sized avatar

Michael Dowling mtdowling

View GitHub Profile
@mtdowling
mtdowling / gist:47da5eab54337cdc7ecc
Last active August 29, 2015 14:06
React and Guzzle experiment
<?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)}
@davedevelopment
davedevelopment / test.php
Created May 1, 2013 20:51
Listener removing itself
<?php
require "vendor/autoload.php";
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;
$dispatcher = new EventDispatcher;
$eventName = 'dave';
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.