Skip to content

Instantly share code, notes, and snippets.

View chalkpe's full-sized avatar
🏳️‍🌈

Seol Park chalkpe

🏳️‍🌈
  • Republic of Korea
View GitHub Profile
@chalkpe
chalkpe / 0001-fix-backend-include-the-ActivityPub-uri-of-local-not.patch
Created October 17, 2026 15:24
Misskey: include the ActivityPub uri of local notes in clip exports
From eeeea3c87277bf33a083552db019505b5eed9b59 Mon Sep 17 00:00:00 2001
From: Seol Park <9481405+chalkpe@users.noreply.github.com>
Date: Sun, 18 Oct 2026 00:23:05 +0900
Subject: [PATCH] fix(backend): include the ActivityPub uri of local notes in
clip exports
Local notes have a null `uri`, so clip exports recorded no resolvable
identifier for them and the notes could not be looked up from another
server. Fall back to the note's ActivityPub id (`${url}/notes/${id}`),
the same form used elsewhere for local notes.
@chalkpe
chalkpe / README.md
Created March 21, 2025 11:53
이름 궁합
import match from './name-match'
console.log([...match('고등어', '꽁치')])
[
  [ '고', '꽁', '등', '치', '어', '*' ],
  [ 4, 7, 5, 5, 3, 0 ],
 [ 1, 2, 0, 8, 3 ],
@chalkpe
chalkpe / main.ts
Last active January 24, 2025 15:17
is-odd
// example: deno run -A main.ts 52 10
import { decode } from 'https://deno.land/x/pngs@0.1.1/mod.ts'
import puppeteer from 'https://deno.land/x/puppeteer_plus@0.24.0/mod.ts'
const isOdd = async (num: number) => {
const browser = await puppeteer.launch({
defaultViewport: { width: 1024, height: 1024 },
})
try {
🇰🇷 🇺🇸
뜨겁게 불타올랐던 마음 Heart of ember, autumntide
어느새 식고 잦아들어 Cooling swiftly, bleeding light
하지만 때를 기다려 Smold'ring softly, biding time
웅크린 채 고갤 들어 Marching forward, left behind
🇰🇷 🇺🇸
꺼져가는 생명의 불꽃 Fire as shadows clash
awk -F, '{ gsub(/[" ]/, "", $2) } length($2) == 6 { print $2 }' Item.csv | uniq | sort > ffxiv-wordle.txt
@chalkpe
chalkpe / filter-best-parses.js
Last active August 5, 2021 16:15
filter best parses per job for FF Logs website
// ==UserScript==
// @name filter-best-parses
// @namespace https://gist.github.com/ChalkPE
// @version 1.0
// @description filter best parses per job for FF Logs website
// @match https://*.fflogs.com/*
// @run-at document-idle
// ==/UserScript==
(() => {
@chalkpe
chalkpe / amplify-commit-status-lambda.js
Last active July 9, 2021 13:50
Update AWS Amplify build statuses to connected GitHub repository via AWS Lambda + SNS
/**
* Required permissions:
* - GitHub PAT: `repo:status`
* - Function ARN: `amplify:GetApp`, `amplify:GetJob`
*/
const AWS = require('aws-sdk')
const { request } = require('https')
const { GITHUB_ACCESS_TOKEN } = process.env
@chalkpe
chalkpe / IPAddress.tsx
Last active May 17, 2021 10:05
React component for IP address w/ country flag emoji
import React from 'react';
import axios from 'axios';
import { countryCodeEmoji } from 'country-code-emoji';
type TextRenderer = (v: string) => React.ReactNode | string;
type SetCountry = React.Dispatch<React.SetStateAction<string>>;
type CountryEffect = (ip: string, setter: SetCountry) => void | (() => void);
interface IPAddressProps {
ip: string;
const mongoose = require('mongoose')
const User = mongoose.model('User', new mongoose.Schema({
name: String
}))
const Post = mongoose.model('Post', new mongoose.Schema({
title: String
}))
@chalkpe
chalkpe / LazyQRCode.tsx
Last active March 26, 2021 08:49
Lazy loaded version of `react-qr-code` npm package. Licensed under CC0.
import React from 'react';
import QRCode, { QRCodeProps } from 'react-qr-code';
interface LazyQRCodeProps extends QRCodeProps {
style?: React.CSSProperties;
children?: React.ReactNode;
}
export default ({ size, style, children, ...props }: LazyQRCodeProps) => {
const [loaded, setLoaded] = React.useState(false);