Skip to content

Instantly share code, notes, and snippets.

View submissions0001-organizer.json
{
"Id": "0001",
"Title": "An Awesome Talk",
"Abstract": "Magnificent abstract goes here...",
"Status": "Submitted",
"Links": [
{
"Href": "http://example.com/api/submissions/0001",
"Rel": "self",
"Method": "GET"
@ekepes
ekepes / submissions0001-owner.json
Created Oct 26, 2016
If I am logged in to the site (I've been given a security token, for example), when I send a GET to the same endpoint for a talk I submitted:
View submissions0001-owner.json
{
"Id": "0001",
"Title": "An Awesome Talk",
"Abstract": "Magnificent abstract goes here...",
"Status": "Submitted",
"Links": [
{
"Href": "http://example.com/api/submissions/0001",
"Rel": "self",
"Method": "GET"
@ekepes
ekepes / submissions0001-anyuser.json
Created Oct 26, 2016
Any old user/client sends a GET to http://example.com/api/submissions/0001, they get this back:
View submissions0001-anyuser.json
{
"Id": "0001",
"Title": "An Awesome Talk",
"Abstract": "Magnificent abstract goes here...",
"Status": "Submitted",
"Links": [
{
"Href": "http://example.com/api/submissions/0001",
"Rel": "self",
"Method": "GET"
@ekepes
ekepes / ConsoleApplication2.cs
Last active May 1, 2020
C# implementation of a Linear Congruential Generator (LCG) for psuedorandom number generation
View ConsoleApplication2.cs
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
var freq = new int[20];
var rng = new RandomNumberGenerator();
@ekepes
ekepes / gist:67423b6182b81e93bf08
Created Mar 15, 2015
An attempt to port the TcpReactorServer in Helios to F#
View gist:67423b6182b81e93bf08
// Port of https://github.com/helios-io/helios/blob/dev/samples/Helios.Samples.TcpReactorServer/Program.cs
open System
open System.Net
open System.Text
open Helios.Net
open Helios.Reactor
open Helios.Reactor.Bootstrap
open Helios.Reactor.Tcp
open Helios.Topology
View serving-architect.md

I think, I heard term "Serving Architect" from a ThoughtWorks presentation. It can be described this way.

Somebody with an experience works with a team, eliminating bottlenecks and helping them to move forward in the project. Ideally he or she would have experience of multiple roles in a software project: architect (software designer), developer, tester, lead and manager; with technical hands-on expertise covering stacks used by the team. This way a serving architect can help and share experience with any role in the team, without interfering with the team dynamics.

View DapperSagaRepository
using Automatonymous;
using Dapper;
using MassTransit.Exceptions;
using MassTransit.Logging;
using MassTransit.Pipeline;
using MassTransit.Saga;
using MassTransit.Util;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
View ProbabilityKata
Value objects are an important concept in DDD. This kata is made both to learn value objects and to learn better ways of testing.
Write a probability value object. It should contain the following methods:
Probability CombinedWith(Probability)
Probability InverseOf()
Probability Either(Probability)
if you forget your probability math:
Either:P(A) + P(B) - P(A)P(B)
CombinedWith: P(A)P(B)
@ekepes
ekepes / SpecificationFixture.cs
Last active Dec 30, 2015 — forked from yevhen/SpecificationFixture.cs
Pull in all of the specifications in the test assembly.
View SpecificationFixture.cs
[TestFixture]
public class SpecificationFixture
{
[Test, TestCaseSource("GetSpecificationTestCases")]
public void Verify(SpecificationToRun spec)
{
var runner = new SpecificationRunner();
RunResult result = runner.RunSpecifciation(spec);
if (result.Passed)
@ekepes
ekepes / BadBadBadGetter.cs
Created Feb 20, 2012
Bad, bad, bad getter
View BadBadBadGetter.cs
public int SomeCountValue
{
get
{
if (_someCountValue == -1)
{
using (IUnitOfWork unitOfWork = new UnitOfWork())
{
_someCountValue = unitOfWork.GetQueryObjectInstance<ISomeQuery>()
.Where(Property1, Property2, Property3, Property4 ?? 0).Select();
You can’t perform that action at this time.