Skip to content

Instantly share code, notes, and snippets.

@bivald
bivald / rsync-retry.sh
Last active August 2, 2017 13:23 — forked from iangreenleaf/rsync-retry.sh
rsync with retries
#!/bin/bash
### ABOUT
### Runs rsync, retrying on errors up to a maximum number of tries.
### Simply edit the rsync line in the script to whatever parameters you need.
# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM
MAX_RETRIES=30
@bivald
bivald / htpasswd.py
Created April 25, 2016 08:04 — forked from eculver/htpasswd.py
htpasswd script in python (no need to install apache utils)
#!/usr/bin/env python
"""Replacement for htpasswd"""
# Original author: Eli Carter
import os
import sys
import random
from optparse import OptionParser
# We need a crypt module, but Windows doesn't have one by default. Try to find