Skip to content

Instantly share code, notes, and snippets.

View hostingfuze's full-sized avatar
💭
I may be slow to respond.

hostingfuze hostingfuze

💭
I may be slow to respond.
View GitHub Profile
@hostingfuze
hostingfuze / Proxmox-Backup-to-Google-Drive
Created February 10, 2023 14:20 — forked from nathandarnell/Proxmox-Backup-to-Google-Drive
A script to backup Proxmox backups to Google Drive and delete any over a certain limit
#All backups go to here automatically:
#/var/lib/vz/dump
#install rclone if uninstalled or update available
#downloads page is http://rclone.org/downloads/
wget http://downloads.rclone.org/rclone-current-linux-amd64.zip
# version on webpage is http://downloads.rclone.org/rclone-v1.33-linux-amd64.zip
# from: http://blog.mattwynne.net/2008/04/26/fetch-and-parse-html-web-page-content-from-bash-wow/
# Download ZIP, keep zip in working folder, check future runs against HTML piped through w3c for newer versions
# from: http://tips.webdesign10.com/scrape-web-pages-gnu-linux-shell:
@hostingfuze
hostingfuze / lwp-cloudflare-dyndns.sh
Created March 31, 2023 04:02 — forked from heygambo/lwp-cloudflare-dyndns.sh
Cloudflare as Dynamic DNS (revised)
#!/bin/bash
# Cloudflare as Dynamic DNS
# From: https://letswp.io/cloudflare-as-dynamic-dns-raspberry-pi/
# Based on: https://gist.github.com/benkulbertis/fff10759c2391b6618dd/
# Original non-RPi article: https://phillymesh.net/2016/02/23/setting-up-dynamic-dns-for-your-registered-domain-through-cloudflare/
# Fixed and documented version by Christian Gambardella (https://gambo.io)
# 1. Create a cloudflare account
# 2. Create a zone and a record with any ip address.
# It will be updated by the script.
@hostingfuze
hostingfuze / cpanel_create_email.py
Created June 18, 2023 12:27 — forked from NanoDano/cpanel_create_email.py
Create email account using cPanel API in Python
from requests import get # pip install requests
"""
Examples:
Docs:
- Create email (add_pop): https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Aadd_pop
- Delete email (delete_pop): https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Adelete_pop
- Change pass (passwd_pop): https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Email%3A%3Apasswd_pop
@hostingfuze
hostingfuze / ssh-copy-id.py
Created June 18, 2023 12:27 — forked from NanoDano/ssh-copy-id.py
Copy public SSH key to remote host using Paramiko
"""
Copy your SSH public key into a remote
host's `~/.ssh/authorized_keys` file.
pip install paramiko
Usage: ssh-copy-id.py <host> <username>
"""
from paramiko import SSHClient, AutoAddPolicy
import sys
#!/bin/bash
clear
setenforce 0 >> /dev/null 2>&1
# Gets Distro type.
if [ -d /etc/pve ]; then
OS=Proxmox
REL=$(/usr/bin/pveversion)
elif [ -f /etc/debian_version ]; then