Skip to content

Instantly share code, notes, and snippets.


Sandro Keil sandrokeil

View GitHub Profile
codeliner / DoctrineSharedConnectionAdapter.php
Last active Feb 14, 2016
An example of a decorated Prooph\EventStore\Adapter\DoctrineEventStoreAdapter that uses a shared database connection between write and read model. This can be useful if you want to avoid eventual consistency issues (only possible if same database is used for write/read).
View DoctrineSharedConnectionAdapter.php
namespace App\Infrastructure\EventStore;
use DateTimeInterface;
use Iterator;
use Prooph\EventStore\Adapter\Adapter;
use Prooph\EventStore\Adapter\Doctrine\DoctrineEventStoreAdapter;
use Prooph\EventStore\Exception\StreamNotFoundException;
use Prooph\EventStore\Stream\Stream;
View CommandBusFactory.php
namespace Ipark\ApplicationBundle\Messaging\ServiceBus\Infrastructure;
use Ipark\FrameworkBundle\Common\SecurityHelper;
use Prooph\Common\Messaging\NoOpMessageConverter;
use Prooph\ServiceBus\CommandBus;
use Prooph\ServiceBus\Plugin\Auditing\CommandAuditor;
use Prooph\ServiceBus\Plugin\Auditing\RawMessageSerializer;
use Prooph\ServiceBus\Plugin\Auditing\SecretMessageSerializer;
use Prooph\ServiceBus\Plugin\Router\RegexRouter;
saurshaz / aws-uploader.html
Last active Oct 3, 2016
aws-uploader riot component with server side code
View aws-uploader.html
const riot = require('riot')
<div class='container'>
<form method="POST" action="/save-details">
<input type="file" id="file-input" onchange={initUpload}>
<p id="status">Please select a file</p>
<section if={opts.imagefile === 'true'}>
<img style="border:1px solid gray;width:300px;" id="preview" src="/images/default.png">
<input type="hidden" id="avatar-url" name="avatar-url" value="/images/default.png">
codeliner / Message.php
Last active Dec 10, 2016
Single prooph message class
View Message.php
declare(strict_types = 1);
namespace Acme\Model;
use Prooph\Common\Messaging\DomainMessage;
use Prooph\Common\Messaging\Message as ProophMessage;
class Message extends DomainMessage
View Jenkinsfile
import groovy.transform.Field
import hudson.AbortException
import hudson.scm.SubversionSCM
import org.tmatesoft.svn.core.SVNDepth
import java.util.concurrent.ConcurrentHashMap
@Field int slaves = 4;
@Field int threadsPerSlave = 2;
@Field boolean coverageBuild = false
codeliner / MongoConnection.php
Last active Apr 6, 2017
prooph MongoEventStore v7
View MongoConnection.php
declare(strict_types = 1);
namespace Acme\Infrastructure\MongoDb;
use MongoDB\Client;
use MongoDB\Collection;
class MongoConnection
View example input
[27-May-2014 14:10:18] WARNING: [pool rebuy] child 3963 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught exception 'Exception' with message 'test exception' in /foo/htdocs/index.php:4"
View docker machine, swarm, external volumes
// Disable VirtualBox authentication
VBoxManage setproperty websrvauthlibrary null
// Start SOAP service so REX-Ray can talk to VirtualBox from the container host VMs
/Applications/ -H -v
// Create a Swarm cluster
docker-machine create --driver=virtualbox default
eval $(docker-machine env default)
TOKEN=$(docker run --rm swarm create)
View Dockerfile
FROM codeship/ruby
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
git \
COPY Makefile /src/
View EventMachine_Example.postman_collection.json
"variables": [],
"info": {
"name": "EventMachine Example",
"_postman_id": "89698ba0-98f0-cc94-2f71-9f19c183e3f3",
"description": "",
"schema": ""
"item": [
You can’t perform that action at this time.