Skip to content

Instantly share code, notes, and snippets.

@thanhlmm
thanhlmm / lazyLoadHydrate.js
Last active March 9, 2022 00:09
Lazy load and lazy hydrate Nextjs component
import dynamic from 'next/dynamic';
import withHydrationOnDemand from 'react-hydration-on-demand';
export default function lazyLoadHydrate<T = Record<string, never>>(
module,
ssr = false,
loading = () => <span>Loading</span>,
) {
return withHydrationOnDemand({
on: ['visible'],
@Birdie0
Birdie0 / ifttt-webhooks-extended-guide.md
Last active March 6, 2024 13:38
How to use Discord Webhooks

⚠️ This gist is no longer updated! For maintained, improved and even more extended guide click here.


How to use Discord Webhook

It's a JSON

First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.

@richardtorres314
richardtorres314 / flexbox.scss
Last active June 30, 2024 10:10
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;