Skip to content

Instantly share code, notes, and snippets.

version: '3.5'
services:
postgres:
container_name: postgres_dock
image: postgres:12
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-PG_PASSWORD_HERE}
PGDATA: /data/postgres
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Caliburn.Micro;
using Autofac;
using IContainer = Autofac.IContainer;
namespace Caliburn.Micro.Autofac {
@amiry-jd
amiry-jd / SiWebApiDependencyResolver.cs
Last active December 17, 2015 12:29
Yet another implementation of ASP.NET Web Api IDependencyResolver and IDependencyScope, using SimpleInjector, for Self Hosted Environments
public class SiWebApiDependencyResolver : IDependencyResolver {
private readonly Container _container;
private readonly IDependencyScope _rootScope;
private bool _disposed;
public SiWebApiDependencyResolver(Container container) {
if (container == null)
throw new ArgumentNullException("container");
_container = container;
@amiry-jd
amiry-jd / gist:5408387
Created April 17, 2013 22:42
orderby descending in a TransformResults and paging it in RavenDB
// the documents
public class Photo {
public string Id { get; set; }
public DateTimeOffset CreatedAt { get; set; }
}
public class Place {
public string Id { get; set; }
public string Name { get; set; }
// documents: Place
public class Place{
public int Id{get;set;}
public string Name{get;set;}
public IList<int> PhotoIds{get;set;}
}
// documents: Photo
public class Photo{
public int Id{get;set;}