- Rule #1: should never more than 2 minutes of silence
- pass emotion by voice
- make 15 minutes blocks
- 3 blocks gives you 45 minutes
- use first 5-10 min for
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
addEventListener("fetch", (event) => { | |
const response = new Response("Hello World!", { | |
headers: { "content-type": "text/plain" }, | |
}); | |
event.respondWith(response); | |
}); |
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
import { useState, useEffect } from "react"; | |
export enum FetchStatus { | |
IDLE, | |
LOADING, | |
SUCCESS, | |
FAILURE, | |
CANCELED, | |
} |
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 sha256(message: string): Promise<string> { | |
// encode as UTF-8 | |
const msgBuffer = new TextEncoder().encode(message); | |
// hash the message | |
const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer); | |
// convert ArrayBuffer to Array | |
const hashArray = Array.from(new Uint8Array(hashBuffer)); | |
// convert bytes to hex string | |
const hashHex = hashArray.map(b => ('00' + b.toString(16)).slice(-2)).join(''); | |
return hashHex; |
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
const sleep = (ms: number): Promise<void> => | |
new Promise(resolve => setTimeout(resolve, ms)); | |
export default sleep; |
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
export const toBase64 = (file: File) => | |
new Promise((resolve, reject) => { | |
const reader = new FileReader(); | |
reader.readAsDataURL(file); | |
reader.onload = () => resolve(reader.result); | |
reader.onerror = (error) => reject(error); | |
}); |
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
import * as Koa from "koa"; | |
let koaInstance: Koa; | |
class AppInjector { | |
static injectApp() { | |
if (!koaInstance) { | |
koaInstance = new Koa(); | |
koaInstance.use(async (ctx) => { | |
ctx.body = "Hello World"; |
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
{"v":"5.6.6","fr":24,"ip":0,"op":48,"w":1080,"h":1080,"nm":"Teste","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":22,"s":[0]},{"t":27,"s":[100]}],"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.295],"y":[1.212]},"o":{"x":[0.721],"y":[-0.232]},"t":12,"s":[0]},{"t":38,"s":[720]}],"ix":10},"p":{"a":0,"k":[540.004,548.22,0],"ix":2},"a":{"a":0,"k":[-3.033,-50.04,0],"ix":1},"s":{"a":0,"k":[65.947,65.947,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":100,"ix":6},"is":{"a":0,"k":0,"ix":8},"or":{"a":0,"k":262,"ix":7},"os":{"a":0,"k":0,"ix":9},"ix":1,"nm":"Polystar Path 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0,0,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-3.03 |
- Q: Makes sense to move useEffects to hooks which you have to load data? > A: I believe so. Every time I access a duck which loads external data, I'm interested in its data, not in calling a funciton to load it.
NewerOlder