Skip to content

Instantly share code, notes, and snippets.

View CreatiCoding's full-sized avatar
❤️
Maybe busy by something

정석호 CreatiCoding

❤️
Maybe busy by something
View GitHub Profile
@CreatiCoding
CreatiCoding / gist:54ab26b0c2f996e0557c1c0983310d80
Created May 12, 2025 17:53
HTML 대표적인 부모–자식 허용/금지 규칙
부모 요소 허용 자식 금지 자식
<p> 퍼징 콘텐츠 (텍스트, <span>, <a>, <em> 등) 블록 레벨/플로우 콘텐츠(예: <div>, <section>, <ul> 등)
<ul>/<ol> 직접적으로 <li> <div>, <p>, <span>
<li> 플로우 콘텐츠 (블록+퍼징) 없음 (사실상 거의 모든 흐름 콘텐츠 허용)
<dl> <dt>, <dd> 기타 모든 태그
<table> 선택적 <caption>, 0+<colgroup>, 0+<thead>/<tbody>/<tfoot> 순서 유지 <div>, `

@CreatiCoding
CreatiCoding / scripts.sh
Created May 3, 2025 15:31
open react-hook-form ko docs
open https://react-ko-form.netlify.app/
@CreatiCoding
CreatiCoding / cli.sh
Last active May 3, 2025 15:31
cli.sh
#!/usr/bin/env bash
# macOS인지 확인
if [[ "$OSTYPE" != "darwin"* ]]; then
echo "이 스크립트는 macOS에서만 실행됩니다."
exit 1
fi
# wget 설치 여부 확인
if ! command -v wget >/dev/null 2>&1; then
ssh-keygen -t rsa -b 4096 -C "$1" -f ~/.ssh/id_rsa-$(echo "$1" | sed 's/@.*//')
#!/usr/bin/env bash
echo "Hello World!"
import rehypeStringify from "rehype-stringify";
import remarkParse from "remark-parse";
import remarkRehype from "remark-rehype";
import remarkGfm from "remark-gfm";
import unified, { ProcessorSettings, Settings } from "unified";
import type { NextApiRequest, NextApiResponse } from "next";
// case 1 curl -XPOST "http://localhost:3000/api/markdown/render" -d '{ "markdown": "#test\n##test\n\n| ![](https://divopsor.github.io/blog-images/2024/05/18/the-best-welfare-is-colleagues-2-present-1.jpg) | ![](https://divopsor.github.io/blog-images/2024/05/18/the-best-welfare-is-colleagues-2-present-2.jpg) |\n| --- | --- |\n| ![](https://divopsor.github.io/blog-images/2024/05/18/the-best-welfare-is-colleagues-2-present-3.jpg) | ![](https://divopsor.github.io/blog-images/2024/05/18/the-best-welfare-is-colleagues-2.jpg) |\n" }' -H "Content-Type: application/json" | jq
// case 2 curl -XPOST "http://localhost:3000/api/markdown/render" -d '{ "markdown": "test![width=100% test](https://asd.com)" }' -H "Content-Type: applicatio
@CreatiCoding
CreatiCoding / getCalendarEvents.ts
Created August 31, 2024 07:26
Google Calendar List API w/Node.js SDK
import * as calendar from "@googleapis/calendar";
import { format, subDays, addDays, toDate } from "date-fns";
const auth = new calendar.auth.GoogleAuth({
credentials: {
client_email: process.env.GOOGLE_CLIENT_EMAIL,
private_key: process.env.GOOGLE_PRIVATE_KEY
},
scopes: ["https://www.googleapis.com/auth/calendar.readonly"],
});
@CreatiCoding
CreatiCoding / is-js-in.sh
Created March 13, 2023 14:28
is-js-in.sh
if [[ $(node -p "true") == "true" ]]; then
echo "it is true!"
fi
@CreatiCoding
CreatiCoding / skip.sh
Created October 17, 2022 11:41
package'scripts: command 없으면 실행하지 않기
{ command -v || exit 0; } && command something
@CreatiCoding
CreatiCoding / remove-workflow-job.js
Created October 1, 2022 16:03
github action 마지막 workflow 자동으로 지우기
setTimeout(() => [...document.querySelectorAll('.timeline-comment-action.btn-link')].pop().click(), 0);
setTimeout(() => [...document.querySelectorAll('.details-overlay.details-overlay-dark.details-reset > summary')].pop().click(), 500);
setTimeout(() => document.querySelector('.btn-danger.btn.btn-block').click(), 1000);