Skip to content

Instantly share code, notes, and snippets.

Avatar

alfiosalanitri alfiosalanitri

View GitHub Profile
@alfiosalanitri
alfiosalanitri / .linux_auto_backup.sh
Created Aug 18, 2020
Linux Tutorial | Backup automatico del sistema su hard disk esterno con rsync + invio di una notifica a telegram con le statistiche + cronjob automatico
View .linux_auto_backup.sh
#!/bin/bash
#eseguo il backup
MESSAGE=$(/usr/bin/rsync -aAX / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/sda1/NomeCartella/ --stats -h)
#invio la notifica a telegram
curl -s -X POST "https://api.telegram.org/bot---telegram-key---/sendMessage" -F chat_id=---chat_id--- -F text="*Backup Automatico*: \`${MESSAGE}\`" -F parse_mode="MarkdownV2"
@alfiosalanitri
alfiosalanitri / bootstrap4-yoast-seo-breadcrumb.php
Last active Dec 5, 2019
Bootstrap 4 Breadcrumb Markup for Yoast SEO Breadcrumb
View bootstrap4-yoast-seo-breadcrumb.php
/***************************************
* Add this code to theme functions.php
***************************************/
/**
* @param $wrapper
*
* @return string
*/
function customWpseoBreadcrumbOutputWrapper($wrapper)