Skip to content

Instantly share code, notes, and snippets.

View itoffshore's full-sized avatar

Stuart Cardall itoffshore

  • IT Offshore
View GitHub Profile
@itoffshore
itoffshore / restore.sh
Created July 14, 2015 00:36
Selectively restore files & folders
#!/bin/sh
usage() {
local script=$(echo "`basename $0`")
cat <<EOF
$script: Selectively restore files / folders.
Usage: $script [OPTIONS] -- [file / dir names to exclude]
[ -s | --source ] : source directory
@itoffshore
itoffshore / dki
Last active August 20, 2016 03:40
Create Docker data-only container + container with static ip address
#!/bin/sh
##############################################
data_paths=/srv/dockerdata/debuild:/build #
data_name=debdata #
data_image=user/debdata #
bridge=br0 #
ipfile=/etc/default/docker_ips #
##############################################
@itoffshore
itoffshore / chmodr.sh
Created December 8, 2014 15:06 — forked from francisbyrne/chmodr.sh
BASH Script to recursively set directory / file permissions & ownership
#!/bin/bash
#
# chmodr.sh
#
# Original Author: Francis Byrne
# date: 2011/02/12
#
# Modified Script for recursively setting permissions & ownership for directories
# and files to defined or default permissions using chmod & chown.
#