Skip to content

Instantly share code, notes, and snippets.

View dbones's full-sized avatar
☄️
Coding the dotNEXT

Dave R. dbones

☄️
Coding the dotNEXT
View GitHub Profile
@dbones
dbones / docker.yaml
Created November 8, 2016 18:59
voting app
app-lb:
ports:
- 80:80
labels:
io.rancher.scheduler.affinity:host_label: server=proxy
io.rancher.loadbalancer.target.result: result.app:80=80
io.rancher.loadbalancer.target.vote: vote.app:80=80
tty: true
image: rancher/load-balancer-service
links:
@dbones
dbones / Program.cs
Created September 26, 2016 08:28 — forked from ovrmrw/Program.cs
Topshelf + OWIN Self-Host + ASP.NET WebAPI + Ninject
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Tracing;
using System.Reflection;
using Owin;
@dbones
dbones / WindsorJobActivator.cs
Created September 2, 2016 08:35
WindsorJobActivator.cs for Hangfire
public class WindsorJobActivator : JobActivator
{
private readonly IWindsorContainer _container;
public WindsorJobActivator(IWindsorContainer container)
{
_container = container;
}
@dbones
dbones / Program.cs
Created August 4, 2016 14:28
Container test, looking into Structuremap WIP
namespace ContainerTest
{
using System;
using System.Collections.Generic;
using System.Linq;
using Castle.Core;
using Castle.MicroKernel;
using Castle.MicroKernel.Context;
using Castle.MicroKernel.Lifestyle;
using Castle.MicroKernel.Registration;
@dbones
dbones / elasticMapping2.cs
Created April 9, 2016 19:22
creating a mapping using elastic + nest 2.0 (the previous does not work any more)
namespace Indexing2
{
using System;
using Nest;
class Program
{
static void Main(string[] args)
{
var settings = new ConnectionSettings(new Uri("http://index:9200"));
@dbones
dbones / docker-compose.yaml
Created December 2, 2015 23:14
Kong Api gateway
cassandra:
labels:
io.rancher.scheduler.affinity:host_label: server=stateful
tty: true
image: mashape/cassandra
stdin_open: true
kong:
labels:
io.rancher.scheduler.affinity:host_label: server=application
tty: true
@dbones
dbones / docker-compose.yaml
Last active December 4, 2015 23:47
dev database setup
DocumentLb:
ports:
- 5984:5984
labels:
io.rancher.scheduler.affinity:host_label: server=proxy
tty: true
image: rancher/load-balancer-service
links:
- Document:Document
stdin_open: true
@dbones
dbones / compose.yml
Created November 28, 2015 16:20
wordpress with rancher, docker
blog-lb:
ports:
- 80:80
labels:
io.rancher.scheduler.affinity:host_label: server=proxy
tty: true
image: rancher/load-balancer-service
links:
- blog:blog
stdin_open: true
@dbones
dbones / DynamicConfig.cs
Last active October 15, 2015 21:25
small hack, which allows you to load config from Json, Env and others into a Dynamic object
namespace ConfigBuilderTest
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.Linq;
using Newtonsoft.Json;
@dbones
dbones / elasticHelloWorld.cs
Last active August 29, 2015 14:18
NEST mapping, index only the first name
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TestIndex
{
using Nest;
class Program