Skip to content

Instantly share code, notes, and snippets.

@Jeimerson
Jeimerson / WipeTapes.sh
Created May 25, 2021 08:17 — forked from lpaseen/WipeTapes.sh
Script to Erase all tapes loaded in a tape loader.
#!/bin/bash
#
# Description:
# Erase all tapes loaded in a tape loader.
# If FULL is given as parameter a full erase is done otherwise it just do a quick one.
# BUGS:
# It should count how many drives and do that part automagically
# but it's hard to pair up drives with loaders when other tape drives exists also.
# Haven't tested FULL
#
#!/usr/bin/env bash
# require: git version > 2.3
# require: `db/letsencrypt` existed in git repo
if [[ -z "$CERTBOT_DOMAIN" ]] || [[ -z "$CERTBOT_VALIDATION" ]]; then
echo '$CERTBOT_DOMAIN and $CERTBOT_VALIDATION environment variables required.'
fi
source /etc/letsencrypt/dns-auth.conf
@Jeimerson
Jeimerson / gist:04c88f82b8d29eb4421179c6d9ec5368
Created December 12, 2020 16:21 — forked from michoelchaikin/gist:fc4db078c0f64f6f5d35
Backup a mySQL database to Google Drive
#! /usr/bin/perl
# Backups and compresses a SQL database, and uploads to Google Drive
# Make sure ~/.my.cnf is set with mySQL login credentials
# Follow instructions at https://developers.google.com/drive/web/auth/web-server to generate a client id and secret
# Use bash script at https://github.com/soulseekah/bash-utils/blob/master/google-oauth2/google-oauth2.sh to create refresh token
# Configuration Options
my $HOST = ''; # mySQL server host