Skip to content

Instantly share code, notes, and snippets.

@eljam
eljam / structure.md
Created February 19, 2019 17:38
CQRS Structure
src
├── Application
│   ├── Command
│   │   ├── CommandHandlerInterface.php
│   │   ├── CreateFlightTripItem
│   │   │   ├── CreateFlightTripItemCommand.php
│   │   │   └── CreateFlightTripItemHandler.php
│   │   ├── CreateRoomTripItem
│   │   │   ├── CreateRoomTripItemCommand.php
@eljam
eljam / brew.sh
Last active December 30, 2015 21:57
Install German script
#!/usr/bin/env bash
echo -e "\033[33m\n✔\033[33m Installing German package...\033[0m\n"
brew install gearman #--with-mysql or --with-postgresql for queue storage
echo -e "\033[33m\n✔\033[33m Installing German PHP extension...\033[0m\n"
brew install php54-gearman #change to your php version
@eljam
eljam / ForkManager.php
Last active December 11, 2015 13:28
A simple ForkManager
<?php
/**
*
*/
class ForkManager
{
/**
* @var array Collection of pids running
*/