This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Routing; | |
using Microsoft.AspNetCore.Routing.Template; | |
using Microsoft.AspNetCore.WebUtilities; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Logging; | |
using System; | |
using System.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var runningTasks = new ConcurrentDictionary<Task, string>(); | |
var maxDegreeOfParallelism = 5; | |
var semaphore = new SemaphoreSlim(maxDegreeOfParallelism); | |
foreach (var job in jobs) | |
{ | |
await semaphore.WaitAsync(); | |
var task = ProcessAsync(job); | |
runningTasks.TryAdd(task, ""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 18, | |
// font family with optional fallbacks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel.DataAnnotations; | |
using Microsoft.AspNetCore.Mvc; | |
using System.Linq; | |
namespace WebApplication.Controllers | |
{ | |
public class Person | |
{ | |
public string Name { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Inject this to bitbucket.org with your favourite browser extension, for example Stylish. */ | |
.omnibar-result-context, .omnibar-result-label { | |
max-width: 1170px; | |
} | |
.omnibar { | |
margin-left: -600px; | |
width: 1200px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /> | |
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" /> | |
</packageSources> | |
</configuration> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ResolveEventHandler handler = null; | |
handler = (sender, args) => | |
{ | |
// Use latest strong name & version when trying to load SDK assemblies | |
var requestedAssembly = new AssemblyName(args.Name); | |
if (requestedAssembly.Name != shortName) | |
return null; | |
Debug.WriteLine("Redirecting assembly load of " + args.Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using Couchbase.Core.Serialization; | |
using Newtonsoft.Json; | |
namespace CouchbaseContrib | |
{ | |
/// <summary> | |
/// A custom <see cref="ITypeSerializer"/> for the Couchbase .NET SDK that uses Json.NET and GZip compression for serialization. |