Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Stasch mat3u

View GitHub Profile
@mat3u
mat3u / index.html
Last active Feb 4, 2019
CQRS Workshops
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CQRS Workshops</title>
<meta name="description" content="CQRS Workshops - Agenda">
<meta name="author" content="Matt Stasch">
<style>
* {
View Monad.cs
using System;
using System.Collections.Generic;
using System.Linq;
namespace code
{
using static TryExtensions;
using StringMapper = Func<string, Maybe<string>>;
#region Marine Domain Types
@mat3u
mat3u / f2014.csv
Last active Jun 4, 2018
World Cup Data
View f2014.csv
id phase team1 team1code team1score team1penalties team2 team2code team2score team2penalties
0 G1 Brazil BRA 3 0 Croatia CRO 1 0
1 G1 Mexico MEX 1 0 Cameroon CMR 0 0
2 G1 Spain ESP 1 0 Netherlands NED 5 0
3 G1 Chile CHI 3 0 Australia AUS 1 0
4 G1 Colombia COL 3 0 Greece GRE 0 0
5 G1 Uruguay URU 1 0 Costa Rica CRC 3 0
6 G1 England ENG 1 0 Italy ITA 2 0
7 G1 Cote d’Ivoire CIV 2 0 Japan JPN 1 0
8 G1 Switzerland SUI 2 0 Ecuador ECU 1 0
@mat3u
mat3u / media.yml
Created Jan 25, 2017
Media LoadTests
View media.yml
config:
target: "http://127.0.0.1:3005"
phases:
-
duration: 10
arrivalRate: 100
payload:
path: "data.csv"
fields:
- "externalId"
View StaticBinding.cs
namespace DomainBindingTest
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
class Program
{
static void Main(string[] args)
View designer.html
<link href="../core-icon-button/core-icon-button.html" rel="import">
<link href="../core-toolbar/core-toolbar.html" rel="import">
<link href="../core-header-panel/core-header-panel.html" rel="import">
<link href="../paper-tabs/paper-tabs.html" rel="import">
<link href="../paper-tabs/paper-tab.html" rel="import">
<polymer-element name="my-element">
<template>
<style>
View Disjoint.cs
using System.Collections.Generic;
using System.Linq;
namespace MergeLinks
{
public class Disjoint<T>
{
private readonly Dictionary<int, HashSet<T>> _groups;
private int _lastGroupKey = 0;
@mat3u
mat3u / TronAI.fs
Last active Aug 29, 2015
Engine for TronAI game - bots playing TRON
View TronAI.fs
type Direction = | North | East | South | West
type Position = int * int
type Size = int * int
type Player = int
type World = { Taken : Position list; Heads : (Player * Position) list }
type Bot = Player -> Position -> World -> Direction
let skipLast list =
// TODO: Ultra inefficient
View gol.fsx
//***
//*X*
//***
let vicinity (cx, cy) =
seq {
for x in -1..1 do
for y in -1..1 do
yield (cx + x, cy + y)
View gol.fs
type Cell = int * int
let exists_in element =
Seq.exists ((=) element)
let vicinity (x, y) =
seq {
for px in -1..1 do
for py in -1..1 do
yield (x+px, y+py)