Skip to content

Instantly share code, notes, and snippets.

Avatar
😶
Losing direction

Kevin.MX KevinMX

😶
Losing direction
View GitHub Profile
@KevinMX
KevinMX / autodebi.sh
Created Jul 23, 2022
Debian 11 bullseye auto reinstall via bohanyang/debi
View autodebi.sh
#!/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 / unas-certgen
Created Jun 27, 2022
UNAS OS 5 SSL cert using acme.sh and Cloudflare DNS API (replaces included Let's Encrypt script)
View unas-certgen
#Make sure you have root access.
#Not a script yet, so please, check the notes and execute these lines manually.
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"
export CF_Account_ID="ACCOUNTID"
export CF_Token="TOKEN"
@KevinMX
KevinMX / hentaiathome@.service
Created Sep 17, 2021
Hentai@Home systemd autostart
View hentaiathome@.service
[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 / voldown.sh
Created Jun 4, 2021
WF-1000XM3 Volume Control
View voldown.sh
#!/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 / bctrial.sh
Last active May 2, 2021
Beyond Compare Linux Infinite Trial
View bctrial.sh
#!/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