Skip to content

Instantly share code, notes, and snippets.

@brightchul
brightchul / chatsSlice.ts
Created December 6, 2022 07:30 — forked from markerikson/chatsSlice.ts
Nested `createEntityAdapter` example
// Example of using multiple / nested `createEntityAdapter` calls within a single Redux Toolkit slice
interface Message {
id: string;
roomId: string;
text: string;
timestamp: string;
username: string;
}
@brightchul
brightchul / gist:aad7e7c6aa8a9f67397adfda518a7714
Created May 4, 2022 14:58 — forked from subicura/gist:8329759
유명 서비스들의 API Response 분석
@brightchul
brightchul / gen.js
Created February 22, 2022 07:14 — forked from cgiosy/gen.js
const fs = require('fs');
const filenum = 30; // or 100
const lines = 2000000; // or 1000000
const errors = 100000;
const ratio = lines / errors | 0;
const count = lines / ratio | 0;
for (let i = 1; i <= filenum; i += 1) {