Skip to content

Instantly share code, notes, and snippets.

@bboyle1234
bboyle1234 / worksonlocalmachine.yml
Last active July 26, 2018 02:04
EventStore Test Cluster
version: '2'
services:
eventstore1:
image: eventstore/eventstore
ports:
- 12113:2113/tcp
- 11113:1113/tcp
environment:
EVENTSTORE_CLUSTER_DNS: eventstore1
@bboyle1234
bboyle1234 / CreateSilo.cs
Created March 12, 2018 12:34
Example MongoDB connection
static ISiloHost CreateSilo() {
var builder = new SiloHostBuilder()
.Configure(options => options.ClusterId = NDGConfig.ClusterId)
.Configure<ProcessExitHandlingOptions>(options => options.FastKillOnProcessExit = false)
.ConfigureSiloName(NDGConfig.ClusterId + "-" + NDGConfig.SiloHostName)
.ConfigureEndpoints(advertisedIP: NDGConfig.SiloIP, siloPort: NDGConfig.SiloPort, gatewayPort: NDGConfig.GatewayPort, listenOnAllHostAddresses: true)
.ConfigureLogging(b => b.SetMinimumLevel(LogLevel.Error).AddConsole())
.UseDashboard(options => {
options.Port = NDGConfig.SiloDashboardPort;
options.Username = NDGConfig.SiloDashboardUsername;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Orleans;
using Orleans.Configuration;
using Orleans.Hosting;
using Orleans.Providers;
using Orleans.Runtime;
@bboyle1234
bboyle1234 / IMigratable.cs
Last active February 27, 2018 03:02
IMigratable
using Newtonsoft.Json;
namespace Migratable {
[JsonConverter(typeof(MigratableConverter))]
public interface IMigratable {
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net461;netstandard2.0;netcoreapp2.0</TargetFrameworks>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<AssemblyName>Apex.TradingGrains</AssemblyName>
<RootNamespace>Apex.TradingGrains</RootNamespace>
<Description>Apex.TradingGrains</Description>
<PackageId>Apex.TradingGrains</PackageId>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
using ApexInvesting.Platform.Utilities;
using ApexTough.Providers;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApexTough.TradingPlatform.Utilities {
#region Using declarations
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
#region Using declarations
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
@bboyle1234
bboyle1234 / EnumerableExtensions.cs
Last active March 23, 2016 05:35
MemberwiseEqualityObject
using System;
using System.Linq;
using System.Collections.Generic;
namespace ApexInvesting.Platform {
public static class EnumerableExtensions {
/// <summary>
/// Convert Enumerable to HashSet.
/// </summary>
/// <typeparam name="T"></typeparam>
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace ApexInvesting.Platform.Utilities.Drawing {
public enum HorizontalShiftPermissions {