Skip to content

Instantly share code, notes, and snippets.

View Huangxt57's full-sized avatar
🏊
Working

Xuanteng Huang Huangxt57

🏊
Working
View GitHub Profile
@Huangxt57
Huangxt57 / reload.sh
Created September 11, 2022 05:33
Reload NVIDIA kernel module
#/bin/bash
lsmod | grep nvidia
rmmod nvidia_uvm
rmmod nvidia_drm
rmmod nvidia_modeset
rmmod nvidia
# Check processes using the kernel module
@Huangxt57
Huangxt57 / op.sh
Created July 19, 2022 08:12
BASH Frequent Operations/Commands
# Whether file exists?
if [ ! -f ${file} ]; then
echo "${file} NOT exists"
fi
# Get script path
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
@Huangxt57
Huangxt57 / install.sh
Last active July 14, 2022 17:12
Install `qemu-kvm` and create & manage VM using `libvirt` on Debian
#!/usr/bin/bash
user=xxx
# Test whether virtualization is supported for CPU
vm_support=$(egrep '(vmx|svm)' /proc/cpuinfo)
if [ "$a" == "" ]; then
echo "Virtualization is not supported, quit..."
exit 1
fi
@Huangxt57
Huangxt57 / docker-compose.yml
Last active March 10, 2022 17:11
TTRSS ➕ RSSHub docker-compose configuration
version: "3"
services:
service.rss:
image: wangqiru/ttrss:latest
container_name: ttrss
ports:
- 20001:80
environment:
- SELF_URL_PATH=http://localhost:20001 # please change to your own domain
- DB_PASS=ttrss # use the same password defined in `database.postgres`