Skip to content

Instantly share code, notes, and snippets.

@ledti
ledti / tarcinch
Last active November 3, 2019 11:11
Simple Tarsnap backups with Bash.
#!/bin/bash
# tarcinch: simple tarsnap backups with bash.
# run with a systemd.timer, cron, or manually.
# requires: bash, coreutils, grep, and tarsnap.
# https://gist.github.com/ledti/b8bc6bd0200b7c91ea58
# last modified: 2017/05/30
# * monthly backups on the first of the month (if enabled).
@ledti
ledti / sd
Last active April 10, 2021 17:31
Easily mount mass storage devices.
#!/bin/bash
# sd: easily mount mass storage devices.
# last modified: 2014/08/15
# commands: none, '-m', '-u', or '--help'.
# visually exclude the following /dev/sd* device(s) from the listing:
# syntax example: "abc", to exclude drives a,b, and c.
# use "-" to show everything.
exclude="a"
@ledti
ledti / udisks_functions
Created February 22, 2011 01:02
Simplifies mounting and unmounting with udisks2.
#!/usr/bin/env bash
# udisks_functions: https://bbs.archlinux.org/viewtopic.php?id=109307
# last modified: 2012/08/05
# functions: sdm, sdu, mcm, mcu, srm, sru, fdm, and fdu.
# aliases: sd*m, sd*u, mc*m, and mc*u.
# options:
enable_device="true"
enable_mmc="true"