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
.backlight:after { | |
content: ""; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
position: absolute; | |
background: inherit; | |
filter: blur(20px); | |
z-index: -1; | |
} |
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 userAgent = navigator.userAgent.toLowerCase() | |
if (/kakaotalk/.test(userAgent)) { | |
location.href = | |
'kakaotalk://web/openExternal?url=' + encodeURIComponent(location.href) | |
setTimeout(() => { | |
location.href = /ipad|iphone|ipod/.test(userAgent) | |
? 'kakaoweb://closeBrowser' | |
: 'kakaotalk://inappbrowser/close' | |
}) |
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 type { Config } from "tailwindcss"; | |
import { theme } from "tailwindcss/defaultConfig"; | |
const config: Config = { | |
theme: { | |
screens: { | |
...theme?.screens, | |
xs: "375px", | |
"2xs": "320px", | |
"3xs": "280px", |
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
// Copy-paste into your console (or minify and save as a bookmarklet) to see any DOM in an almost-sorta-working 3D stack of DOM elements. | |
// The front faces are colored for debugging, if this gist can be fixed, they can return to their normal styling. | |
(function () { | |
const MAX_ROTATION = 180; | |
const DEPTH_INCREMENT = 25; | |
const PERSPECTIVE = 1000; | |
const SIDE_FACE_CLASS = 'side-face'; | |
const MAX_DOM_DEPTH = getMaxDepth(document.body); | |
// Calculate color based on depth, ensuring lighter colors for deeper elements |
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 encodingTable = { | |
"A": "퐀", "a": "퐚", "B": "퐁", "b": "퐛", "C": "퐂", "c": "퐜", "D": "퐃", "d": "퐝", | |
"E": "퐄", "e": "퐞", "F": "퐅", "f": "퐟", "G": "퐆", "g": "퐠", "H": "퐇", "h": "퐡", | |
"I": "퐈", "i": "퐢", "J": "퐉", "j": "퐣", "K": "퐊", "k": "퐤", "L": "퐋", "l": "퐥", | |
"M": "퐌", "m": "퐦", "N": "퐍", "n": "퐧", "O": "퐎", "o": "퐨", "P": "퐏", "p": "퐩", | |
"Q": "퐐", "q": "퐪", "R": "퐑", "r": "퐫", "S": "퐒", "s": "퐬", "T": "퐓", "t": "퐭", | |
"U": "퐔", "u": "퐮", "V": "퐕", "v": "퐯", "W": "퐖", "w": "퐰", "X": "퐗", "x": "퐱", | |
"Y": "퐘", "y": "퐲", "Z": "퐙", "z": "퐳" | |
}; |
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 fs from "fs"; | |
import OpenAI from "openai"; | |
const openai = new OpenAI({ | |
apiKey: "여기에 코드를 넣으시오", | |
}); | |
const prompt = `아래 주어지는 영어 JSON을 일본어로 번역해줘` | |
export const chunk = (arr, size) => { |
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 { RefObject, useEffect, useRef } from 'react' | |
export const applyMangoMotion = (iframeRef: RefObject<HTMLIFrameElement>) => { | |
if (!iframeRef.current) return | |
const iframe = iframeRef.current | |
const iframeWin = iframe.contentWindow || iframe | |
const iframeDoc = iframe.contentDocument || (iframeWin as any).document | |
const style = iframeDoc.createElement('style') |
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 puppeteer from 'puppeteer-extra'; | |
import pluginStealth from 'puppeteer-extra-plugin-stealth'; // Use v2.4.5 instead of latest | |
import * as readline from 'readline'; | |
puppeteer.use(pluginStealth()); | |
// Use '-h' arg for headful login. | |
const headless = !process.argv.includes('-h'); | |
// Prompt user for email and password. |
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 fs from "fs"; | |
import * as tokenizer from "gpt-3-encoder"; | |
import { Configuration, OpenAIApi } from "openai"; | |
import { logger } from "./utils/logger.js"; | |
import jsonl from "jsonl"; | |
import inquirer from "inquirer"; | |
import chalk from "chalk"; | |
export const loadProjectDataFromJSON = ( | |
assetPath: string |
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
interface T1 { | |
name: string; | |
email: string; | |
properties: { | |
creators: [{ | |
name: string; | |
}]; | |
color: string; | |
} | |
} |
NewerOlder