Skip to content

Instantly share code, notes, and snippets.

View jeffward01's full-sized avatar

Jeff Ward jeffward01

  • Universal Music Group
  • The Death Star
View GitHub Profile
@jeffward01
jeffward01 / IdentityHelper.cs
Created October 11, 2022 20:24 — forked from imeanitworks/IdentityHelper.cs
Helper class that I use to extract claim information from the authentication context
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading;
namespace ProjectNamespace
{
public static class IdentityHelper
{
@jeffward01
jeffward01 / Folder structure
Created January 15, 2022 08:47 — forked from mdschweda/Folder structure
Multiple projects DocFX structure
+-- doc
⁞ +-- api
⁞ ⁞ +-- ProjectA
⁞ ⁞ ⁞ +-- index.md
⁞ ⁞ +-- ProjectB
⁞ ⁞ +-- index.md
⁞ +-- docfx.json
⁞ +-- toc.yml
+-- src
+-- ProjectA
@jeffward01
jeffward01 / stylecop.json
Created June 3, 2020 08:32
This file is to customise the rule behaviour (NOT to enable/disable rules!). For example, this example changes the usingDirectivesPlacement rule to enforce that using statements should be outside the namespace (i.e. at the top of the file). This is an alternative to simply disabling the rule. Link: https://medium.com/@michaelparkerdev/linting-c-…
{
$schema: "http://json-schema.org/draft-04/schema#",
id: "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
title: "StyleCop Analyzers Configuration",
description: "Configuration file for StyleCop Analyzers",
type: "object",
properties: {
settings: {
type: "object",
description: "The top-level object containing configuration properties for built-in rules.",
@jeffward01
jeffward01 / Aeonic-StyleCop.ruleset
Last active June 3, 2020 06:18
Standard best practices for StyleCop
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="10.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
</Localization>
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1016" Action="Warning" />
0xb46b9324DE7F5A2D2d9C8298aa5A46C79Ed6d472
tmp = [
{
uniqueCode = 1234,
selected = true,
otherVal = 'abc'
},
{
uniqueCode = 5678,
selected = false,
otherVal = 'abc'
@jeffward01
jeffward01 / 0_reuse_code.js
Created March 13, 2017 18:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console