Skip to content

Instantly share code, notes, and snippets.

@JDMathew
JDMathew / readme-template.md
Created May 14, 2020 12:26 — forked from martensonbj/readme-template.md
Personal project README template

Project Name & Pitch

Example:

TweetWorld

An application used to filter data form Twitter based on user preference, built with React, Redux, JavaScript, and CSS.

Project Status

(only necessary if incomplete)

@JDMathew
JDMathew / utilityTypes.ts
Created September 13, 2022 10:45
utility types
export type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
export type $Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
export type $RemoveChildren<T extends React.ComponentType> = $Omit<
React.ComponentPropsWithoutRef<T>,
'children'
>;
export type WithPartial<T, K extends keyof T> = Omit<T, K> &
Partial<Pick<T, K>>;
@JDMathew
JDMathew / diagrams.md
Created August 17, 2023 01:11 — forked from blackcater/diagrams.md
Markdown Diagrams

Diagrams

Markdown Preview Enhanced supports rendering flow charts, sequence diagrams, mermaid, PlantUML, WaveDrom, GraphViz, Vega & Vega-lite, Ditaa diagrams. You can also render TikZ, Python Matplotlib, Plotly and all sorts of other graphs and diagrams by using Code Chunk.

Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.

Flow Charts

This feature is powered by flowchart.js.

@JDMathew
JDMathew / gist:b803a3263a4911c4538c8c98d054a277
Created August 22, 2023 00:25
reanimated useAnimatedProps typescript type bug reproduction for pointerEvents
import * as React from 'react';
import Animated from 'react-native-reanimated';
const Component ({scrollY}: {scrollY: Animated.SharedValue<number>}) => {
const headerProps = useAnimatedProps(
() => ({
pointerEvents:
scrollY.value < APPEARANCE_OFFSET
? 'none'
: 'auto',