Skip to content

Instantly share code, notes, and snippets.

View benjaminvanrenterghem's full-sized avatar
🟢

Benjamin Van Renterghem benjaminvanrenterghem

🟢
View GitHub Profile

h1 Heading 8-)

h2 Heading

h3 Heading

h4 Heading

h5 Heading
h6 Heading

Alternatively, for H1 and H2, an underline-ish style:

Alt-H1

@benjaminvanrenterghem
benjaminvanrenterghem / README.md
Created January 7, 2024 21:13 — forked from nswamy14/README.md
ClusterPurityVisualizer

Cluster Purity Visualizer

Used to visualize the purity of a cluster. Every circle represents a cluster, each cluster will have n-number of class elements. If a cluster has only single class elements, then its a pure cluster.

Analyzed based on verying length or varying angle. Click on a circle to view and also legend interaction is enabled.

By Default clusters will be sorted in decreasing order.

@benjaminvanrenterghem
benjaminvanrenterghem / private_fork.md
Created December 4, 2023 14:41 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@benjaminvanrenterghem
benjaminvanrenterghem / dropped_nodes_schema.json
Last active November 26, 2023 18:21
construct0_article01
[
{
"commit_hash": "",
"percentage_of_influence": 0.00,
"processing_order": [
"slice_identifier_01",
"..."
],
"slices": [
{
public class RevalidatingAuthenticationStateProvider : AuthenticationStateProvider, IDisposable
{
private static TimeSpan RefreshInterval = TimeSpan.FromMinutes(30);
private readonly CancellationTokenSource _cts;
private ClaimsPrincipal _currentUser;
public RevalidatingAuthenticationStateProvider(SignInManager<IdentityUser> signInManager)
{
_cts = new CancellationTokenSource();
@benjaminvanrenterghem
benjaminvanrenterghem / nodejs-sample.js
Created January 24, 2023 12:12 — forked from jasonk000/nodejs-sample.js
Using x.509 certs with JWS/JWT/JWK
#!/usr/bin/env node
import fs from 'fs'
import jose from 'node-jose'
import pem from 'pem'
async function run () {
try {
// keystore to stick our node-jose keys before we do signing
let keystore = jose.JWK.createKeyStore()
@benjaminvanrenterghem
benjaminvanrenterghem / Sync_Repositories
Created September 21, 2022 07:08
Replace capitals
cd D:/Cronjobs
D:
robocopy SOURCE_FOLDER_HERE TARGET_FOLDER_HERE /E /COPYALL /IS /IT /IM /LOG:robocopy.log /XD SOURCE_FOLDER_HERE\.git
cd TARGET_FOLDER_HERE
git add --all
git commit -am "Autosync"
// #1 Middels dependency injection wordt een IMediator instantie voorzien
public UserController(IMediator mediator) {
_mediator = mediator;
}
[HttpPost("register")]
[Authorize(ApiConfig.AuthorizedFor_Public)]
// #1 We maken gebruik van een request dto voor ontvangst van data
public async Task<ActionResult> RegisterUser(UserRequestDTO userRequestDTO) {
try {
// #2 Middels de dependency injected Mediator maken we gebruik van een bestaande IRequest, CreateUserCommand
// Deze versturen we op de Pipeline waarna het verzoek afgehandeld wordt.
var res = await _mediator.Send(
@benjaminvanrenterghem
benjaminvanrenterghem / ServiceCollectionExtensions_Snippet.cs
Last active September 17, 2022 00:25
ServiceCollectionExtensions snippet 1
// [i] Bestand terug te vinden onder project: Logic.Extensions.ServiceCollectionExtensions.AddMediation
public static void AddMediation(this IServiceCollection services) {
// #1 Mediatr registreren
services.AddMediatR(Assembly.GetExecutingAssembly());
// #2 We wensen als eerste PipelineBehavior de logging
services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingBehavior<,>));
services.AddValidatorsFromAssembly(Assembly.GetExecutingAssembly(), ServiceLifetime.Scoped);