View main.c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
typedef struct stack_item
// The value given to the item.
int value;
// The pointer to the previous item.
struct stack_item * prev;
View gist:280fb9cc137883c0a4c8ca797219f68b
Model true invariants
Design small aggregates
Reference other aggregates by identity
Use eventual consistency between aggregate's boundaries
View gist:4464fe462d9132ef3cb433d6485c33b3
keytool -trustcacerts \
-keystore $JAVA_HOME/jre/lib/security/cacerts \
-storepass changeit \
-noprompt \
-importcert \
-file /etc/letsencrypt/live/
# sudo iptables -t nat -I PREROUTING -p tcp --dport 22 -j REDIRECT --to-ports 7999
# sudo iptables -t nat -I OUTPUT -p tcp -o lo --dport 22 -j REDIRECT --to-ports 7999
View registry-config.yml
# This file will be mounted to /etc/docker/registry/config.yml
version: 0.1
level: debug
formatter: text
service: registry
environment: staging
loglevel: debug
View gist:40824b3643a20b5481f053f0b629e864
namespace App\Services\Bus\Messaging;
use Prooph\Common\Messaging\Message;
use Prooph\Common\Messaging\MessageFactory;
use Rhumsaa\Uuid\Uuid;
final class ArrayMessageFactory implements MessageFactory
from urllib.parse import urlparse
def parse_uri_extract_auth_and_host_from_netloc(netloc):
""" Parses the "netloc" part of the ParseResult given by urlparse.
:param netloc: string
if not netloc.find('@'):
return (None, None, netloc)
authDetails, hostname = netloc.split('@', 1)
View BasicCommandBusSetup.php
namespace App\Providers;
use Prooph\ServiceBus\Plugin\Auditing\CommandAuditor;
use Prooph\ServiceBus\Plugin\Auditing\RawMessageSerializer;
use Prooph\ServiceBus\Plugin\Auditing\SecretMessageSerializer;
final class BasicCommandBusSetup extends ServiceProvider
View example for lender preferences.js
var amqp = require('amqplib');
var commandQueueName = "lender-preferences";
var rpcQueueName = "rpc-lender-preferences";
// Available commands.
var commands = {
Test: function (payload) {
console.log("I REALLY REALLY GOT HERE.");
View gist:01c4b3881154a910905c
namespace App\ProcessManager\Billing;
use App\Read\Billing\Queries\GetDefaultPlan;
use App\Read\Identity\Queries\UserWithId;
use App\Read\Identity\UserDto;
use App\Services\Bus\BillingCommandBus;
use App\Services\Bus\BillingQueryBus;
use App\Services\Bus\IdentityQueryBus;