Skip to content

Instantly share code, notes, and snippets.

View john-nicholson's full-sized avatar

John Nicholson john-nicholson

  • Bury St Edmunds
View GitHub Profile
@john-nicholson
john-nicholson / ExampleHandler.cs
Last active September 3, 2017 23:28
An Example Message Handler
namespace IJYI.IMP.SimpleProcessingExample
{
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IJYI.IMP.Core.Messaging;
using IJYI.IMP.Entity;
using IJYI.IMP.Entity.Messages.SystemLevel;
@john-nicholson
john-nicholson / ExampleMessage.cs
Last active September 3, 2017 23:26
An example IMP Message
namespace IJYI.IMP.SimpleProcessingExample
{
using System;
using UJYI.IMP.Entity;
[DataContract]
public class ExampleMessage : BaseMessage
{
[DataMember]

Keybase proof

I hereby claim:

  • I am john-nicholson on github.
  • I am sidhenidon (https://keybase.io/sidhenidon) on keybase.
  • I have a public key whose fingerprint is 9B04 FAD0 13A7 E6F0 F145 8B20 1A03 05FD 2BEE A2FD

To claim this, I am signing this object:

@john-nicholson
john-nicholson / Test.ps1
Last active August 29, 2015 14:22
Example of Testing DSC with Pester ( AWS Read S3 Object)
Describe "S3 Bucket Test-TargetResource" {
Mock Test-Path { return true }
Mock Get-S3Object { return { ETag: $hash } }
Context "when Ensure Present"{
It "Test returns Absent" {
(Get-TargetResource -ProfileName $ProfileName).Ensure | Should Be "Absent"
}
}
@john-nicholson
john-nicholson / ErrorHandler.bas
Created June 1, 2015 16:16
At IJYI we’re proud of our flexibility about the technology we support. That said remotely supporting legacy systems such as Access provides its own unique headaches. There is nothing worth that hearing “it doesn’t work” without knowing where or how the system failed. Loggly provides a mean a viewing these details with a consist view of logs / e…
Public Function HandleError( _
ByVal lngErrNumber As Long, _
ByVal strErrDescription As String, _
strCallingProc As String, _
Optional vParameters, _
Optional bShowUser As Boolean = True _
) As Boolean
On Error GoTo Err_HandleError
'Declare Scope Variables