Skip to content

Instantly share code, notes, and snippets.

View aprooks's full-sized avatar
😁
status

Aleksandr Pruks aprooks

😁
status
  • Toronto, Canada
  • 15:10 (UTC -05:00)
View GitHub Profile
@aprooks
aprooks / prometheus.yml
Created July 4, 2019 11:31 — forked from KekSfabrik/prometheus.yml
prometheus consul SD config
global:
scrape_timeout: 10s
scrape_interval: 15s
external_labels:
cluster: 'MY CLUSTER NAME'
# alternatively can be found via consul -- for details see
# https://prometheus.io/docs/prometheus/latest/migration/#alertmanager-service-discovery
alerting:
alertmanagers:
@aprooks
aprooks / multitarget-xunit.csproj
Last active March 5, 2019 13:56
try to run test targeting net framework under mono
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netcoreapp1.1;netcoreapp2.0;net462;net472</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentAssertions" Version="4.19.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="xunit" Version="2.4.1" />
Executing task: __RunTests
Test run for /Users/aleksandrpruks/sources/oss/Polly.Contrib.CustomPolicyTemplates/ProactivePolicyTemplate/src/Polly.Contrib.ProactiveCustomPolicyTemplate.Specs/bin/Release/netcoreapp1.1/Polly.Contrib.ProactiveCustomPolicyTemplate.Specs.dll(.NETCoreApp,Version=v1.1)
Microsoft (R) Test Execution Command Line Tool Version 15.9.0
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
Total tests: 8. Passed: 8. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 1.6555 Seconds
@aprooks
aprooks / draft.cs
Created June 2, 2018 15:19
events pub/sub
//Event
//event-sourcing style
//if you want reservation - call service or "build" state from previous
public class CheckedIn
{
public CheckedIn(DateTime checkedInAt) {}//and whatever
}
//Dario style with new reservation state
@aprooks
aprooks / duChiron.fs
Last active October 16, 2017 20:11
DU deserialize with chiron
type EventOne =
{ Property: string }
static member FromJson(_: EventOne) =
json {
let! p = Json.read "property"
return {Property = p}
}
type EventTwo =
{ Property: int }
module Host
open System
open System.Net
open Orleankka
open Orleankka.FSharp
open Orleankka.FSharp.Configuration
open Orleankka.FSharp.Runtime
open System
type BodyConfiguration<'a> = {
OnRecieve: unit->'a->unit
}
type ActorConfiguration<'a> = {
KeepAlive: System.TimeSpan
Body: BodyConfiguration<'a>
}
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
# Load posh-git module from current directory
Import-Module .\posh-git
# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
# Import-Module posh-git
@aprooks
aprooks / orlenkka-streams.fs
Last active November 30, 2015 11:01
testing orlenakka with f#
// Learn more about F# at http://fsharp.org
// See the 'F# Tutorial' project for more help.
open System
open System.Reflection
open Orleankka
open Orleankka.FSharp
open Orleankka.Playground
[<Serializable>]
namespace Test
{
[TestFixture]
public class WorkersPoolExample
{
private IActorSystem system;
[TestFixtureSetUp]
public void Setup()
{