Skip to content

Instantly share code, notes, and snippets.

View johnko's full-sized avatar

John Ko johnko

  • Canada
View GitHub Profile
@johnko
johnko / ubuntu-1404-preseed
Created July 14, 2017 21:44 — forked from scottslowe/ubuntu-1404-preseed
This is a preseed file, written for Ubuntu Server 14.04.2, that provides a fully automated installation (assuming the presence of a PXE boot infrastructure and a local HTTP server to provide the installation files).
# Ubuntu Server automated installation
# by Scott Lowe ([email protected])
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i netcfg/choose_interface select eth0
d-i netcfg/get_hostname string hostname
d-i netcfg/get_domain string domain.com
d-i netcfg/wireless_wep string
@johnko
johnko / zfs_health.sh
Created August 30, 2018 05:38 — forked from petervanderdoes/zfs_health.sh
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@johnko
johnko / _aws_delete-default-vpc.sh
Last active January 30, 2022 09:56 — forked from jokeru/aws_delete-default-vpc.sh
Script to delete all AWS default VPCs from all regions using AWS CLI
#/usr/bin/env bash
set -euo pipefail
exit 1
# Need the SystemAdministrator AWS SSO / IAM PermissionSet
for region in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
echo "* Region ${region}"