$ git remote add upstream git@github.com:main-repo.git
$ git fetch upstream
$ git branch --set-upstream-to=upstream/master master
First of all, however trashy this year has been, time flies and it's 75% done.
Starting mid year this year, a very subconscious resolution started to recur, that is to pick up playing a classical string instrument again. I need to use the term string instrument because from the violin that I used to play throughout my school years, I have switched to the viola. It could be "beginners luck" but as far as the multi instruments I've been through, it feels like a string instrument of the right size for me.
As a not-so-diligent kid learning the violin, I paid zero effort into discovering anything beyond what was in front of my face. Mozart was a violin composer who composed minuet, Beethoven was a violin composer who composed a different minuet, Bach was a violin composer who composed minuet and gavotte. I'd done all the stupid things a violin 熊孩子 (Chinese slang, means an annoying kid, in particular in a not-so-smart way) would have done but I was not really ready to keep playing. Before leaving for college my
- 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)
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; |
// 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.'); |
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 => { |
/** 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 { |
query && | |
query | |
.split('&') | |
.map(item => item.split('=')) | |
.some(([name, value]) => { | |
console.log('checking', name, value); | |
return name === 'callback' && value === '1'; | |
}) |
Note These notes have moved here