[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Instantly share code, notes, and snippets.

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

Sébastien Lorber slorber

🏠
Working from home
View GitHub Profile
@slorber
slorber / after.css
Created September 27, 2024 14:25
Docusaurus CSS with/without LightningCSS
:root {
--ifm-color-scheme: light;
--ifm-dark-value: 10%;
--ifm-darker-value: 15%;
--ifm-darkest-value: 30%;
--ifm-light-value: 15%;
--ifm-lighter-value: 30%;
--ifm-lightest-value: 50%;
--ifm-contrast-background-value: 90%;
--ifm-contrast-foreground-value: 70%;
@slorber
slorber / test themed image.md
Created May 25, 2022 15:55
test themed image
Shows an illustrated sun in light color mode and a moon with stars in dark color mode.
@slorber
slorber / sponsor-this-week-in-react.md
Last active August 31, 2022 17:00
Sponsor This Week In React
@slorber
slorber / generate-docs-from-js.js
Last active June 14, 2024 20:40 — forked from arinthros/generate-docs-from-js
Generate Docusaurus Docs from JSDoc
/**
* Requires jsdoc and jsdoc-to-markdown
*/
/* eslint-disable no-console */
const fs = require('fs')
const path = require('path')
const glob = require('glob')
const { execSync } = require('child_process')
const jsdoc2md = require('jsdoc-to-markdown')
@slorber
slorber / README.md
Last active January 18, 2023 09:48
React Hebdo 2020

Je teste un système de "petites annonces". Le même Gist sera utilisé sur plusieurs éditions.

Mettez un commentaire:

  • si vous recrutez
  • si vous cherchez un travail ou une mission
  • pour commenter un article
  • pour donner votre avis sur la newsletter
export const intersperse = <T>(arr: T[], separator: (n: number) => T): T[] =>
arr.flatMap(arr, (a, i) => i > 0 ? [separator(i-1), a] : [a]))
@slorber
slorber / react-navigation-tree.jsx
Last active August 13, 2022 19:17
react-navigation-tree.jsx
const App = createAppContainer(
createStack({
LoggedSwitch: createSwitch({
// When user is authenticated
LoggedIn: createStack({
// The logged in root is generally a tab or drawer navigator
LoggedInRoot: createTabsOrDrawer({
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import useConstant from 'use-constant';
import produce from 'immer';
import { useIsMountedFn } from './useIsMounted';
@slorber
slorber / ElementContainer.js
Created September 20, 2018 11:56
ElementContainer.js
import React from 'react';
const generateHolderKey = (() => {
let counter = 0;
return () => {
counter += 1;
return `holder_${counter}`;
};
})();