Skip to content

Instantly share code, notes, and snippets.

You will need ssh access to your USG. I suggest running sudo su so you're the root user throughout

Installation

  1. Download tailscale and put the files in /config/. Find the latest stable or unstable version for your USG's processor.
curl https://pkgs.tailscale.com/stable/tailscale_1.36.1_mips64.tgz | tar xvz -C /tmp
mv /tmp/tailscale_1.36.1_mips64 /config/tailscale
@phillf
phillf / centos-base.sh
Last active June 11, 2021 18:02
TWHC Base Install
#
# TWHC Base CentOS Config
# Last Updated: Sunday 21 July 2019
#
# Update system packages
yum update -y
# Install Mandatory packages
yum install sssd realmd oddjob oddjob-mkhomedir adcli samba-common samba-common-tools krb5-workstation openldap-clients policycoreutils-python vim -y
@phillf
phillf / mirror_setup.sh
Created July 14, 2019 17:06 — forked from peterjc/mirror_setup.sh
Script to simplify setting up git repository for cron-based mirroring of a GitHub fork
#!/bin/bash
set -euo pipefail
# See https://blastedbio.blogspot.co.uk/2016/05/sync-github-mirror-with-cron.html and
# https://gist.github.com/peterjc/eccac1942a9709993040425d33680352 for mirroring script
#
# Usage:
#
# 1. Fork upstream repo under HuttonICS, disable wiki, projects, issues etc. Protect master branch.
# 2. Run:
@phillf
phillf / mirror_git
Created July 14, 2019 17:05 — forked from peterjc/mirror_git
Script to push git changes to a mirror repository using a deploy key
#!/bin/bash
# Enable strict bash mode - halts on any error
set -euo pipefail
# Takes exactly three command line arguments:
git_dir=$1
ssh_key=$2
log_file=$3
@phillf
phillf / RDS_INSTALL.bat
Created April 16, 2019 01:26 — forked from anthonyeden/RDS_INSTALL.bat
Let's Encrypt & Microsoft Remote Desktop Services - Installation Script
"C:\Program Files\Lets Encrypt\letsencrypt.exe" --renew --baseuri "https://acme-v01.api.letsencrypt.org/"
powershell -File "C:\Program Files\Lets Encrypt\RDS_INSTALL_CERT.ps1" -CertificateImport "C:\ProgramData\letsencrypt-win-simple\httpsacme-v01.api.letsencrypt.org\remote.example.com-all.pfx" -RDCB remote.example.com
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
@phillf
phillf / keybase.md
Last active September 27, 2017 13:50

Keybase proof

I hereby claim:

  • I am phillf on github.
  • I am phillf (https://keybase.io/phillf) on keybase.
  • I have a public key whose fingerprint is 6A78 7632 02F6 758F D890 169F 4879 F29E 5AAC 9E1A

To claim this, I am signing this object:

#!/bin/bash
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb;
wget http://prdownloads.sourceforge.net/webadmin/usermin_1.600_all.deb;
sudo dpkg -i webmin_1.690_all.deb;
sudo dpkg -i usermin_1.600_all.deb;
echo "Installing CSF..."
cd /usr/src
@phillf
phillf / install-webusermin
Last active August 29, 2015 14:03
Install usermin and webmin
#!/bin/bash
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb; sudo dpkg -i webmin_1.690_all.deb; wget http://prdownloads.sourceforge.net/webadmin/usermin_1.600_all.deb; sudo dpkg -i usermin_1.600_all.deb