Skip to content

Instantly share code, notes, and snippets.

@sskset
sskset / AutoFacModule.cs
Created August 25, 2018 16:15 — forked from thiagomajesk/AutoFacModule.cs
Generic Handlers & Commands for MediatR (+ AutoFac config)
public class GenericHandlersModule : Module
{
protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<CreateCommandHandler<Foo, CreateFooCommand>>().As<IRequestHandler<CreateFooCommand, bool>>();
builder.RegisterType<DeleteCommandHandler<Foo, DeleteFooCommand>>().As<IRequestHandler<DeleteFooCommand, bool>>();
builder.RegisterType<ListQueryHandler<Foo, ListFooQuery>>().As<IRequestHandler<ListFooQuery, IEnumerable<Foo>>>();
builder.RegisterType<UpdateCommandHandler<Foo, UpdateFooCommand>>().As<IRequestHandler<UpdateFooCommand, bool>>();
}
}
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
COPY ./publish .
ENTRYPOINT ["dotnet", "dockerize-dotnet-core.dll"]
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=p@ssw0rd" -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2017-latest
User Id: sa
Password: p@ssw0rd
docker run -d -e MONGO_INITDB_ROOT_USERNAME=sa -e MONGO_INITDB_ROOT_PASSWORD=p@ssw0rd -p 27017:27017 --name mongo1 mongo
User Id: sa
Password: p@ssw0rd
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.3.0
docker pull docker.elastic.co/kibana/kibana:6.3.0
docker network create esnetwork --driver=bridge
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name elasticsearch -d --network esnetwork docker.elastic.co/elasticsearch/elasticsearch:6.3.0
docker run -p 5601:5601 --name kibana -d --network esnetwork docker.elastic.co/kibana/kibana:6.3.0
docker run --name eventstore-node -it -p 2113:2113 -p 1113:1113 eventstore/eventstore
docker run -d -p 15672:15672 rabbitmq:3-management
user id: guest
password: guest
@sskset
sskset / package.js
Last active April 27, 2019 11:13
salesforce-packages
"dotenv": "^7.0.0",
"gulp": "^3.9.1",
"gulp-debug": "^4.0.0",
"gulp-file": "^0.4.0",
"gulp-jsforce-deploy": "^1.1.2",
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
"gulp-zip": "^4.2.0",
@sskset
sskset / gulpfile.js
Last active April 27, 2019 10:30
gulpfile.js
var forceDeploy = require("gulp-jsforce-deploy");
var gulp = require("gulp");
var del = require("del");
var zip = require("gulp-zip");
var rename = require("gulp-rename");
var replace = require("gulp-replace");
var file = require("gulp-file");
var dotenv = require("dotenv");
var debug = require("gulp-debug");
dotenv.config();
[email protected]
SF_PASSWORD={password}C4WjlOBJ5RcWhE0SJGsCCaB4 #password + $security_token
DIST_PATH=dist/salesforce-angular-app
LOGIN_URL=https://test.salesforce.com
PAGE_NAME=test
RESOURCE_NAME=test
CONTROLLER=
EXTENSIONS=
API_VERSION=45.0
BASE_HREF=/