Skip to content

Instantly share code, notes, and snippets.

View Exifers's full-sized avatar

Emmanuel Meric de Bellefon Exifers

View GitHub Profile
@Exifers
Exifers / .tsx
Created May 13, 2024 16:10
React createStateProvider utility function
import React, {
createContext,
forwardRef,
useContext,
useMemo,
type ForwardedRef,
type ReactNode,
isValidElement,
} from "react"
import { RefUtil } from "./RefUtil.ts"
@Exifers
Exifers / cli.py
Last active April 10, 2021 10:30
A nested subparsers CLI in python
#! /usr/bin/python3
import argparse
def bake_bread():
print('baking bread')
def bake_cookies():
print('baking cookies')