Skip to content

Instantly share code, notes, and snippets.

View ilium007's full-sized avatar

ilium007

  • NSW, Australia
View GitHub Profile
#!/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'
@ilium007
ilium007 / osx_automount_nfs.md
Created August 26, 2016 08:54 — forked from L422Y/osx_automount_nfs.md
Automounting NFS share in OS X into /Volumes

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

@ilium007
ilium007 / backup.ini
Created December 22, 2016 03:59
Tomato router backup ini file
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 / archive_backup.sh
Last active December 30, 2016 16:26
archive Tomato backups
#!/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 / install_cygwin_sshd.txt
Created September 16, 2017 07:46 — forked from roxlu/install_cygwin_sshd.txt
Installing CYGWIN + SSHD for remote access through SSH on windows
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 / tomato_backup.sh
Created December 22, 2016 03:58
Tomato router backup script.
#!/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 / viscosity-to-ios-connect.rb
Last active November 24, 2018 13:10 — 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)
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 / rclone-backup.sh
Last active October 31, 2019 12:01 — forked from cnrd/rclone-backup.sh
Backup script that uses rclone and ZFS snapshots to create incremental backups
#!/usr/bin/env bash
## Configs ##
ZFSSNAPSHOTNAME="rclone"
RCLONECONFIGPATH="/root/.config/rclone/rclone.conf"
BWLIMIT="10M"
TRANSFERS=15
KEEPSNAPSHOTS=7
usage ()
#!/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 / Securing-SWAG.md
Created May 31, 2021 00:15 — forked from quietsy/Securing-SWAG.md
Securing SWAG

Securing SWAG

SWAG - Secure Web Application Gateway (formerly known as linuxserver/letsencrypt) is a full fledged web server and reverse proxy with Nginx, PHP7, Certbot (Let's Encrypt™ client) and Fail2Ban built in. SWAG allows you to expose applications to the internet, doing so comes with a risk and there are security measures that help reduce that risk. This article details how to configure SWAG and enhance it's security.

This article assumes that you already have a functional SWAG setup. Following is the compose yaml used to create the SWAG container referenced in this article. Keep in mind your local mount paths will be different so adjust accordingly.

---
version: "2.1"
services:
  swag: