Skip to content

Instantly share code, notes, and snippets.

@tebeco
tebeco / HostedService.cs
Created July 17, 2017 13:19 — forked from davidfowl/HostedService.cs
A base class that allows writing a long running background task in ASP.NET Core 2.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
namespace WebApplication24
{
public abstract class HostedService : IHostedService
@tebeco
tebeco / pipes.cs
Created July 17, 2017 13:19 — forked from davidfowl/pipes.cs
Pipe sample
using System;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Server.Kestrel.Internal.System.IO.Pipelines;
namespace WebApplication19
{
public class Program
{
public static async Task Main(string[] args)
@tebeco
tebeco / gist:d41a95bc75d8b87299abb80bc4eeb0f7
Created August 2, 2017 21:18 — forked from raffaeler/gist:f8cf7c87ff9cd8e48c2b608b95b7cff4
Draft for Assembly Loading in a mixed netstandard/netcore environment
// Read additional notes at the end of the file
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Reflection.Metadata;
using System.Diagnostics;
#if NET462
#endif
@tebeco
tebeco / RawConversation_NoLayout.txt
Created August 17, 2017 09:39
David Fowler AuthN
jeffpapp [8:13 AM]
Yeah, I’d be interested in that. Just haven’t had to look at monitors in a year or so
damccull [8:13 AM]
Ah hah...I was using DefaultAuthenticationScheme when apparently I should be using DefaultScheme.
[8:14]
yep
@tebeco
tebeco / app-offline.htm
Created February 9, 2018 10:59
app-offline.htm
<!doctype html>
<html>
<style>
body {
background: white
}
section {
background: black;
color: white;
@tebeco
tebeco / introrx.md
Created February 17, 2018 08:02 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@tebeco
tebeco / WindowsOnlyFactAttribute.cs
Created June 26, 2018 21:29
WindowsOnlyFactAttribute
public sealed class WindowsOnlyFactAttribute : FactAttribute
{
public WindowsOnlyFactAttribute()
{
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
this.Skip = "This test requires Windows to run";
}
}
}
@tebeco
tebeco / Foobar.csproj
Created September 1, 2018 13:25
Enable User-secrets in Vs2017 without editing code or .gitignore or whatever
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<UserSecretsId>Foobar</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<Content Include="$(AppData)\Microsoft\UserSecrets\$(UserSecretsId)\secrets.json" Link="secrets.json" />
</ItemGroup>
@tebeco
tebeco / program.cs
Last active May 15, 2019 16:00
coincoin
using Microsoft.AspNetCore.SignalR.Client;
using System;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
public static async Task Main()
{