Skip to content

Instantly share code, notes, and snippets.

Mathew McLoughlin mat-mcloughlin

Block or report user

Report or block mat-mcloughlin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.arm
resource "azurerm_resource_group" "default" {
name = "vnet-test-terraform"
location = "UK West"
}
resource "azurerm_virtual_network" "default" {
name = "vnet-test-terraform-vn"
address_space = ["10.1.0.0/16"]
location = "UK West"
resource_group_name = "${azurerm_resource_group.default.name}"
}
View main.arm
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_vnet_test_manual_as_name": {
"defaultValue": "vnet-test-manual-as",
"type": "String"
},
"serverfarms_vnet_test_manual_asp_name": {
"defaultValue": "vnet-test-manual-asp",
View ghost-playbook.yml
---
- hosts: ghost
become: true
tasks:
# setup nginx and firewall
- name: Install nginx
apt:
View sample-domain.cs
public class Encounter
{
string patientName;
DateTime birthDate;
int ageInYears;
DateTime timeOfAdmission;
@mat-mcloughlin
mat-mcloughlin / Program.cs
Created Aug 10, 2016
Basic implementation of a command register
View Program.cs
using System;
using System.Collections.Generic;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var register = new CommandRegister();
View commandRegister
using System;
using System.Collections.Generic;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
var register = new CommandRegister();
View gist:d3456aad54c7ca0d2ecb8cfe379f3bd3
1 call plug#begin('~/.vim/plugged')
1
2 Plug 'ctrlpvim/ctrlp.vim'
3 Plug 'flazz/vim-colorschemes'
4 Plug 'tpope/vim-vinegar'
5 Plug 'dmpas/vim-csharp'
6 Plug 'powerline/powerline'
7
8 call plug#end()
9
View .vimrc
call plug#begin('~/.vim/plugged')
Plug 'ctrlpvim/ctrlp.vim'
Plug 'flazz/vim-colorschemes'
Plug 'tpope/vim-vinegar'
Plug 'Chiel92/vim-autoformat'
Plug 'powerline/powerline', { 'rtp': 'powerline/bindings/vim/' }
Plug 'plasticboy/vim-markdown'
Plug 'junegunn/goyo.vim'
View error
Error detected while processing function OmniSharp#FixUsings:
line 1:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/mat-mcloughlin/.vim/plugged/omnisharp-vim/python/OmniSharp.py", line 187, in fix_usings
js = json.loads(response)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
View foo.cs
[Fact]
public void SomeOtherReallyBadTest()
{
var context = new ConfigurableContext<FooContext>(ctx =>
{
ctx.Setup(x => x.Users, new List<User>());
});
var subject = new Foo(configurableContext); //Note the implicit conversion
You can’t perform that action at this time.