Skip to content

Instantly share code, notes, and snippets.

@Alex4386
Alex4386 / LICENSE
Last active April 14, 2024 23:37
Touhou Project Derivative Works Guidelines in "License Speak" for "Programmers"
Touhou Project Derivative Works License for Doujin Projects
Note: This is not an official translation/condoned by the
copyright holder, ZUN. Please refer to official webpage
page for more information available at here:
https://touhou-project.news/guidelines_en/
This reflects the Derivative works guidelines available at
2024-04-13 and in English version. But might have several
misinterpretations. Take this License file with a grain of salt
@Alex4386
Alex4386 / remove-k-backdoor.sh
Last active March 14, 2024 02:07
Remove Korean "Backdoors" from your macOS
#!/bin/bash
echo K-Backdoor Remover
echo by Alex4386
if [ -d "/Applications/AhnLab/ASTx" ]; then
echo Remove AhnLab unSafe Transaction:
cd /Applications/AhnLab/ASTx/
open Uninstaller.app
fi
@Alex4386
Alex4386 / notify.json
Created February 27, 2024 09:59
WebNotification 테스트
{
"title": "와! 샌즈!",
"options": {
"body": "언더테일 아시는구나! 혹시 모르시는분들에 대해 설명해드립니다 샌즈랑 언더테일의 세가지 엔딩루트중 몰살엔딩의 최종보스로 진.짜.겁.나.어.렵.습.니.다 공격은 전부다 회피하고 만피가 92인데 샌즈의 공격은 1초당 60이 다는데다가 독뎀까지 추가로 붙어있습니다.. 하지만 이러면 절대로 게임을 깰 수 가없으니 제작진이 치명적인 약점을 만들었죠. 샌즈의 치명적인 약점이 바로 지친다는것입니다. 패턴들을 다 견디고나면 지쳐서 자신의 턴을 유지한채로 잠에듭니다. 하지만 잠이들었을때 창을옮겨서 공격을 시도하고 샌즈는 1차공격은 피하지만 그 후에 바로날아오는 2차 공격을 맞고 죽습니다.",
"icon": "https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/c3c992cc-63ed-4d82-9931-27612c27da52/d9udxh2-7e15ae0e-3796-4747-9263-5257949fa56c.png/v1/fill/w_1024,h_1024/sans_s_face__high_resolution_render__by_axis_strike_d9udxh2-fullview.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOjdlMGQxODg5ODIyNjQzNzNhNWYwZDQxNWVhMGQyNmUwIiwiaXNzIjoidXJuOmFwcDo3ZTBkMTg4OTgyMjY0MzczYTVmMGQ0MTVlYTBkMjZlMCIsIm9iaiI6W1t7ImhlaWdodCI6Ijw9MTAyNCIsInBhdGgiOiJcL2ZcL2MzYzk5MmNjLTYzZWQtNGQ4Mi05OTMxLTI3NjEyYzI3ZGE1MlwvZDl1ZHhoMi03ZTE1YWUwZS0zNzk2LTQ3NDctOTI2My01MjU3OTQ5ZmE1NmMucG5nIiwid2lkdGgiOiI8PTEwMjQifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6aW1
@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 January 2, 2024 04:02
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()