Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Alexader Lvovich alexlvovich

🎯
Focusing
View GitHub Profile
View gist:4e885ac263bdb14b290078dd5f2be201
private static Random random = new Random();
public static string RandomString(int length)
{
    const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
    return new string(Enumerable.Repeat(chars, length)
      .Select(s => s[random.Next(s.Length)]).ToArray());
}
View LocalApi.sql
DECLARE @ApiResourceId INT;
DECLARE @ClientId INT = 6; -- here is your client api which will use local api
-- add api resource for your local api
INSERT [dbo].[ApiResources] ([Enabled], [Name], [DisplayName], [Created], [NonEditable])
VALUES (1, 'apiAuth', 'Auth API', GETDATE(), 0)
SET @ApiResourceId = SCOPE_IDENTITY()
-- insert api scope
View HttpRequestHeaderNames.cs
/// <summary>
/// Mostly Taken from https://docs.microsoft.com/en-us/dotnet/api/system.net.httprequestheader and wikipedia
/// </summary>
public static class HttpRequestHeaderNames
{
/// <summary>
/// The Accept header, which specifies the MIME types that are acceptable for the response.
/// </summary>
public static string Accept => "Accept";
@alexlvovich
alexlvovich / hldnew.md
Last active Nov 30, 2018
High Level Design For New Project Template
View hldnew.md

Introduction

Purpose/Audience

Goals and Objectives

Solution overview

System Architecture

Solution Architecture

Service Architecture

Frontend Architecture

Information Architecture

Technology Architecture