Skip to content

Instantly share code, notes, and snippets.

View usagizmo's full-sized avatar

usagizmo

View GitHub Profile
@hiroppy
hiroppy / chat.mjs
Last active March 4, 2023 12:07
communicating with chatGPT
import * as readline from 'node:readline/promises';
import { stdin as input, stdout as output } from 'node:process';
const token = "your-token";
const messages = [];
const rl = readline.createInterface({ input, output });
rl.prompt();
rl.on('line', async (line) => {
@paulirish
paulirish / what-forces-layout.md
Last active May 6, 2024 07:54
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@exoego
exoego / 転職先に訊きたいチェックリスト.md
Last active April 16, 2023 03:57
転職活動してて訊きたいことのメモ

制度

  • 有休…
  • 病休…
  • 育休…
  • 年収(月給、賞与など)…
  • 残業代…
  • 早朝/深夜手当…
  • 休出手当…
  • 住宅補助…