Skip to content

Instantly share code, notes, and snippets.


Patrick Schadler DonkeyKongJr

Block or report user

Report or block DonkeyKongJr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
DonkeyKongJr / child.component.html
Created Aug 23, 2018
Angular Property Binding - Child Component
View child.component.html
<p>Parent Input is: {{parentInput}} </p>
<label >Child Component Input: </label>
<input type="text" [ngModel]="childTextValue" (ngModelChange)="updateOutput($event)">
View parent.component.html
<div style="text-align:center">
Welcome to {{ title }}!
<label >Parent Component Input: </label>
<input type="text" [(ngModel)]="textInput">
<p>Child Value is: {{childValue}}</p>
<app-child [parentInput]="textInput" (childOutput)="updatedChildValue($event)"></app-child>
View HtmlRetrieverTest.cs
using System;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using FluentAssertions;
using LinkReader.Installer;
using LinkReader.Reader;
using LinkReader.Retriever;
using LinkReader.Retriever.Interfaces;
DonkeyKongJr / JsonExceptionMiddleware.cs
Created Aug 30, 2018
JsonExceptionMiddleware Handler for dotnet core
View JsonExceptionMiddleware.cs
namespace MyApp.Services.Handler
public class JsonExceptionMiddleware
private readonly IHostingEnvironment _environment;
private const string DefaultErrorMessage = "A server error occurred.";
public JsonExceptionMiddleware(IHostingEnvironment environment)
_environment = environment;
View Authentication.ConfigureServices.cs
public void ConfigureServices(IServiceCollection services)
   // Add authentication services
   services.AddAuthentication(options => {
       options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
       options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
       options.DefaultChallengeScheme = CookieAuthenticationDefaults.AuthenticationScheme;
   .AddOpenIdConnect("Auth0", options => {
View Authentication.Configure.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
View Authentication.Login.cs
public IActionResult Login(string returnUrl =/”)
await HttpContext.ChallengeAsync(“Auth0”, new AuthenticationProperties() { RedirectUri = returnUrl });
View Authentication.Logout.cs
public async Task Logout()
await HttpContext.SignOutAsync("Auth0", new AuthenticationProperties
RedirectUri = ""
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
You can’t perform that action at this time.