Skip to content

Instantly share code, notes, and snippets.

Dave Glick daveaglick

Block or report user

Report or block daveaglick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View abomination.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace DocumentQuery
View feedly.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Dave subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Development" title="Development">
<outline type="rss" text="Scott Hanselman" title="Scott Hanselman" xmlUrl="http://feeds.feedburner.com/ScottHanselman" htmlUrl="https://www.hanselman.com/blog/"/>
<outline type="rss" text="Cetus" title="Cetus" xmlUrl="https://feeds.feedburner.com/cetus/fVRw" htmlUrl="https://cetus.io/"/>
@daveaglick
daveaglick / changeconfig.cs
Created Aug 22, 2017
Change config file at runtime
View changeconfig.cs
// Set app.config - http://stackoverflow.com/a/6151688/807064
AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", @"C:\new.config");
typeof(ConfigurationManager)
.GetField("s_initState", BindingFlags.NonPublic | BindingFlags.Static)
.SetValue(null, 0);
typeof(ConfigurationManager)
.GetField("s_configSystem", BindingFlags.NonPublic | BindingFlags.Static)
.SetValue(null, null);
typeof(ConfigurationManager).Assembly.GetTypes()
.Where(x => x.FullName == "System.Configuration.ClientConfigPaths")
@daveaglick
daveaglick / refextensions.cs
Created Aug 16, 2017
An example use case of ref extensions for immutable objects
View refextensions.cs
using System;
public class Program
{
public void Main()
{
Foo foo = new Foo();
// Update with method chaining
// and self assignment,
View keybase.md

Keybase proof

I hereby claim:

  • I am daveaglick on github.
  • I am daveaglick (https://keybase.io/daveaglick) on keybase.
  • I have a public key whose fingerprint is 20E2 FB65 377E D104 FD1C CE61 E0DE 5630 92FE 2979

To claim this, I am signing this object:

You can’t perform that action at this time.