Skip to content

Instantly share code, notes, and snippets.

View jonfazzaro's full-sized avatar
💭
Probably off looking for a cup of coffee.

Jon Fazzaro jonfazzaro

💭
Probably off looking for a cup of coffee.
View GitHub Profile
public class Encrypted {
public string Value { get; set; }
public string Salt { get; set; }
}
@jonfazzaro
jonfazzaro / InfernoEncryptionProvider.cs
Created September 27, 2016 16:08
You had one job, Inferno--make it so I didn't have to think about encryption.
using SecurityDriven.Inferno;
using System;
public class InfernoEncryptionProvider : IEncryptionProvider {
readonly IEncryptionConfiguration _configuration;
public InfernoEncryptionProvider(IEncryptionConfiguration configuration) {
_configuration = configuration;
}
@jonfazzaro
jonfazzaro / MemoryDbSet.cs
Last active August 22, 2016 16:46
In-memory implementation of IDbSet, for unit testing.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
public class MemoryDbSet<T> : IDbSet<T> where T : class {
readonly List<T> _list = new List<T>();
@jonfazzaro
jonfazzaro / esquire.js
Last active October 19, 2016 13:44
A syntactic sugar packet for Squire.js (https://github.com/iammerrick/Squire.js/).
define(function (require) {
var Squire = require('Squire');
return {
load: load
};
function load(modelId, dependencies) {
var s = new Squire();
addMockedDependencies(s, dependencies)