Skip to content

Instantly share code, notes, and snippets.

@JoeStead
JoeStead / country-codes.json
Created October 7, 2022 08:43
ISO 3166 Alpha 2 country codes
[
{ "country": "Afghanistan", "code": "AF" },
{ "country": "Albania", "code": "AL" },
{ "country": "Algeria", "code": "DZ" },
{ "country": "American Samoa", "code": "AS" },
{ "country": "Andorra", "code": "AD" },
{ "country": "Angola", "code": "AO" },
{ "country": "Anguilla", "code": "AI" },
{ "country": "Antarctica", "code": "AQ" },
{ "country": "Antigua and Barbuda", "code": "AG" },
@JoeStead
JoeStead / webpackconfig.js
Created February 8, 2021 12:56
standard webpack config
const path = require("path");
module.exports = {
entry: "./src/lambda.ts",
mode: "production",
cache: true,
target: "node",
module: {
rules: [
{
@JoeStead
JoeStead / NancyNotfound.cs
Created November 2, 2017 10:12
Nancy Not Found Response
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
var order = new Order(Guid.NewGuid(), Guid.NewGuid());
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
class Program
{
static void Main(string[] args)
{
var order = new Order(Guid.NewGuid(), Guid.NewGuid());
}
@JoeStead
JoeStead / FluentValidationGenerator.cs
Created March 8, 2016 15:13
Generates some docs stuff for fluent validation
public void Stuff()
{
var what = AllRules();
foreach (var s in what)
{
Debug.WriteLine(s);
}
}
public List<string> AllRules()
open FsCheck
open FsCheck.Xunit
open Swensen.Unquote
[<Property>]
let ``Given Rich likes BDD style tests but not ugly method names when writing tests then we should use F#`` () =
true =! true