Skip to content

Instantly share code, notes, and snippets.

View Alex4386's full-sized avatar
๐ŸŽ“
์กธ์—…์‹œ์ผœ์ค˜

Sanghee Park Alex4386

๐ŸŽ“
์กธ์—…์‹œ์ผœ์ค˜
View GitHub Profile
@Alex4386
Alex4386 / prisma.ts
Created February 26, 2024 10:55
Prisma Pagination Stuff
import { PrismaClient } from '@prisma/client';
import { FastifyRequest } from 'fastify';
import { getPaginationDataFromRequest } from './mysql';
type PrismaQueryTargetsRaw = Omit<PrismaClient, `$${string}`>;
type PrismaQueryTargets = {
[K in keyof PrismaQueryTargetsRaw as K extends symbol ? never : K]: PrismaQueryTargetsRaw[K];
};
type PrismaQueryTarget = PrismaQueryTargets[keyof PrismaQueryTargets];
@Alex4386
Alex4386 / date.sh
Created January 9, 2024 12:22
Set date from google
#!/bin/bash
date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"
@Alex4386
Alex4386 / convert-certbot-asn1.py
Created January 9, 2024 10:52
convert certbot to asn1
#!/usr/bin/python3
import sys
import json
import base64
import binascii
with open(sys.argv[1]) as fp:
pkey = json.load(fp)
@Alex4386
Alex4386 / install-freepbx-on-iwinv.md
Last active April 17, 2025 05:03
iwinv์— FreePBX (์ •ํ™•ํ•˜๊ฒŒ๋Š” Sangoma Linux) ์„ค์น˜ํ•˜๊ธฐ

FreePBX ์„ค์น˜ํ•˜๊ธฐ

Note

์ฐจ๋ผ๋ฆฌ ๋‹ค๋ฅธ ํšŒ์‚ฌ๊บผ๋กœ ์…‹ํŒ… ํ•˜์„ธ์š”. ISO ์„ค์น˜๋„ ์•ˆ ์—ด์–ด์ค˜์„œ ํ•˜๊ธฐ ํž˜๋“ญ๋‹ˆ๋‹ค.
๋ˆ ์•„๋‚€๋‹ค๊ณ  ์ด๊ฒŒ ๋ญํ•˜๋Š” ์ง“์ธ์ง€ ๋ชจ๋ฅด๊ฒ ๋„ค.
์ด์ƒํ•œ ํ•œ๊ตญ ๋ฒ•๋•Œ๋ฌธ์— ๋ฐœ์‹ ์ž ์ „ํ™”๋ฒˆํ˜ธ ์•ž์— ๊ตญ์ œ์ „ํ™” ๋ถ™๊ธฐ ์‹ซ์œผ๋ฉด KRNIC IP ์ฃผ๋Š” ์• ๋กœ ๋“ฑ๋กํ•ด์•ผ ๋˜๋Š”๊ฑฐ ๋„ˆ๋ฌด ๋นก์น˜๋Š”๋ฐ

์ด ๊ฐ€์ด๋“œ๋Š” SNG7-PBX16-64bit-2302-1.ISO ๊ธฐ์ค€์œผ๋กœ ์ž‘์„ฑ๋˜์—ˆ์Šต๋‹ˆ๋‹ค

์‚ฌ์ „ ๊ตฌ์„ฑ

@Alex4386
Alex4386 / discord-nitro-gen-operagx.cfworkers.js
Last active April 25, 2024 01:40
Discord Nitro Generator for Opera GX Promotion without even installing Opera GX on your machine - Take that, Golden Brick Silk Road Fund Management!
/**
* Welcome to Cloudflare Workers! This is your first worker.
*
* - Run "npm run dev" in your terminal to start a development server
* - Open a browser tab at http://localhost:8787/ to see your worker in action
* - Run "npm run deploy" to publish your worker
*
* Learn more at https://developers.cloudflare.com/workers/
*/
@Alex4386
Alex4386 / add-noxsaves.sh
Created December 20, 2023 08:10
Add `noxsaves` dialect for Proxmox on deploying on `xsaves`-less Linux kernel versions on EPYC Rome-based processors
#!/bin/bash
# https://forum.proxmox.com/threads/cant-use-epyc-rome-cpu-after-update.125336/
TARGET="/etc/pve/virtual-guest/cpu-models.conf"
cat >> $TARGET <<- EOF
cpu-model: EPYC-Rome-noxsaves
flags -xsaves
phys-bits host
hidden 0
hv-vendor-id proxmox
@Alex4386
Alex4386 / unicode-flag.js
Last active October 12, 2023 06:59
one-liner Unicode Flag Builder
"US".toUpperCase().split("").map(n => n.charCodeAt(0) - 65 + 0x1f1e6).map(n => String.fromCodePoint(n)).join("").toString()
@Alex4386
Alex4386 / enable-community.sh
Last active September 27, 2023 04:42
Automatically switch to PVE Community
#!/bin/bash
source /etc/os-release
test -z "$VERSION_CODENAME" && echo "Unable to detect VERSION_CODENAME, Exiting!" && exit 1
echo "#deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
echo "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-community.list
@Alex4386
Alex4386 / install_arch.md
Last active October 15, 2025 07:36
How to install Arch for experienced Linux users

Install Arch

The installation guide for ArchLinux is designed for first-time Arch Linux user that can't proceed installing ArchLinux. But have thorough understanding of how Linux OS bootstraps.
Therefore This documentation skips all of the "bloat" that is basically "Linux for dummies".

This documentation will explain how to install ArchLinux for some-how experienced Linux users who installed using TUI Installer since forever.

Table of Contents

  1. Environment Setup
  2. Installation
  3. Configuration
Welcome to China Airline
Thank you for choosing the airline
[The Bluetooth device is ready to pair]
[Samsung default notification sound]
If you'll wonder why the plane made from plastic.
[Samsung default notification sound]
What the fuck you think this is We're not in America, This is good quality made in China.
[The Bluetooth device is connected (uh) successfully]