Skip to content

Instantly share code, notes, and snippets.

View VictorioBerra's full-sized avatar

Victorio Berra VictorioBerra

View GitHub Profile
@VictorioBerra
VictorioBerra / index.html
Created March 15, 2024 18:22
YADCF DT2.0 Issue 680
<!-- https://github.com/vedmack/yadcf/issues/680 -->
<html>
<head>
<title>DTYADCF</title>
<link href="https://cdn.datatables.net/v/dt/jq-3.7.0/dt-2.0.2/datatables.min.css" rel="stylesheet">
<script src="https://cdn.datatables.net/v/dt/jq-3.7.0/dt-2.0.2/datatables.min.js"></script>
<style>
.hide {
{
"#info": {
"title": "Hello World 2!!!",
"updated": "Nov 24 2020"
},
"img": "this is the ![logo](img/ok.png) and this is the [link](#)",
"menu": ["[Home](#section-1) [Section 1](#section-1) [Section 2](#section-2) [Page 1](/about)"],
"title": "# Hello World 2!!!",
"subtitle": [
"_It is a long **established fact** that a reader will be distracted by the readable content of a page when looking at its layout._"
@VictorioBerra
VictorioBerra / ForwardedForKnownNetworkOptions.cs
Created January 21, 2020 20:51
ForwardedHeadersOptions from appsettings.json
public class ForwardedForKnownNetworkOptions
{
public string Prefix { get; set; }
public int PrefixLength { get; set; }
}
@VictorioBerra
VictorioBerra / MyAppAuithorizationPolicyprovider.cs
Created May 3, 2019 22:19
Custom DefaultAuthorizationPolicyProvider which can distinguish between a token with and without a subject, and then handle requirements accordingly.
//
// This is a combination of two things:
//
// A slight alteration of the implementation of DefaultAuthorizationPolicyProvider that creates a new PermissionRequirement similar to the PolicyServer's for later use with IPolicyServerRuntimeClient in a requirement handler.
// But only if theres a subject claim.
//
// A slight alteration of the ClaimsAuthorizationRequirement.
// Works identically to the default implemenation, but only if theres no subject claim.
//