Skip to content

Instantly share code, notes, and snippets.

View dario-l's full-sized avatar

Dariusz Lenartowicz dario-l

View GitHub Profile
@davidfowl
davidfowl / .NET6Migration.md
Last active August 7, 2024 19:41
.NET 6 ASP.NET Core Migration
@davidfowl
davidfowl / MinimalAPIs.md
Last active September 15, 2024 18:58
Minimal APIs at a glance
@lennybacon
lennybacon / New-AES256Key.ps1
Last active August 7, 2024 10:35
Generate a new AES 256 Key with PowerShell
$random = [System.Security.Cryptography.RandomNumberGenerator]::Create();
$buffer = New-Object byte[] 32;
$random.GetBytes($buffer);
[BitConverter]::ToString($buffer).Replace("-", [string]::Empty);
@vladikk
vladikk / ExecutionResult.cs
Created March 19, 2017 14:57
Command execution result object for CQRS based systems
using System;
namespace Example
{
public abstract class ExecutionResult
{
protected ExecutionResult(Guid aggregateId, Guid commandId, DateTime executedOn)
{
AggregateId = aggregateId;
CommandId = commandId;
@johnnyasantoss
johnnyasantoss / publish.cake
Created March 17, 2017 21:02
Deploy usando cake build
#addin "Cake.IIS"
#addin "Cake.Http"
#addin "Cake.Services"
using System;
string servidor = null;
var servidores = Argument<string>("AppServers", string.Empty).Split(',');
var appPoolOrService = Argument<string>("AppPoolOrService", string.Empty);
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
namespace FileAnalyzer
{
public class Record
{
public DateTime Start => DateTime.Parse(_line.Split(' ')[0]);
void Main()
{
var pushId = FirebasePushIDGenerator.GeneratePushID();
Console.WriteLine(pushId);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Thread.Sleep(5);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
Thread.Sleep(5);
Console.WriteLine(FirebasePushIDGenerator.GeneratePushID());
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
/*
Some helpful Linq extensions I've used with Unity.
Original code from stackoverflow.com where user contributions are
licensed under CC-BY-SA 3.0 with attribution required.
@andrewabest
andrewabest / ContinuousDeploymentWithGitVersionAndGitFlow.md
Last active October 28, 2020 10:21
How to use GitVersion for semantic versioning with TeamCity and Octopus Deploy

Setting up TeamCity and Octopus with GitVersion

Assumptions

  • You are using GitFlow
  • You want to deploy a new version of your software every time a commit is made to the develop branch
  • You are using Octopack to package your application for deployment

Instructions

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.