Skip to content

Instantly share code, notes, and snippets.

View MisinformedDNA's full-sized avatar

Dan Friedman MisinformedDNA

View GitHub Profile
@MisinformedDNA
MisinformedDNA / MainApplication
Last active June 13, 2023 21:35
Accessing product context from order context
using ProductManager.Shared;
services.AddTransient<IGetProductsQuery, GetProductsQuery>();
@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 / 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 / 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 / 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 / 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 / walkthrough-paypal.rb
Created June 22, 2015 14:13
Spree/PayPal API Test
require_relative '../base'
module Examples
module Checkout
class Walkthrough
def self.run(client)
# Create the order step by step:
# You may also choose to start it off with some line items
# See checkout/creating_with_line_items.rb
@MisinformedDNA
MisinformedDNA / init.ps1
Created April 19, 2015 20:50
Boxstarter
# Source control
cinst -y `
git `
tortoisegit `
poshgit
# Main developement tools
cinst -y visualstudio2013professional -InstallArguments "/Features:'WebTools SQL'"
cinst -y mssqlserver2014express
cinst -y mssqlservermanagementstudio2014express
require_relative '../base'
module Examples
module Checkout
class Walkthrough
def self.run(client)
# Create the order step by step:
# You may also choose to start it off with some line items
# See checkout/creating_with_line_items.rb
@MisinformedDNA
MisinformedDNA / return.rb
Last active August 29, 2015 14:04
Returns
require_relative '../base'
module Examples
module Orders
class Importing
def self.run(client)
# Add address information the order
address = {
firstname: 'Test',