Skip to content

Instantly share code, notes, and snippets.

View hyunbinseo's full-sized avatar

Hyunbin Seo hyunbinseo

View GitHub Profile
@hyunbinseo
hyunbinseo / eleventy-upgrade-help.log
Created February 10, 2023 12:33
11ty upgrade helper log
[@11ty/eleventy-upgrade-help] ---
[@11ty/eleventy-upgrade-help] This plugin will help you migrate from 1.0 to 2.0.
[@11ty/eleventy-upgrade-help] If you are migrating from 0.x, downgrade to the 1.0 version of this plugin!
[@11ty/eleventy-upgrade-help] ---
[@11ty/eleventy-upgrade-help] PASSED This project is not using the previously deprecated and disabled by default `dataTemplateEngine` configuration property. Read more at https://www.11ty.dev/docs/data-preprocessing/
[@11ty/eleventy-upgrade-help] PASSED This project is not using the `--passthroughall` command line flag. Read more at https://www.11ty.dev/docs/copy/#passthrough-everything
[@11ty/eleventy-upgrade-help] NOTICE The `liquidjs` dependency was updated from 9.x to 10.x. This should not require action, but you can read the full release notes: https://github.com/harttle/liquidjs/releases/tag/v10.0.0
[@11ty/eleventy-upgrade-help] NOTICE Markdown’s indented code blocks have been disabled by default in 2.0. Unfortunately, this plugin does *NOT* currently t
@hyunbinseo
hyunbinseo / footnote.md
Created February 18, 2023 10:03
Alphabet footnotes converted to linear numeric footer

그들의 피고, 황금시대를 목숨을 것이다.1

얼마나 그들에게 대한 군영과 것이다.2

Footnotes

  1. 보라, 대고, 용감하고 가지에 옷을 힘있다.

  2. 보라, 보이는 노년에게서 못할 청춘은 아니다.

@hyunbinseo
hyunbinseo / ssh.bash
Last active May 5, 2025 18:25
Setup SSH (macOS, YubiKey FIDO)
# Moved to https://github.com/hyunbinseo/blog/blob/master/posts/setup-ssh.md
### Preparation ###############################################################
# macOS bundled OpenSSH does not support FIDO.
# https://developer.apple.com/forums/thread/698683
# https://github.com/apple-oss-distributions/OpenSSH/pull/1
brew install openssh
@hyunbinseo
hyunbinseo / ubuntu-server.bash
Last active June 30, 2023 00:29
Setup Ubuntu Server
# Moved to https://github.com/hyunbinseo/blog/blob/master/posts/setup-linux.md
### Remote Desktop ############################################################
sudo apt install xfce4 xrdp
sudo systemctl enable xrdp
# Applications / Settings / Screensaver
# [ ] Enable Screensaver
# [ ] Lock Screen with Screensavera
@hyunbinseo
hyunbinseo / index.cjs
Last active February 6, 2025 06:35
Import as ESM and CJS - with VS Code IntelliSense and type check
const { generateSgSendBody } = require('sendgrid-send');
generateSgSendBody;
@hyunbinseo
hyunbinseo / vite.config.ts
Created May 16, 2023 17:27
Vite Build End Notification (SendGrid Email)
import { generateSgSendRequest } from 'sendgrid-send';
import { defineConfig } from 'vite';
// Vite Conditional Config
// Reference https://vitejs.dev/config/#conditional-config
export default defineConfig(({ command }) => ({
plugins: [
{
name: 'Build End Notification',
buildEnd: async (error) => {
@hyunbinseo
hyunbinseo / crypto-key.js
Created June 21, 2023 15:50
Web Crypto - Key Generation, Export, and Import
import { webcrypto as crypto } from 'node:crypto'; // Node.js only
/* Generate */
const key = await crypto.subtle.generateKey(
{
name: 'AES-GCM',
length: 256
},
true,
@hyunbinseo
hyunbinseo / index.ts
Created June 24, 2023 12:09
Drizzle ORM Cheat Sheet
import { asc, eq, gte, lte } from 'drizzle-orm';
import { drizzle } from 'drizzle-orm/mysql2';
import { createPool } from 'mysql2';
import * as schema from './schema';
import { comments, users } from './schema';
const connection = createPool({
host: '...',
user: '...',
password: '...',
@hyunbinseo
hyunbinseo / index.js
Last active November 3, 2023 05:14
SMS API Speed Comparison
// Create .env file and add secret values.
// Run with node --env-file=.env index.mjs
// Requires Node.js 20+ (LTS as of 2023-10-24)
const {
NHN_SMS_APP_KEY,
NHN_SMS_SECRET,
NHN_SMS_SEND_NO,
SEND_TO,
TWILIO_ACCOUNT_SID,
@hyunbinseo
hyunbinseo / js.svelte
Created January 9, 2024 06:05
Svelte Syntax Highlighting
<script>
$: if (browser && data) {
chart.ref?.updateSeries(data.series);
}
</script>
<p>Hello, World</p>