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
yarn dlx -p @angular/cli ng new $@ |
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.Reflection; | |
using ProtoBuf; | |
using ProtoBuf.Meta; | |
/// <summary> | |
/// Property attribute for including base class members in derived class messages without using "oneof" | |
/// for polymorphism. Can be removed once https://github.com/protobuf-net/protobuf-net/issues/916 is implemented. | |
/// </summary> | |
[AttributeUsage(AttributeTargets.Property)] // | AttributeTargets.Field)] | |
public class InheritedProtoMemberAttribute : ProtoMemberAttribute |
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
export declare interface Type<T> extends Function { | |
new (...args: any[]): T; | |
} | |
function preventSubclassing<T>(constructor: Type<T>): Type<T> { | |
const newCtor = function (...args: any[]): T { | |
if (new.target.prototype !== constructor.prototype) { | |
throw new TypeError(`${constructor.name} cannot be subclassed`); | |
} | |
return new constructor(args); |
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
#!/bin/bash | |
# Bash script to install latest ASP.NET Core 3.0 Preview 5 SDK | |
# This script is needed since the SDK builds don't seem to include .deb files hosted in any apt repos. | |
DOTNET_SDK_URL="https://download.visualstudio.microsoft.com/download/pr/7e4b403c-34b3-4b3e-807c-d064a7857fe8/95c738f08e163f27867e38c602a433a1/dotnet-sdk-3.0.100-preview5-011568-linux-x64.tar.gz" | |
# Must match the directory under /usr/share/dotnet/sdk/$ASPNETCORE_VER | |
ASPNETCORE_VER="3.0.100-preview5-011568" | |
DOTNET_PACKAGE_FILE="/tmp/aspnetcore-sdk-3.0.0-preview5.tar.gz" |
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
/** Log severity options */ | |
export class Severity { | |
static readonly Off = new Severity(0, 'off'); | |
static readonly Debug = new Severity(1, 'debug'); | |
static readonly Verbose = new Severity(2, 'verbose'); | |
static readonly Info = new Severity(3, 'info'); | |
static readonly Warn = new Severity(4, 'warn'); | |
static readonly Error = new Severity(5, 'error'); | |
static readonly Severe = new Severity(6, 'severe'); |