Skip to content

Instantly share code, notes, and snippets.

View oleksabor's full-sized avatar

oleksii borodai oleksabor

  • Kyiv, Ukraine
View GitHub Profile
@oleksabor
oleksabor / Program.cs
Last active July 30, 2019 14:21
empty asp.net core 2.2 application created by VS2017
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
@oleksabor
oleksabor / windowsService1.cs
Created June 6, 2019 09:12
to reproduce https://github.com/dotnet/docfx/issues/4488 Requires LibLog 4.2, NLog, TopShelf, TopShelf.NLog packages. Works as console, as windowsService but fails when started as console in the azure build pipeline
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Topshelf;
using windowsService1.Logging;
@oleksabor
oleksabor / program.cs
Last active May 31, 2019 14:36
debug docfx pdf generation. Requires NLog, Topshelf.NLog, LibLog4 packages
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Topshelf;
using windowsService1.Logging;
@oleksabor
oleksabor / Startup.cs
Created May 24, 2019 14:22
sample from IdentityServer4.Samples\Quickstarts\4_ImplicitFlowAuthenticationWithExternal\src\IdentityServer\
// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
using System;
using IdentityServer4;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
@oleksabor
oleksabor / program.cs
Created April 23, 2018 07:44
Azure Vault key access sample using applicationid and secret. It is slightly modified MS sample
using Microsoft.Azure.KeyVault;
using Microsoft.Azure.KeyVault.Models;
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.Rest.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Countersoft.Gemini.Api;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
namespace GeminiConsole
{
@oleksabor
oleksabor / IndentExceptionLayoutRenderer.cs
Last active October 5, 2017 08:30
sample exception generator to test NLog exception logging
using NLog;
using NLog.LayoutRenderers;
using System;
using System.Linq;
using System.Text;
using System.Collections.Concurrent;
namespace NLogTest
{
/// <summary>