Skip to content

Instantly share code, notes, and snippets.

View remy90's full-sized avatar

Remy remy90

View GitHub Profile
@remy90
remy90 / Page.ts
Last active May 18, 2023 10:37
Basic Repro
import type { Block } from 'payload/types'
import { getRichTextField, pageFields } from '@/blocks/PageType'
import { questionFields, questionText } from '@/blocks/Questions'
import { basicQuestionAnswerTypes } from '@/blocks/Questions/Basic'
import { blockFields } from '@/fields/blockFields'
import ConditionField from '@/fields/ConditionField'
export const StandardPage: Block = {
slug: 'standardPage',
@remy90
remy90 / service-workers.md
Created December 23, 2022 15:14 — forked from Rich-Harris/service-workers.md
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@remy90
remy90 / TemporalDateAdapter.txt
Last active March 27, 2024 15:11
WIP: Temporal date adapter implementation of MuiPickersAdapter<TDate>
import { DateIOFormats, Unit } from '@date-io/core/IUtils';
import { MuiPickersAdapter } from '@mui/lab';
import { Temporal, Intl } from '@js-temporal/polyfill';
interface Opts {
locale?: string;
formats?: Partial<DateIOFormats>;
}