Skip to content

Instantly share code, notes, and snippets.

View BrunoJuchli's full-sized avatar

Bruno Juchli BrunoJuchli

View GitHub Profile
@poke
poke / NanoKestrel.cs
Created February 7, 2018 22:51
NanoKestrel: Running Kestrel in a console application with as minimum code as possible, i.e. avoiding all the WebHost stuff
using System;
using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Internal;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
@somewhatabstract
somewhatabstract / AssemblyInfo.cs
Last active July 24, 2017 04:10
Getting appveyor to do prerelease and release nuget packages based on branch versus tag builds
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle( "MyAssembly" )]
[assembly: AssemblyDescription( "" )]
[assembly: AssemblyConfiguration( "" )]
@hmemcpy
hmemcpy / undef.md
Last active November 21, 2023 16:46
Disabling Visual Studio Git Provider

Here's how to disable the package that is responsible for loading the Git source control support in Visual Studio. Use at your own risk!

  • Create a file called devenv.pkgundef and place it next to devenv.exe in you Visual Studio's Common7\IDE (you'll need elevation for this)
  • Add the following entries to the file:
[$RootKey$\Packages\{7fe30a77-37f9-4cf2-83dd-96b207028e1b}]
[$RootKey$\SourceControlProviders\{11b8e6d7-c08b-4385-b321-321078cdd1f8}]
  • Close VS if open, open a Developer command prompt, and type devenv /updateconfiguration
@marcosfreitas
marcosfreitas / search.html
Last active May 20, 2019 15:10
Autocomplete Search With Semantic UI
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Autocomplete Search With Semantic UI</title>
<link rel="stylesheet" href="semantic/dist/semantic.css">
</head>
<body>
@bradphelan
bradphelan / Exceptional.cs
Last active November 30, 2018 13:45
Exceptional Monad in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reactive.Linq;
namespace ReactiveUI.Utils
{
// From http://stackoverflow.com/questions/10772727/exception-or-either-monad-in-c-sharp
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace DynamicDispatch
{
interface IAnimalVisitor