Skip to content

Instantly share code, notes, and snippets.

View kainjinez's full-sized avatar
🙂

Hieu Truong kainjinez

🙂
  • Cryptopie Labo
  • Hanoi
View GitHub Profile
# PUS EDU Plugin - Backup Server and Upload to Cloud
# Version: 2.0
#!/bin/bash
SERVER_NAME=$(hostname)
TIMESTAMP=$(date +"%F")
BACKUP_DIR="/home/backup/$TIMESTAMP"
SECONDS=0
size=$(du -sh $BACKUP_DIR | awk '{ print $1}')
echo "Bat Dau Backup thu muc $BACKUP_DIR";
/usr/sbin/rclone move $BACKUP_DIR "remote:$SERVER_NAME/$TIMESTAMP" >> /var/log/rclone.log 2>&1
@kainjinez
kainjinez / clamdcheck
Created February 8, 2021 02:45
DirectAdmin ClamAV test running state
#!/bin/sh
# path to an empty dummy test file
testfile="/usr/local/directadmin/scripts/custom/clamav.txt"
# path to the clamav database files without the ending "/"
dbfolder="/usr/local/share/clamav"
# path to the clamdscan executable
scan="/usr/local/bin/clamdscan"
### Keybase proof
I hereby claim:
* I am kainjinez on github.
* I am kainjinez (https://keybase.io/kainjinez) on keybase.
* I have a public key ASDMEusyhy4Cuu9heADglK1gxO-xMj8lrhzuIuW7sHvYsgo
To claim this, I am signing this object:
@kainjinez
kainjinez / 0_reuse_code.js
Created September 8, 2017 11:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console