Skip to content

Instantly share code, notes, and snippets.

🌐
OSS Contributor

Alexander Miertsch codeliner

🌐
OSS Contributor
Block or report user

Report or block codeliner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Ocramius
Ocramius / Caddyfile
Last active Nov 11, 2019
Example docker + docker-compose + caddy + traefik setup that routes to multiple apps from one exposed HTTP port
View Caddyfile
:80 {
root /serve
}
@mathiasverraes
mathiasverraes / rollyourown.php
Created May 30, 2018
We don't need no DIC libs / we don't need no deps control
View rollyourown.php
<?php
// Context: I'm trying to argue that DI (and DIC) are great, and DIC libs suck.
// Happy to be proven wrong!
final class Router {
private $dependencies;
public function __construct (Dependencies $dependencies) {
$this->dependencies = $dependencies;
// You might say that this is Service Locator, but it's not. This router is toplevel,
// and toplevel must have access to dependencies. After that it can all just bubble nicely using proper DI.
@cherifGsoul
cherifGsoul / Container.php
Last active Jan 3, 2017
Yii2 container decorated with container-interop
View Container.php
<?php
namespace app\components;
use Interop\Container\ContainerInterface;
class Container implements ContainerInterface
{
private $wrappedContainer;
function __construct($container)
View EventStoreServiceProvider.php
<?php
namespace App\Providers;
use Doctrine\DBAL\Connection;
use Illuminate\Contracts\Container\Container;
use Illuminate\Support\ServiceProvider;
use Prooph\Common\Event\ActionEvent;
use Prooph\Common\Event\ActionEventEmitter;
use Prooph\Common\Event\ActionEventListenerAggregate;
use Prooph\Common\Event\DetachAggregateHandlers;
View BroadwayProjectionRebuilder.php
<?php
/**
* Projection Rebuilder
* @author Markus Muschol <markus.muschol@gmx.de>
*/
use Broadway\Domain\DateTime;
use Broadway\Domain\DomainEventStream;
use Broadway\Domain\DomainMessage;
use Broadway\Domain\Metadata;
use Broadway\EventHandling\EventBusInterface;
View graph.json
{"nodes":[{"name":"Myriel","group":1},{"name":"Napoleon","group":1},{"name":"Mlle.Baptistine","group":1},{"name":"Mme.Magloire","group":1},{"name":"CountessdeLo","group":1},{"name":"Geborand","group":1},{"name":"Champtercier","group":1},{"name":"Cravatte","group":1},{"name":"Count","group":1},{"name":"OldMan","group":1},{"name":"Labarre","group":2},{"name":"Valjean","group":2},{"name":"Marguerite","group":3},{"name":"Mme.deR","group":2},{"name":"Isabeau","group":2},{"name":"Gervais","group":2},{"name":"Tholomyes","group":3},{"name":"Listolier","group":3},{"name":"Fameuil","group":3},{"name":"Blacheville","group":3},{"name":"Favourite","group":3},{"name":"Dahlia","group":3},{"name":"Zephine","group":3},{"name":"Fantine","group":3},{"name":"Mme.Thenardier","group":4},{"name":"Thenardier","group":4},{"name":"Cosette","group":5},{"name":"Javert","group":4},{"name":"Fauchelevent","group":0},{"name":"Bamatabois","group":2},{"name":"Perpetue","group":3},{"name":"Simplice","group":2},{"name":"Scaufflaire","group":2},
You can’t perform that action at this time.