Skip to content

Instantly share code, notes, and snippets.

View Alex4386's full-sized avatar

Sanghee Park Alex4386

View GitHub Profile
@Alex4386
Alex4386 / jenkins-agent.ecosystem.config.js
Last active May 7, 2025 10:16
PM2 ecosystem.config.js for Jenkins Agent
try {
require('dotenv').config();
} catch(e) {
console.error('dotenv not found');
process.exit(1);
}
const os = require('os');
const path = require('path');
@Alex4386
Alex4386 / stat-pkg.sh
Last active February 24, 2025 09:30
Shell script for downloading static binaries
#!/bin/bash
# Base URL for the repository
BASE_URL="https://github.com/polaco1782/linux-static-binaries/raw/refs/heads/master"
# Check if ~/.local/bin is in the PATH environment variable
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
echo "Error: ~/.local/bin is not in your PATH. Please add it by running:"
echo "export PATH=\$HOME/.local/bin:\$PATH"
exit 1
@Alex4386
Alex4386 / disable-bing.bat
Created September 8, 2024 02:54
Disable Windows Search Bloat
@echo off
reg add HKCU\Software\Policies\Microsoft\Windows /v DisdableSearchBoxSuggestions /t REG_DWORD /d 1
@Alex4386
Alex4386 / 10-kernel-pin
Last active May 6, 2025 03:34
RaspberryPi Prevent bump up from Kernel 5.10 (Place this at /etc/apt/preferences.d) - for Introduction to Internet of Things: Wi-Fi Sensing via nexmon
Package: raspberrypi-kernel
Pin: version 1:1.20220120-1
Pin-Priority: 9999
@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)