Skip to content

Instantly share code, notes, and snippets.

@frankradocaj
frankradocaj / DeltaHelper.cs
Created April 13, 2018 04:07
A helper to resolve the list of differences (delta) between two lists
public static class DeltaHelper
{
public static (IEnumerable<TItem> Left, IEnumerable<TItem> Both, IEnumerable<TItem> Right) Compute<TItem, TValue>(
IEnumerable<TItem> list1,
IEnumerable<TItem> list2,
Func<TItem, TValue> getItemValue)
where TValue : IEquatable<TValue>
{
var comparableList1 = list1.Select(x => new EqualityComparer<TItem, TValue>
{
@frankradocaj
frankradocaj / Infrastructure.cs
Last active November 15, 2017 05:22
Simplifying ASP.Net Controllers
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using System.Net;
using Newtonsoft.Json.Serialization;
using System.Text;
namespace WebApplication1
{
@frankradocaj
frankradocaj / PasswordEvaluator.cs
Last active February 29, 2016 01:23
Password Evaluator
namespace TehSecureSystem
{
public class PasswordEvaluator
{
public int MinLength { get; }
public int MinLowercaseChars { get; }
public int MinUppercaseChars { get; }
public int MinSpecialChars { get; }
public int MinNumberChars { get; }
Preceived Problem
^^^^^^^^^^^^^^^^^
Currently, when we try to deploy an ASP.NET website to a Host Server, it's a tricky and complex set of tasks. It's even more frustrating when this is handled by a Continuous Integration service.
It feels like the full build / package / deploy *lifecycle* is currently a hap-hazard mix of band-aid solutions to try and solve this mission critical problem.
What we would love - A clean and simple lifecycle story
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@frankradocaj
frankradocaj / main.js
Created July 3, 2012 02:06
Opera inline module error example
require(['bootstrap-data'],
function (bootstrapData) {
console.log(bootstrapData.Message);
});