This file contains 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
public static class ResultMapper | |
{ | |
/// <summary> | |
/// A mapper to map to an IResult with potential content | |
/// </summary> | |
public static IResult MapToResult<TContent>(this IApiResponse<TContent> response) | |
{ | |
return response.StatusCode switch | |
{ | |
HttpStatusCode.OK when response.Content is not null => TypedResults.Ok(response.Content), |
This file contains 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 Asp.Versioning.ApiExplorer; | |
using Microsoft.Extensions.Options; | |
using Microsoft.OpenApi.Models; | |
using Swashbuckle.AspNetCore.SwaggerGen; | |
namespace BFF.API.Extensions.OpenApi; | |
public class ConfigureSwaggerGenOptions(IApiVersionDescriptionProvider versionProvider) : IConfigureNamedOptions<SwaggerGenOptions> | |
{ | |
public void Configure(string? name, SwaggerGenOptions options) => Configure(options); |
This file contains 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
######################################################################## | |
# RUNS ALL .cy.ts FILES IN THE cypress/e2e FOLDER IN PARALLEL | |
# ARGUMENT $1: The path to the directory containing the cypress folder | |
######################################################################## | |
baseCommand="npm run dev --" # change this if needed | |
echo "" | |
# validate argument |
This file contains 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
// ==UserScript== | |
// @name Video speed | |
// @author Dante De Ruwe | |
// @version 0.0.7 | |
// @description Let's you change the speed for all HTML5 videos with the use of the square bracket keys. | |
// @namespace http://tampermonkey.net/ | |
// @include * | |
// ==/UserScript== | |
(function () { |
This file contains 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
import { AfterViewInit, Directive, ElementRef } from '@angular/core'; | |
@Directive({ | |
selector: 'img', | |
}) | |
export class LazyDirective extends Directive implements AfterViewInit { | |
constructor(private elementRef: ElementRef<HTMLImageElement>) { | |
super(); | |
} |
This file contains 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
browserConsoleLogOptions: { | |
level: 'log', | |
format: '%b %T: %m', | |
terminal: true, | |
}, |