This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"bytes" | |
"crypto/hmac" | |
"crypto/sha256" | |
"encoding/base64" | |
"net/url" | |
"strings" | |
"github.com/pkg/errors" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
import os | |
import traceback | |
import json | |
import time | |
def checksum_file(path): | |
with open(path, mode='rb') as f: | |
return hashlib.md5(f.read()).hexdigest() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data; | |
worker_processes auto; | |
events { | |
worker_connections 4096; | |
} | |
http { | |
include /etc/nginx/mime.types.conf; | |
default_type application/octet-stream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sshport=22 | |
sshcert=~/.ssh/id_rsa | |
remoteserver= # FILL IN, e.g [email protected] | |
localpath= # FILL IN without trailing slash, e.g ~/backups/server | |
usesudo= # FILL IN true or false | |
if [[ $usesudo == true ]]; then | |
rsyncargs=(-rlptzhu -e "ssh -p $sshport" --rsync-path="sudo rsync" --partial --delete-after --info=progress2) |