Skip to content

Instantly share code, notes, and snippets.

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

Sanghee Park Alex4386

๐ŸŽ“
์กธ์—…์‹œ์ผœ์ค˜
View GitHub Profile
@Alex4386
Alex4386 / avocado.c
Created June 24, 2023 15:18
์•„๋ณด์นด๋„ ์žˆ์—ˆ์–ด
#include <stdio.h>
#include "mart.h"
int main() {
// ์—ฌ๋ณด ๋งˆํŠธ๊ฐ€์„œ
// ์šฐ์œ  ์‚ฌ๊ณ 
Good target_good = GOODTYPE_MILK;
int quantity = 1;
@Alex4386
Alex4386 / install-prometheus.md
Last active July 18, 2023 03:34
How to install prometheus

Install

  1. Create users
    sudo useradd --no-create-home --shell /sbin/nologin prometheus
  2. Create config dirs
    sudo mkdir /etc/prometheus
    sudo mkdir /var/lib/prometheus
    sudo chown prometheus:prometheus /etc/prometheus
@Alex4386
Alex4386 / ssh-legacy-crypto-method.md
Last active January 3, 2024 04:20
SSH ์‚ฌ์šฉ์‹œ Cryptographic method negotiation ์‹คํŒจํ•˜๋Š” ๊ฒฝ์šฐ

Unable to negotiate with ?????? port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss

.ssh/config

Host *
  HostKeyAlgorithms +ssh-rsa

Important: Rollback after you do this. or use -o "HostKeyAlgorithms +ssh-rsa" flag.

@Alex4386
Alex4386 / how-to-install-saber.md
Created May 8, 2023 11:57
How to Install VideoCopilot.net's SABER Plugin in macOS Manually

How to install SABER Plugin in macOS manually

If you want to install SABER plugin but if it doesn't work like following:
image

You can do the following to install the SABER plugin manually.

Extract SABER Plugin

  1. Control+Click the Saber installer file.
  2. Click Show Package Contents
@Alex4386
Alex4386 / bypass-battery.sh
Last active September 28, 2025 13:57
Bypass Huawei Modem Battery
#!/bin/bash
TARGET_DEVICE="/dev/ttyUSB0"
BYPASS=1
if [ "$1" == "disable" ]; then
BYPASS=0
fi
TARGET_SCRIPT="at^nvwrex=50364,0,4,01 00 00 00"
@Alex4386
Alex4386 / debug-mode.sh
Created December 20, 2022 14:37
Enter debug mode of Huawei Modem
#!/bin/bash
[[ -z $TARGET_IP ]] && TARGET_IP="192.168.8.1"
curl -X POST http://$TARGET_IP/CGI \
-H "Content-Type: application/xml" \
-d '<?xml version="1.0" encoding="UTF-8" ?>
<api version="1.0">
<header>
<function>switchMode</function>
</header>
@Alex4386
Alex4386 / snakeoil.sh
Last active December 18, 2022 08:22
Generate ssl-cert like snakeoil certificate
#!/bin/bash
TARGET_CERT="/etc/ssl/certs/ssl-cert-snakeoil.pem"
TARGET_KEY="/etc/ssl/private/ssl-cert-snakeoil.key"
DHPARAM="/etc/ssl/certs/dhparam.pem"
C="KR"
ST="Seoul"
L="Yeongdeungpo-gu"
O="Alex4386 Inc."
@Alex4386
Alex4386 / xoa.ecosystem.config.js
Created November 12, 2022 10:48
Xen Orchestra PM2
module.exports = {
apps: [
{
name: 'Xen Orchestra',
cwd: './packages/xo-server/',
script: 'yarn',
args: ['start'],
env: {
// You should configure it here.
NODE_ENV: 'production',
@Alex4386
Alex4386 / code-server.ecosystem.config.js
Created September 12, 2022 01:49
code-server ecosystem.config.js
module.exports = {
apps : [{
name: "code-server",
interpreter: "/bin/bash",
cmd: "code-server serve-local --disable-telemetry --without-connection-token"
}]
}
@Alex4386
Alex4386 / setup-certbot.sh
Last active September 11, 2022 02:56
certbot setup script
#!/bin/bash
sudo snap install core
sudo snap refresh core
sudo snap install --classic certbot
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install certbot-dns-cloudflare
sudo snap connect certbot:plugin certbot-dns-cloudflare