Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
function Prompt(){ | |
$W = Split-Path -leaf -path (Get-Location) | |
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green | |
$prompt += Write-Prompt $W -ForegroundColor DarkCyan | |
$prompt += Write-Prompt '>' | |
return ' ' | |
} | |
function Remove-StoppedContainers { | |
docker container rm $(docker container ls -q) |
Example on how to run locally an AWS Lambda via API Gateway using localstack.
Based on...
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowAllUsersToListAccounts", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:ListAccountAliases", | |
"iam:ListUsers", | |
"iam:GetAccountPasswordPolicy", |
public class ExampleAutoDataSpecimenBuilder : ISpecimenBuilder | |
{ | |
private readonly object[] _data; | |
public ExampleAutoDataSpecimenBuilder(object[] data) | |
{ | |
_data = data; | |
} | |
public object Create(object request, ISpecimenContext context) |
/// <summary> | |
/// Sets the step argument conversion infrasuructure as default for CreateSet and CreateInstance | |
/// </summary> | |
/// <remarks> | |
/// This method has to be called once, in a static ctor for example. Note: this way of setting is not | |
/// supported for parallel execution. | |
/// </remarks> | |
private static void SetupStepArgumentConverterValueRetriever() | |
{ | |
var assistService = TechTalk.SpecFlow.Assist.Service.Instance; |
using System.Web; | |
using System.Web.Optimization; | |
namespace WebApplication4 | |
{ | |
public class BundleConfig | |
{ | |
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 | |
public static void RegisterBundles(BundleCollection bundles) | |
{ |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Web.Http; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Filters; | |
using Castle.Windsor; | |
using Algorythmic.Web.API.Filters; | |
namespace Algorythmic.Web.API.Windsor.Filters | |
{ |
using System.Web; | |
using System.Web.Optimization; | |
namespace WebApplication4 | |
{ | |
public class BundleConfig | |
{ | |
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 | |
public static void RegisterBundles(BundleCollection bundles) | |
{ |
using Newtonsoft.Json; | |
using System; | |
using System.Collections.Specialized; | |
using System.Net; | |
using System.Text; | |
//A simple C# class to post messages to a Slack channel | |
//Note: This class uses the Newtonsoft Json.NET serializer available via NuGet | |
public class SlackClient | |
{ |
CQRS is not complicated - complex architectures are complicated, and they're complicated because we make them complicated | |
------------------- | |
CQRS is not a complicated architecture, CQRS just means maintaining a healthy division of responsibilities between reads and writes across your system - that is, having the reads in your system executed in a thin clean manner appropriate to the views you want to retrieve, and your writes going through all the crazy logic you need such as validation, updating queues, third party systems, processing business rules - whatever. | |
CQRS can be achieved by using a document database like Raven or Couch - using your documents as a write store, using your indexes as a query store. It can be achieved with your favourite ORM (Even better if you can actually use that O and that M and get some good old OO going) - if you want to use your objects for encapsulating business logic and go directly to the the queries to project the data you need for views (HQL, SQL directly, SPROCS, whate |