Skip to content

Instantly share code, notes, and snippets.

View MisinformedDNA's full-sized avatar

Dan Friedman MisinformedDNA

View GitHub Profile
@MisinformedDNA
MisinformedDNA / UserSettings.cs
Created May 24, 2016 21:50
AutoRest code generation
using MyApplication.Data;
using MyApplication.Services.Models;
using Swashbuckle.Swagger.Annotations;
using System.Data.Entity;
using System.Net;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Description;
namespace MyApplication.Web.Controllers.api
@MisinformedDNA
MisinformedDNA / CsvExtractor.cs
Created September 9, 2016 20:54
"No header record was found" on Azure Data Lake
using CsvHelper;
using Microsoft.Analytics.Interfaces;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace SomeNamespace
{
public class CustomExtractor : CsvExtractor
@MisinformedDNA
MisinformedDNA / Program.cs
Last active February 20, 2017 14:02
SyndicationFeed
using System;
using System.IO;
using System.ServiceModel.Syndication;
using System.Xml;
namespace SyndicationFeedTest
{
class Program
{
static void Main(string[] args)
@MisinformedDNA
MisinformedDNA / Program.cs
Created June 11, 2018 22:35
ASP.NET Core with Azure Key Vault configuration provider
using Microsoft.Extensions.Configuration;
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((context, config) =>
{
var builtConfig = config.Build();
var keyVaultConfigBuilder = new ConfigurationBuilder();
@MisinformedDNA
MisinformedDNA / renaming-scheme.json
Created February 26, 2020 04:08
CalcyIV renaming scheme with POC
{"Name":"$Name$","Nr#":"$Nr#$","Name2":"$Name2$","Name3":"$Name3$","NaAb":"$NaAb$","Form":"$Form$","CatchDate":"$CatchDate$","Species%":"$Species%$","maxCP":"$maxCP$","evoCP":"$evoCP$","Type":"$Type$","Lvl":"$Lvl$","Lucky":"$Lucky$","Egg":"$Egg$","Appraised":"$Appraised$","ATT":"$ATT$","DEF":"$DEF$","CP":"$CP$","HP":"$HP$","Tank":"$Tank$","Gender":"$Gender$","IV/Cmb":"$IV/Cmb$","IVR/Cmb":"$IVR/Cmb$","IV%Avg":"$IV%Avg$","Trade":"$Trade$","CP%":"$CP%$","Perf/IV%":"$Perf/IV%$","IV%Range":"$IV%Range$","IVPerfect":"$IVPerfect$","IV%Min":"$IV%Min$","IV%Max":"$IV%Max$","Combs":"$Combs$","AttIV":"$AttIV$","DefIV":"$DefIV$","HpIV":"$HpIV$","FaMove":"$FaMove$","SpMove":"$SpMove$","Sp2Move":"$Sp2Move$","SmMoves":"$SmMoves$","Att%":"$Att%$","AttDPS":"$AttDPS$","AttR":"$AttR$","DefR":"$DefR$","MoveTypes":"$MoveTypes$","FastType":"$FastType$","SpecialType":"$SpecialType$","Special2Type":"$Special2Type$","NrBars":"$NrBars$","NrBars2":"$NrBars2$","DuelRate":"$DuelRate$","A-FastDPS":"$A-FastDPS$","A-SpecDPS":"$A-SpecDPS$","A-
@MisinformedDNA
MisinformedDNA / MainApplication
Last active June 13, 2023 21:35
Accessing product context from order context
using ProductManager.Shared;
services.AddTransient<IGetProductsQuery, GetProductsQuery>();