Skip to content

Instantly share code, notes, and snippets.

View composite's full-sized avatar
🤡
This is the face. 이것은 면상이다.

Ukjin Yang composite

🤡
This is the face. 이것은 면상이다.
View GitHub Profile
@composite
composite / jumin.js
Last active March 9, 2026 04:02
주민등록번호 생성기 (주민번호 로직 들어가는 양식 테스트용. 개발 외 목적 사용 금지, 이 프로그램 사용에 대한 법적 책임 일체 없음.)
/**
* 주민번호 생성기
* 사용예) jumin()
* jumin({year:1990, month:3, day: 12, loop: 10}); //1990년 3월 12일생 10개 주민번호 생성.
* 확인예) jumin.verify(확인할 주민번호) 확인할 주민번호는 - 있어도 없어도 무관. 13자리만 맞추면 됨.
* @param {object} options 옵션
* year: 년도, 빈 값으면 랜덤
* month: 월, 빈 값이면 랜덤
* day: 일, 빈 값이면 랜덤
* loop: 생성개수, 빈 값이면 1개 생성.
@composite
composite / README.md
Created February 20, 2026 07:16
Grab all videos bookmarklet

Grab all videos URL Bookmarklet

Source

[...new Set(Array.from(document.querySelectorAll('video,source')).map(s=>s.src))].forEach((s,i)=>s&&prompt(`Video ${i+1} URL (Copy to clipboard yourself):`,s))

Add to bookmark yourself

@composite
composite / bitvistsshclientservice.bat
Last active February 11, 2026 04:24
Bitvise SSH Client as a Windows service with NSSM example.
@REM How to use before run this batch: You need Bitvise SSH Client and NSSM. if you haven't, google it and download and install.
@REM 1. open bitvise SSG Client
@REM 2. click "New Profile" to save profile.
@REM 3. configure SSH infomation, tunnels, etc.
@REM 4. click "Save Profile" to save profile.
@REM 5. on "sensitive" dialog popup, check "any account on this computer" or below to service account can connect it.
@REM 6. click "Login" to connect and test SSH Connection.
@REM 7. click "Accept & Save" if you see host key dialog popup.
@REM 8. Click "host key manager"
@REM 9. select your SSH host and click "Export". then click "Bitvise format" and save host key file.
@composite
composite / use-clock.test.ts
Created January 20, 2026 01:25
useClock* - fires every, even of your time react hook, no dependencies required other than react, requires react 18 or later. AI Generated. MIT License.
import { useEffect, act } from 'react';
import { createRoot } from 'react-dom/client';
import { afterEach, describe, expect, it, vi } from 'vitest';
interface TestClockProps {
target?: number | number[];
onChange: (value: Date) => void;
}
type UseClockSecond = (target?: number | number[]) => Date;
@composite
composite / hono-vite-node-server-build-plugin.ts
Created January 8, 2026 12:42
Hono + Vite server with graceful scheduler start and stop integration
import type { Plugin } from 'vite';
import type { NodeBuildOptions } from '@hono/vite-build/node';
import buildPlugin from '@hono/vite-build';
const nodeBuildPlugin = (pluginOptions?: NodeBuildOptions): Plugin => {
const port = pluginOptions?.port ?? 3000;
return {
...buildPlugin({
...{
entryContentBeforeHooks: [
@composite
composite / README.md
Last active January 8, 2026 11:49
A Vite plugin that directory and flat based router for React Router (Next.js style)

Vite Data Route plugin for ReactRouter v7

A powerful file-based routing plugin for React Router v7 that enables automatic route generation based on your file system structure, with full support for layouts, loaders, actions, and error boundaries.

Requirements

  • react-router 7.0.0 or higher
  • vite 6.0.0 or higher
  • glob package (dev dependency)
@composite
composite / bree.child.ts
Created January 8, 2026 11:45
node.js `Worker` with `.ts` in dev, real life usage with Bree, `?modulePath` plugin for Vite and howto... you can make all for one!
import { parentPort } from 'node:worker_threads';
const heavyTask = (): string => {
return "Task Completed in TypeScript! and it also works after built Javascript!";
};
parentPort?.postMessage(heavyTask());
@composite
composite / border-image-source.css
Last active December 17, 2025 14:08
Achieve border Gradation with border-image-source for tailwindcss 4, see live at https://play.tailwindcss.com/ecO7qn5v8C
@import "tailwindcss";
/* ============================================
Border Gradient Utilities for Tailwind CSS 4
============================================ */
/* 1. Linear Gradients - 8 Directions */
@utility border-linear-to-t {
--tw-border-gradient-position: to top;
border-image-source: linear-gradient(var(--tw-border-gradient-position), var(--tw-border-gradient-stops));
@composite
composite / grok3.sh
Created February 27, 2025 13:44
Grok3 API request with curl - UNOFFICIAL! Use at your own risk.
curl --location --request POST 'https://grok.com/rest/app-chat/conversations/new' \
--header 'accept: */*' \
--header 'accept-language: en-GB,en;q=0.9' \
--header 'content-type: application/json' \
--header 'origin: https://grok.com' \
--header 'priority: u=1, i' \
--header 'referer: https://grok.com/' \
--header 'sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Brave";v="126"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
@composite
composite / OneDialog.tsx
Last active November 11, 2025 01:00 — forked from alexanderson1993/AlertDialogProvider.tsx
A multi-purpose alert/confirm/prompt replacement built with shadcn/ui AlertDialog components. No Context, SSR friendly, Also works on Next.js and Remix, requires React 18 or later.
'use client';
import {
AlertDialog,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from '@/components/ui/alert-dialog';