Skip to content

Instantly share code, notes, and snippets.

@moomerman
moomerman / two_factor_ssh.rb
Created September 23, 2011 11:32
Two Factor SSH Authentication
#!/usr/bin/env ruby
require 'rubygems'
require 'rotp'
require 'time'
user = ARGV[0]
secret = ARGV[1]
abort unless user and secret
trap("INT") do
@smcnamara3
smcnamara3 / zfs-setup.sh
Created March 25, 2016 07:54
ZFS root on Xenial - personal fork of http://pastebin.com/raw/fa83QrBk
#!/bin/bash
# ZFS-setup.sh 2016-03-24 19:42
# Auto-installer for clean new system using root on zfs, and optionally on
# luks encrypted disks. It installs Ubuntu 14.04.04 or 16.04 with everything
# needed to support ZFS and potentially LUKS. Without LUKS everything lives
# in the main rpool pool. With LUKS then /boot lives in its own boot pool.
# Grub2 is installed to all disks, so the system can boot cleanly from *any*
# disk, even with a failed disk.