Skip to content

Instantly share code, notes, and snippets.

View tjaskula's full-sized avatar
🎸
C++

Tomasz Jaskula tjaskula

🎸
C++
View GitHub Profile
@tjaskula
tjaskula / Fiber.fs
Created March 31, 2020 10:26 — forked from Horusiath/Fiber.fs
Custom fibers implementation in F#
open System
open System.Threading
type FiberResult<'a> = Result<'a, exn> option
[<Sealed;AllowNullLiteral>]
type Cancel(parent: Cancel) =
let mutable flag: int = 0
let mutable children: Cancel list = []
new() = Cancel(null)
@tjaskula
tjaskula / Fibers.cs
Created March 8, 2020 23:06 — forked from Horusiath/Fibers.cs
Minimal example of working async method builder
using System;
using System.Runtime.CompilerServices;
using System.Runtime.ExceptionServices;
using System.Threading;
namespace Fibers
{
public struct AsyncFiberMethodBuilder<T>
{
private Fiber<T>? fiber;
@tjaskula
tjaskula / iddd_polish.md
Last active November 3, 2019 14:35
Description of IDDD Workshop in Polish

Translated from https://kalele.io/live-training/iddd/

Jak Twój zespół może wykorzystać DDD

Intensywne, 3-dniowe, warsztaty IDDD autorstwa Vaughna Vernona, prowadzone przez Tomasz Jaskułę

Wyjdź poza teorię DDD i zobacz jak Twój zespół może w pełni wykorzystać DDD do realizacji Twoich strategicznych inicjatyw w sposób, który pomoże Twojej firmie zdobyć przewagę konkurencyjną. W trakcie warsztatu kładziemy nacisk na tworzenie oprogramowania zgodnie z najlepszymi praktykami (Software Craftmanship) oraz odzwierciedlenie modelu domenowego w kodzie źródłowym zgodnie z metodami Agile. Pokazujemy przewagę tego podejścia nad rozwiązywaniem realnych problemów biznesowych używając wyłącznie technologii. Szkolenie przeznaczone jest dla zaawansowanych i średnio zaawansowanych programistów oraz architektów zainteresowanych tworzeniem oprogramowania i nauką modelowania domen przy użyciu Domain-Driven Design (DDD). W ramach warsztatu nauczymy niezbędnych podstaw, które wykorzystasz, jeśli Twoja organizacja rozważa impl

@tjaskula
tjaskula / StrangeNaming.md
Last active February 12, 2020 16:11
StrangeInterfaceNaming discovered in the code

IKnowWhenAnAggregateHasBeenCreatedFromALegacyIdentifier // just a fucking cache
IKnowAllAggregatesIds // Wow, this could have been in the repository
IProvideUniqueIdentifier // id generator,

internal class SystematicNothingHasBeenCreatedYetAggregateCreationAuditTrail : IKnowWhenAnAggregateHasBeenCreatedFromALegacyIdentifier

IAmAReadProjector

IDealWithCompartiment, IDealWithLightTradeEntite

@tjaskula
tjaskula / iddd.md
Last active February 16, 2019 16:09
Implementing Domain Driven Design

Translated from : https://www.idddworkshop.com

Implementer Domain Driven Design

Cours développé par Vaughn Vernon et enseigné par Tomasz Jaskula

Comment votre équipe peut mettre à profit DDD

3 jours intensifs avec mise en pratique de IDDD Workshop conçu par Vaughn Vernon

@tjaskula
tjaskula / tp.md
Last active November 1, 2018 22:10
PySpark

Word Count

input = spark.sparkContext.textFile("file:///home/cluster/user27/data/20417-8.txt")
grouped = input.flatMap(lambda line: line.split(' '))
from operator import add
result = grouped.map(lambda word: (word, 1)).reduceByKey(add)
result.collect()

Average

@tjaskula
tjaskula / git.md
Last active January 14, 2020 10:29
Git setting certificates on error

Error

  1. Pushing to GitHub
$ git push origin master
fatal: unable to access 'https://github.com/tjaskula/aspnet-starter-kit-2.0.git/': schannel: next InitializeSecurityCont
ext failed: Unknown error (0x80092012) - La fonction de révocation n92a pas pu vérifier la révocation du certificat.
f(events) -> state
match f(state, event) -> state
f(state, command) -> events
@tjaskula
tjaskula / DomainEventsRaising.cs
Last active April 26, 2018 10:44
dddx code samles
public class CustomerRepository : IRepository
{
public CustomerRepository(IDataStore dataStore, IEventDispatcher eventDispatcher)
{
// boilerplate initialization ....
}
public Persist(Customer customer)
{
this.dataStore.Save(customer);