Skip to content

Instantly share code, notes, and snippets.

@mattywong
mattywong / favicon.md
Created November 1, 2021 09:57 — forked from dodying/favicon.md
[Get Favicon] #api #favicon
  • DuckDuckGo https://icons.duckduckgo.com/ip2/{hostname}.ico
  • Google https://www.google.com/s2/favicons?domain_url={hostname}
  • Yandex https://favicon.yandex.net/favicon/{hostname1}/{hostname2}/
  • allesedv https://f1.allesedv.com/16/{hostname}
  • http://grab-favicons.herokuapp.com/api/v1/grab-favicons/?url={hostname}
  • https://besticon-demo.herokuapp.com/icon?url={hostname}&size=80..120..200
  • http://favicongrabber.com/service-api-reference
@mattywong
mattywong / react-focusin-focusout-blur.md
Created August 27, 2020 04:09
React focusIn focusOut/onBlur/onFocus parent
@mattywong
mattywong / thoughts-about-folder-structure.md
Last active August 18, 2020 14:08
thoughts-about-folder-structure.md

Thoughts about folder structure for React applications

There should be 2 main folders for your components.

/components /pages

Let me explain

A lot of the time you'll be using react-router. Thinking in routes is much easier to remember than seeing multiple components of similar names.

@mattywong
mattywong / generic-keyinkeyof.ts
Last active March 25, 2023 15:42
Typescript snippets #snippets #typescript
interface AppState {
gender: Gender | null;
age: number | null;
height: number | null;
weight: number | null;
shouldSendResult: boolean;
currentStep: number;
}