Skip to content

Instantly share code, notes, and snippets.

View KevinMX's full-sized avatar
🏠
Working from home

Kevin.MX KevinMX

🏠
Working from home
View GitHub Profile
@KevinMX
KevinMX / bctrial.sh
Last active May 2, 2021 15:33
Beyond Compare Linux Infinite Trial
#!/bin/sh
#For testing purposes only. Please purchase genuine BC license and support the developers.
#Run this script with root/sudo.
mv /usr/bin/bcompare /usr/bin/bcompare_bak
cat << "EOF" > /usr/bin/bcompare
#!/bin/sh
rm "${HOME}/.config/bcompare/registry.dat"
/usr/bin/bcompare_bak $@
EOF
chmod 0755 /usr/bin/bcompare
@KevinMX
KevinMX / voldown.sh
Created June 4, 2021 07:44
WF-1000XM3 Volume Control
#!/bin/bash
dbus-send --print-reply --system --dest=org.bluez $(dbus-send --print-reply --system --dest=org.bluez / org.freedesktop.DBus.ObjectManager.GetManagedObjects | grep -E '/org/bluez/hci./dev_.._.._.._.._.._..' -om1) org.bluez.MediaControl1.VolumeUp
@KevinMX
KevinMX / hentaiathome@.service
Created September 17, 2021 01:49
Hentai@Home systemd autostart
[Unit]
Description=Hentai@Home Autostart
After=network-online.target
[Service]
Type=simple
WorkingDirectory=/home/%I/h2h/
ExecStart=java -jar -Xms64m -Xmx768m /home/%I/h2h/HentaiAtHome.jar
#Restart=always
User=%I
@KevinMX
KevinMX / unas-certgen
Last active February 26, 2023 08:43
UNAS OS 5 SSL cert using acme.sh and Cloudflare DNS API (replaces included Let's Encrypt script)
# Make sure you have root access / enabled sudo for your user. Here we use default admin user.
# You may use any other users as well, as long as they got sudo.
# Not a script yet, so please, check the notes and execute these lines manually.
# Install socat and acme.sh script
sudo apt update && sudo apt -y upgrade && sudo apt -y install socat
curl https://get.acme.sh | sh -s email=$email
# Get these tokens from Cloudflare
export CF_Zone_ID="ZONEID"
@KevinMX
KevinMX / autodebi.sh
Created July 23, 2022 10:20
Debian 11 bullseye auto reinstall via bohanyang/debi
#!/bin/bash
curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh && chmod a+rx debi.sh
export SSHPORT=12345
export PASSWORD=12345678
sudo ./debi.sh --cdn --network-console --ethx --bbr --user mx --password $PASSWORD --version 11 \
--authorized-keys-url https://github.com/KevinMX.keys --timezone Asia/Shanghai --filesystem xfs \
--install 'htop tmux git vim curl wget aria2 socat' --https --hostname daydream --firmware --grub-timeout 5 --ssh-port $SSHPORT
#Docker install (after reboot)
sudo apt update && sudo apt -y install lsb-release gnupg curl ca-certificates
@KevinMX
KevinMX / sing-client.json
Last active October 7, 2022 08:56
[experimental] sing-box for trojan
{
"log": {
"level": "info"
},
"dns": {
"servers": [
{
"tag": "cloudflare",
"address": "tls://1.1.1.1"
},
@KevinMX
KevinMX / sing-server-ss-warp.json
Created December 1, 2022 11:48
[experimental] sing-box Shadowsocks 2022 Edition with Cloudflare Warp outbound for geo{ip,site}:cn
{
"log": {
"level": "warning"
},
"dns": {
"servers": [
{
"address": "tls://1.1.1.1"
}
]
@KevinMX
KevinMX / whcms.py
Created October 18, 2023 06:01
WHCMS x GreenCloudVPS
# Source: https://www.wucuoym.com/7004_fully_automatic_purchase_of_green_hat_ziyun_special_offer_ma.html
import undetected_chromedriver as uc
import requests
import time
import random
from selenium.webdriver import Keys
from selenium.webdriver.common.by import By
def buy_service():
# 这里是生成随机Hostname,你可以改为你的Hostname
hostname = str(random.randint(10000, 99999)) + '.baidu.com'