Skip to content

Instantly share code, notes, and snippets.

View guardrex's full-sized avatar

Luke Latham guardrex

  • Aquent @ Microsoft
View GitHub Profile
@guardrex
guardrex / Program.cs
Last active May 25, 2017 22:50
Remove uids from metadata docs (Script 1)
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using static System.IO.SearchOption;
namespace RemoveDuplicateUids
{
class Program
@guardrex
guardrex / Program.cs
Last active May 25, 2017 22:50
Remove uids from metadata docs (Script 2)
using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using static System.IO.SearchOption;
namespace RemoveDuplicateUids
{
class Program
{
@guardrex
guardrex / Program.cs
Last active May 29, 2017 15:24
Manually updating code blocks without lang idents.
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using static System.IO.SearchOption;
namespace AddLanguageIdentifiers
{
class Program
@guardrex
guardrex / nutjob-webhostbuilder-pattern.cs
Last active September 2, 2017 15:03
My "NUTJOB" WebHostBuilder Pattern
/*
The purpose of this pattern is to consolidate all application
configuration into just ONE file and configure the app based
on the server/dev environment where it finds itself. It removes
the need for environment variables and/or JSON config files on
individual machines.
*/
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
@guardrex
guardrex / tasks.json
Last active April 29, 2019 10:54
VS Code Tasks file to work with dotnet cli
{
"version": "0.1.0",
"command": "cmd",
"isShellCommand": true,
"showOutput": "silent",
"args": [
"/c"
],
"tasks": [
{