Skip to content

Instantly share code, notes, and snippets.

View paulbreuler's full-sized avatar
🤓
Learning something new

Paul Breuler paulbreuler

🤓
Learning something new
View GitHub Profile
@McFunkypants
McFunkypants / FlyCamera.cs
Created November 7, 2014 21:59
New Script FlyCamera add to any camera obj: instant unity editor style wasd rightclick debug cam
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@dj-nitehawk
dj-nitehawk / ApiKeyAuth.cs
Last active March 5, 2024 15:17
API Key Authentication With FastEndpoints + Swagger
sealed class ApikeyAuth(IOptionsMonitor<AuthenticationSchemeOptions> options,
ILoggerFactory logger,
UrlEncoder encoder,
IConfiguration config)
: AuthenticationHandler<AuthenticationSchemeOptions>(options, logger, encoder)
{
internal const string SchemeName = "ApiKey";
internal const string HeaderName = "x-api-key";
readonly string _apiKey = config["Auth:ApiKey"] ?? throw new InvalidOperationException("Api key not set in appsettings.json");