Skip to content

Instantly share code, notes, and snippets.

Avatar

ilium007

  • NSW, Australia
View GitHub Profile
View duplicacy-backup.sh
#!/usr/bin/env bash
## Configs ##
ZFSSNAPSHOTNAME="duplicacy"
DUPLICACY_CMD="/root/duplicacy"
mountSnapshots () {
mkdir -p "/mnt/$ZFSSNAPSHOTNAME"
mount -t zfs "$ZFSSNAPSHOTBASE@$ZFSSNAPSHOTNAME" "/mnt/$ZFSSNAPSHOTNAME"
@ilium007
ilium007 / rclone-backup.sh
Last active Oct 31, 2019 — forked from cnrd/rclone-backup.sh
Backup script that uses rclone and ZFS snapshots to create incremental backups
View rclone-backup.sh
#!/usr/bin/env bash
## Configs ##
ZFSSNAPSHOTNAME="rclone"
RCLONECONFIGPATH="/root/.config/rclone/rclone.conf"
BWLIMIT="10M"
TRANSFERS=15
KEEPSNAPSHOTS=7
usage ()
@ilium007
ilium007 / viscosity-to-ios-connect.rb
Last active Nov 24, 2018 — forked from chrisboulton/viscosity-to-ios-connect.rb
Quickly convert all of your Viscosity connections into OVPN configuration files for OpenVPN for iOS (bundles certificates and keys in the files too)
View viscosity-to-ios-connect.rb
config_files = Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf")
config_files.each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.read(file).each_line do |line|
line.strip!
@ilium007
ilium007 / install_cygwin_sshd.txt
Created Sep 16, 2017 — forked from roxlu/install_cygwin_sshd.txt
Installing CYGWIN + SSHD for remote access through SSH on windows
View install_cygwin_sshd.txt
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@ilium007
ilium007 / archive_backup.sh
Last active Dec 30, 2016
archive Tomato backups
View archive_backup.sh
#!/bin/sh
logger -t "nvram_archive" "start script"
[ $# -eq 0 ] && { echo "Usage: $0 days_to_keep" ; logger -t "nvram_archive" "end script with error; no arg supplied"; exit 1; }
keep_for_days=$1
echo "removing backups older than $keep_for_days days"
#keep_for_days=${1-14}
logger -t "nvram_archive" "removing backups older than $keep_for_days days"
@ilium007
ilium007 / backup.ini
Created Dec 22, 2016
Tomato router backup ini file
View backup.ini
adblock[a-zA-Z_0-9]*
atm[a-zA-Z_0-9]*
bt[a-zA-Z_0-9]*
btn[a-zA-Z_0-9]*
cifs[0-9]
cstats[a-zA-Z_0-9]*
ddnsx[a-zA-Z01_]*
dhcp[a-zA-Z_0-9]*
dhcpd[a-zA-Z_0-9]*
dmz[a-zA-Z_0-9]*
@ilium007
ilium007 / tomato_backup.sh
Created Dec 22, 2016
Tomato router backup script.
View tomato_backup.sh
#!/bin/sh
#USE AT YOUR OWN RISK.
#THIS SCRIPT DOES NOT COME WITH ANY WARRANTY WHATSOEVER.
#
#Backs up selected nvram variables in "nvram export --set" format.
#
#Correctly handles multi-line entries.
#
#Thanks to ryzhov_al for basic approach.
@ilium007
ilium007 / osx_automount_nfs.md
Created Aug 26, 2016 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes
View osx_automount_nfs.md

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#
+auto_master		# Use directory service
View osx-for-hackers.sh
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'