Skip to content

Instantly share code, notes, and snippets.

@swimtver
swimtver / gist:2d5ac66a273bcbe41ea269dfabdabc6e
Last active April 28, 2023 13:03 — forked from SzymonPobiega/gist:5220595
DDD/CQRS/ES/Architecture videos

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 Mod
@swimtver
swimtver / MinimalAPIs.md
Created January 5, 2022 10:13 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
namespace TestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
}
@swimtver
swimtver / disposeTest.cs
Last active August 29, 2015 14:26
IDisposable best practises
public class DisposeTest : IDisposable {
IDisposable _managedResource;
public DisposeTest() {
_managedResource = new SqlConnection();
}
public void Foo() {
if (_disposed)
throw new ObjectDisposedException("DisposeTest");
@swimtver
swimtver / delete
Created March 23, 2015 15:01
delete damage claim
BEGIN transaction
declare @number varchar(10)
set @number = 'Л519187'
DELETE c
from dbo.Comments c
join dbo.Workitems wi ON wi.Id=c.WorkItemId
JOIN Claim.DamageClaims dc ON dc.Id = wi.DamageClaimId
where Number = @number
DECLARE @SqlStatement VARCHAR(MAX)
SELECT @SqlStatement =
COALESCE(@SqlStatement, '') + 'DROP TABLE '+ QUOTENAME(TABLE_SCHEMA) +'.'+ + QUOTENAME(TABLE_NAME) + ';' + CHAR(13)
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA like 'pso%' or TABLE_SCHEMA like 'wf%'
PRINT @SqlStatement
@swimtver
swimtver / git cheatsheet
Last active January 17, 2018 12:49
git cheatsheet
1. discard unstaged changes
git clean -df // clean removes all untracked files
git checkout -- . // checkout clears all unstaged changes
git checkout path/to/file // clear specific file
2. log последние 3 коммита
git log --pretty=format:"%h %s" HEAD~3..HEAD
3. Объединить 2 коммита
git rebase -i HEAD~2