View php-collections.txt
* dataProvider yield
* yield key
* yield from
* Inside out loop
* IteratorAggregate + Generator (MailTemplateFilenameTraversable)
* iterable
* iterable-functions
#! /bin/bash
# Sets up MediaWiki Vagrant in a subdirectory named mw-vagrant
# When aksed for a git user, just hit enter. Entering "anonymous" does not work.
set -ex
git clone --recursive mw-vagrant
cd mw-vagrant
View Seerose.txt
Big salad:
25% cous cous
15% chick peas
15% white beans
15% carrots with nuts
15% lentils
15% the thing that looks like lentils and is in between them and the chick peas
No dressing
# Tested with Python 3.5
# Fails on 2.x
from unittest import TestCase, main
class Point:
def __init__(self, x, y):
self._x = x
# Tested with Python 3.5
from unittest import TestCase, main
from collections import namedtuple
import math
class Point(namedtuple('Point', 'x, y')):
def get_distance_from_origin(self):
View MJAU.txt
* Domain Model (Entities, value objects, aggregates) depends on "nothing" (PHP, possibly libraries such as Euro)
* Domain Services are defined as interfaces that can only depend, and always depend, on domain concepts (and the domain model)
* Repositories (a kind of Domain Service?) are defined as interfaces that can only depend, and always depend, on domain concepts (and the domain model)
* Implementations of Repositories and Domain Services can depend on whatever (ie Doctrine, Monolog)
* Use Cases can only depend on the Domain Model, Domain Service (interfaces) and Repositories (interfaces)
* Use Cases form the API to the Domain. Higher level code cannot directly access the domain / domain concepts should not occur "outside" UCs.
* Everything bound to the Domain is part of the Bounded Context, nothing else is
* If there are multiple Domains (or rather, Sub Domains), there are multiple Bounded Contexts
* There are no dependencies between Bounded Contexts
* (Applications can use one or more Bounded Contexts, w
View ValueObjectsInPhpStuckBalls.php
trait ValueObjectsInPhpStuckBalls {
public static function newInstance() {
return new self();
* @throws \RuntimeException
public function validate() {
View CurrentFormat.json
data: {
"sister city": {
"type": "string",
"value": "Berlin",
"values": [
View lsp.php
interface Identifiable {
* @return Id
public function getId();
View MapPatcher.php
namespace Diff\Patcher;
use Diff\Comparer\StrictComparer;
use Diff\Comparer\ValueComparer;
use Diff\DiffOp\Diff\Diff;
use Diff\DiffOp\DiffOpAdd;
use Diff\DiffOp\DiffOpChange;
use Diff\DiffOp\DiffOpRemove;