Skip to content

Instantly share code, notes, and snippets.

View scott1028's full-sized avatar
🏠
Working from home

scott1028

🏠
Working from home
View GitHub Profile
@scott1028
scott1028 / dom_performance_reflow_repaint.md
Created June 14, 2023 02:15 — forked from faressoft/dom_performance_reflow_repaint.md
DOM Performance (Reflow & Repaint) (Summary)

DOM Performance

Rendering

  • How the browser renders the document
    • Receives the data (bytes) from the server.
    • Parses and converts into tokens (<, TagName, Attribute, AttributeValue, >).
    • Turns tokens into nodes.
    • Turns nodes into the DOM tree.
  • Builds CSSOM tree from the css rules.
@scott1028
scott1028 / getRemoteFilesByFtp.js
Last active March 24, 2024 15:55
getRemoteFilesByFtp.js
const fs = require('fs');
// https://github.com/mscdex/node-ftp
const ftp = require('ftp');
/**
* fishing rod(chatGPT): https://chat.openai.com/share/f45faeb4-13a1-4221-b98f-9a1428d694a4
*/
// Configuration for the FTP server
const ftpConfig = {