Skip to content

Instantly share code, notes, and snippets.

View mbeaudru's full-sized avatar

Manuel Beaudru mbeaudru

View GitHub Profile
@viclafouch
viclafouch / designMode.js
Last active January 25, 2024 14:21
Edit your website in live by using `document.designMode` and killing links
// Disable anchor links
window.addEventListener('click', event => event.preventDefault(), false)
// Disable click eventlisteners
window.addEventListener("click", event => event.stopPropagation(), true)
// Enable design mode
document.designMode = "on"
@gvergnaud
gvergnaud / typescript-type-variance.ts
Last active August 30, 2022 15:52
TypeScript type variance (covariance, contravariance and invariance)
/**
* We call "variance" the direction of assignability between two types
* (in other words, which type is a subtype of the other).
*
* The same type can have a different variance in function of his position
* in a larger type, and this is what makes assignability in TypeScript
* not always straightforwards.
*
* There are 4 kinds of variance:
* - Covariant: if the type `a` is assignable to `a | b`.
@antfu
antfu / doc-table.md
Last active October 14, 2023 20:09
Doc Table in Markdown

Example

Name

Description


@Geczy
Geczy / readme.md
Last active May 23, 2025 18:28
Migrate Coolify to a new server