Endjin - Home

Mike Larah's Blog

GitHub Actions is GitHub’s new CI/CD platform (currently in open beta, at the time of writing). It is comparable with Microsoft’s other CI/CD offering, Azure Pipelines, which forms part of the Azure DevOps suite. Being fairly well acquainted with Azure Pipelines, I found myself looking for comparisons when getting started with GitHub Actions. It became […]


Passwordless SSH from Windows 10 to Raspberry Pi

by Mike Larah

Last week, everyone at endjin was presented with a Raspberry Pi 4, with the intention that we would go away and find cool stuff to do with it. My colleague, Jon, has already written up a post describing how to run Azure Functions in a Docker container on the Pi. One of the best ways […]


Enforce resource tagging with Azure Policy

by Mike Larah

We recently had a requirement from a client that all of their Azure resources must be tagged with a specific set of tags, which were ultimately to be used for cost accounting when the bill came rolling in. For simplicity of this blog post, let’s assume the client just required that all resources had to […]


We were recently looking for a way to run a script on an Azure Virtual Machine that already existed (i.e. not executing it at provisioning time). Whilst there are ways to do this remotely (using PowerShell remoting, for example), these tend to require updating the VM’s networking configuration to open up ports or allow traffic […]


One of the great benefits of Azure (and the Cloud in general) is the simplicity with which you can create and scale resources. The downside to this is that you can easily lose track what you’ve got deployed, or accidentally create expensive items and leave them running. We wanted a way to track our spending […]


tl;dr – I set up automated backups of our office security camera footage and used Microsoft Flow to automate alerting if anything went wrong. At endjin HQ, we have an office security setup using multiple cameras managed by Surveillance Station, an application on our on-site Synology NAS drive. Surveillance Station handles the recording schedules and stores […]


My Apprenticeship Retrospective

by Mike Larah

A few years back, Howard wrote his thoughts on apprenticeships, drawing from his own experiences, whilst endjin were in the process of planning their own unique apprenticeship scheme. I was fortunate enough to be selected as their first candidate (guinea pig?) and, as it is National Apprentice Week this week, I thought I would write […]


Like many other developers I’m sure, I spend quite a bit of time in command line applications (Windows CMD, PowerShell, etc.). Unfortunately, these applications don’t offer a lot in terms of customization. So I use ConEmu – a highly customizable, tabbed console emulator that lets you run any shell you want. This post describes how to setup ConEmu, and how […]


Since .NET 4.0, the ConcurrentDictionary<TKey, TValue> collection type has been available as a way of ensuring thread-safe access to a collection of key/value pairs, using fine grained locking. The collection also has AddOrUpdate and GetOrAdd methods that accept delegate value factories, so that you can lazily load your values only when you need to initialize them. […]


One of the great benefits of using SpecFlow is that it allows you to write your specifications in a human readable format. You write your specifications as a series of free-text steps and use step definitions to make the connection between the free-text and your code that executes the step. The step definition contains a […]


This post will go through how to write unit tests for your AngularJS app using Jasmine, how to run those tests in Visual Studio with ReSharper and the PhantomJS headless browser, and how to add a build step to your TeamCity CI pipeline to run the tests. The source code for the demo app is available […]


Restrict access to Azure Websites by whitelisting

by Mike Larah

By utilising the IP and Domain Restrictions feature in IIS (available since IIS7), it possible to lock down your Azure Website to only allow access to IP addresses and domains that you have specified in a whitelist. To allow a single IPv4 address, add the following node to your web.config: To allow access from a […]


When you run your cloud services in Azure, it is possible to change your configuration settings (app settings, number of instances, etc.) whilst your service is running – either via the Azure portal or the service management API. However, you may want to test how your application responds to these config changes whilst running locally […]


In the previous posts I’ve explained how to set up installers in your application, how to use the content factory, and how to set up the composition framework for ASP.NET. In this post I will show you how to debug the container. If you try to resolve a component that has missing dependencies, the Container will […]


To use endjin composition framework with an ASP.NET MVC 4/WebAPI application, firstly pull in the Endjin.Core.Composition.Web package from NuGet. Following the steps from the previous posts, you can set up your interfaces, concrete types and installers. No further initialization is required though – the package includes extensions for configuring and initializing the container, and also […]


As I explained in this post, the framework provides a set of installers for registering components against interfaces in the container. Another powerful tool in the composition framework is the ContentFactory. This provides methods for registering and getting content based on a contentType string. When getting content, if the contentType is not found in the […]


In the last post I introduced v2.0 of our open source, composition framework. In this post, I’m going to cover a quick example of how to get started with the basics of the endjin composition framework. Firstly, we define an interface for some type Then, we create a concrete type for our interface Now we can […]


We’ve just pushed out version 2.0 of our open-source, component composition framework. This is the framework we use internally day-in, day-out for our dependency injection. The previous version had a dependency on Castle Windsor, but in this new version we have implemented our own container. There are a few reasons we decided to take this […]


Background Twilio is a cloud based voice and SMS service and this post will show you how easy it is to create your own inbound voice application using MVC 4 Web API. The basic premise of how it works is Twilio parses a form of XML called ‘TwiML’, which contains various verbs telling Twilio what […]


Integration testing with Web API

by Mike Larah

I recently had do a project where I wanted to run integration tests on some Web API controllers, so this post is to describe the method for doing so. The way to do it is to mock an HttpServer and HttpClient class, but first you have to change some of the config to get them […]