Skip to content

Instantly share code, notes, and snippets.

View rommsen's full-sized avatar

Roman Sachse rommsen

View GitHub Profile
{- OVERVIEW ------------------------------------------------------
A "Tree" represents a binary tree. A "Node" in a binary tree
always has two children. A tree can also be "Empty". Below I have
defined "Tree" and a number of useful functions.
This example also includes some challenge problems!
----------------------------------------------------------------
-}
@rommsen
rommsen / EventChecker.php
Last active October 5, 2016 12:28
Behat with prooph
<?php
namespace Ipark\ApplicationBundle\Behat\Util;
use Prooph\Common\Messaging\Message;
use Prooph\EventSourcing\AggregateRoot;
use Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator;
use Prooph\EventStore\Aggregate\AggregateType;
use Prooph\ServiceBus\EventBus;
use Prooph\ServiceBus\Plugin\Router\RegexRouter;
<?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;
import React from "react";
import {connect} from "react-redux";
import {routeActions} from "react-router-redux";
import {makePayment} from "./memberActions";
import MakePaymentForm from "./MakePaymentForm";
const MakePayment = ({onMakePayment, params: {id}}) => {
return (
<div className="container">
<div className="row">
import React from "react";
import {connect} from "react-redux";
import {changeMonthFeeWasFinished, changeMonthFeeWasCancelled} from "./monthDucks";
/**
* component
*/
export const ChangeMonthFeeForm = ({month, submit, reset}) => {
let fee;
import React from "react";
import {connect} from "react-redux";
import {changingOfMonthFeeWasRequested} from "./monthDucks";
import ChangeMonthFeeForm from "./ChangeMonthFeeForm";
/**
* component
*/
export const Month = ({showForm, month, onClick}) => {
return (
@rommsen
rommsen / gist:7826867
Last active December 30, 2015 12:09
Symfony2 post-checkout hook includes check for composer.lock, bower.json and possible entity paths
#!/bin/bash
# put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\x1B[0m'
<?php
namespace Collection;
class CollectionEntry
{
/**
* @var CollectionEntryInner[]
*/
protected $collection;