Skip to content

Instantly share code, notes, and snippets.

View nielsbrakel's full-sized avatar
🏠
Working from home

Niels van Brakel nielsbrakel

🏠
Working from home
View GitHub Profile
@nielsbrakel
nielsbrakel / C:\Users\{USER}\.ssh\config
Created November 29, 2021 09:58
Configure SSH credentials to use with multiple hosts on Windows
# Work
Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile C:/path/to/your/keyfile/bitbucket-key
IdentitiesOnly yes
# Personal
Host github.com
HostName github.com
@nielsbrakel
nielsbrakel / AuthenticationProvider.tsx
Last active November 25, 2021 07:47
React global provider system using context and hooks to easily manage small application state
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { createContext, useContext } from 'react'
import { useAuth } from 'GenericOAuthProvidert'
type AuthenticationContextType = {
login: () => void
logout: () => void
}
const AuthenticationContext =