To serve as an example page when styling markdown based Gatsby sites.
Note These notes have moved here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query && | |
query | |
.split('&') | |
.map(item => item.split('=')) | |
.some(([name, value]) => { | |
console.log('checking', name, value); | |
return name === 'callback' && value === '1'; | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** https://fonts.googleapis.com/css?family=IBM+Plex+Mono:400,400i|IBM+Plex+Sans+Condensed:700|IBM+Plex+Sans:400,400i,700&display=swap&text=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890%E2%80%98?%E2%80%99%E2%80%9C!%E2%80%9D(%)[#]{@}/&\%3C-+%C3%B7%C3%97=%3E%C2%AE%C2%A9$%E2%82%AC%C2%A3%C2%A5%C2%A2:;,.* */ | |
@font-face { | |
font-family: 'IBM Plex Mono'; | |
font-style: italic; | |
font-weight: 400; | |
font-display: swap; | |
src: local('IBM Plex Mono Italic'), local('IBMPlexMono-Italic'), url(https://fonts.gstatic.com/l/font?kit=-F6pfjptAgt5VM-kVkqdyU8n1ioq131nj-onUPhF57LC54YMjPWhVoZfeuYPYxhVGisGtDFri4wiQO837A4_X48_DcqZFSrKzZnX3davc0r5EChNgAPSTyiPNK84KeOd&skey=55bf1639dd561004&v=v5) format('woff2'); | |
} | |
@font-face { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function loadAuthInstance() { | |
const load = new Promise(function(resolve, reject) { | |
gapi.load('auth2', resolve); | |
}); | |
return load.then(async () => { | |
return await window.gapi.auth2 | |
.init({ | |
client_id: 'client-id-apparently', | |
}) | |
.then(authInstance => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/typescript-cheatsheets/react-typescript-cheatsheet#context | |
import * as React from 'react'; | |
function createContext<ContextType>(defaultValue?: ContextType) { | |
const Context = React.createContext<ContextType | undefined>(defaultValue); | |
const useContext = () => { | |
const contextValue = React.useContext(Context); | |
if (!contextValue) | |
throw new Error('`useContext` must be inside a Provider with a value.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code[class*='language-'], | |
pre[class*='language-'] { | |
color: #d6deeb; | |
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; | |
text-align: left; | |
white-space: pre; | |
word-spacing: normal; | |
word-break: normal; | |
word-wrap: normal; | |
line-height: 1.5; |
- Creating More Efficient React Views with Windowing - ForwardJS San Francisco
- Getting Closure on Hooks
- Shawn Swyx Wang - Why React is not Reactive | React Rally 2018
- Joshua Comeau - Explorable Explanations with React | React Rally 2018
- Pete Hunt: React: Rethinking best practices -- JSConf EU 2013
- Thai Pangsakulyanont: Smells In React Apps - JSConf.Asia 2018
Thoughts (such a bad name)
OlderNewer