Skip to content

Instantly share code, notes, and snippets.

Working from home

Szymon Pobiega SzymonPobiega

Working from home
View GitHub Profile
SzymonPobiega / gist:5220595
Last active May 24, 2022
DDD/CQRS/ES/Architecture videos
View gist:5220595

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{}
  5. Greg Young's [Unshackle Your Domain]{}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht

AHC lift

  1. Take measurements of your ride height at each corner of the vehicle. I recommend measuring from the fender lip to the bottom wheel lip.

  2. Turn off ignition. Locate the Height Control Sensor as seen in the diagram. Note the position on the adjustable top mount. You are going to want to slide it up as far as possible in the next step. For better access to the height control sensor, you can turn the wheels full left/right.

  3. I found it easiest to just remove the top nut of the heim joint (10mm) and adjust the rod so that it is as short as possible. This will give you about 2" of lift in the front. If you want 2.5", you'll have to shorten the heim joint (I used a cut-off wheel) and then used the existing stop-nuts to "smooth out the thread" and actually remove the stop nuts completely. Be careful because one side is a reverse thread. Not many people I know have a reverse cut tap/die set. Once done, reinstall the heim joint and adjust it so that the Height Control Sensor lever is as high as po

View gist:022fa71aff1d6464e867ee442d56112e
We are working on updating ServiceControl to RavenDB version 5.*.
One of the technical requirements of RavenDB 5.0 is that the machine has .NET Core 3.1 installed.
We cannot shift the ServiceControl executable to have a dependency on .NET Core 3.1 as it sill depends on Windows Services and the Event Log. In addition to that, ServiceControl Management is a desktop WPF application that cannot be ported to .NET Core 3.1 anyway.
To cope with all this we intended to add .NET Core 3.1 as a prerequisite to the ServiceControl installer (.NET 4.6.2 is already a pre-requisite).
However, during the update process, RavenDB version 5.1 was released. This version has many needed bug-fixes, as well as a feature (document compression) that is quite useful for useful. **RavenDB 5.1 has shifted from .NET Core 3.1 to .NET 5**. As a result, we will switch to **requiring .NET 5** as a dependency in our installer. This should still be transparent to users of our installer package. We expect that fixes for bugs found in futu
View RenameServiceControl.ps1
function Rename-ServiceControl($instanceName, $newInstanceName) {
#Derive the current bin and data paths from the instance names
$binPath = "${Env:ProgramFiles(x86)}\Particular Software\$instanceName"
$dataPath = "${Env:ProgramData}\Particular\ServiceControl\$instanceName"
#Derive the new bin and data paths from the instance names
$newBinPath = "${Env:ProgramFiles(x86)}\Particular Software\$newInstanceName"
$newDataPath = "${Env:ProgramData}\Particular\ServiceControl\$newInstanceName"
SzymonPobiega / raw-processing.cs
Created Mar 13, 2020
Raw message processing using plain NServiceBus
View raw-processing.cs
using System;
using System.Threading.Tasks;
using NServiceBus;
using NServiceBus.Extensibility;
using NServiceBus.Pipeline;
using NServiceBus.Routing;
using NServiceBus.Transport;
namespace TestRawProcessing
SzymonPobiega /
Created Mar 10, 2020
Hacks in NServiceBus.Raw

Stuff passed via settings

Things that transport used to require that are passed via settings, not via seam:

Settings.Set("Endpoint.SendOnly", sendOnly);
Settings.Set("TypesToScan", new Type[0]);
Settings.Set("NServiceBus.Routing.EndpointName", endpointName);
Settings.Set<Conventions>(new Conventions()); //Hack for ASB
Settings.Set(new StartupDiagnosticEntries());
View TransactionLeak.cs
using System;
using System.Data.SqlClient;
using System.Threading.Tasks;
using System.Transactions;
using NServiceBus;
namespace ConnectionLeakTest
class Program
SzymonPobiega / sendlocal.cs
Created Jul 31, 2019
Testing auditing of SendLocal-sent messages
View sendlocal.cs
using System;
using System.Threading.Tasks;
using NServiceBus;
namespace AuditSendLocalTest
class Program
static void Main(string[] args)
View polymorphic-collections.cs
namespace NServiceBus.AcceptanceTests.Sagas
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EndpointTemplates;
using AcceptanceTesting;
using global::NHibernate.Cfg;
using global::NHibernate.Dialect;
View enable-router.cs
var routerConfiguation = new RouterConfiguration("Router");
routerConfiguation.AddInterface<MsmqTransport>("MSMQ", t => {}).DisableMessageDrivenPublishSubscribe();
routerConfiguation.AddInterface<SqlServerTransport>("SQL", t => t.ConnectionString(myConnectionString)).DisableMessageDrivenPublishSubscribe();
routerConfiguation.Chains.AddRule(c => new MetricsPreroutingTerminator("MSMQ", "Particular.Monitoring@some-machine"));
var router = Router.Create(routerConfiguation);
await router.Start().ConfigureAwait(false);