Skip to content

Instantly share code, notes, and snippets.

View SwampDragons's full-sized avatar

Megan Marsh SwampDragons

View GitHub Profile
@SwampDragons
SwampDragons / README.md
Created June 7, 2022 16:49
Using a Nook Simple Touch in 2022

Using an old Barnes and Noble Nook Device

I got an ancient nook "simple touch" for free on a neighborhood Facebook group yesterday. Figured I could see if I at least like the form factor before getting myself a newer one.

Step 1: Charge it

When I got it, the battery was completely dead. I plugged it in to charge (thankfully a micro-USB charger). After about 20 minutes, it was ready to work on.

Step 2: Hardware Reset

@SwampDragons
SwampDragons / user-data
Created September 4, 2020 18:49
Basic Ubuntu 20.04 autoinstallation using cd_files
#cloud-config
autoinstall:
version: 1
identity:
hostname: ubuntu-server
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
username: ubuntu
network:
network:
version: 2

Steps to Reproduce -- assumes AWS account, but principles apply wherever you try to connect.

Create an AWS instance

If you want to test this against an actual instance, you can do so via AWS:

From the console, select and launch a RHEL 8.2 AMI released by RHEL; RHEL's amazon ID is 309956199498.

A valid ami choice in region us-west-2 is ami-02f147dfb8be58a10

To run this example, clone all files into their own directory, change directories into that directory, and run:

packer build -var-file="variables.pkrvars.hcl" .

If you modify the source_ami variable to be an empty string "", then the filter chosen will be different.

{
"builders": [
{
"type": "amazon-ebs",
"region": "us-west-2",
"instance_type": "t2.micro",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"name": "CIS Microsoft Windows Server 2016 Benchmark v1.1.0.*Level 1*",
@SwampDragons
SwampDragons / template_wizardry.json
Created August 23, 2019 21:07
Power of Golang Templating Engine
{
"variables": {
"option_1": "foo",
"option_2": "bar"
},
"builders": [
{
"type": "null",
"name": "AWESOME-POSSUM",
"communicator": "none"

Basic Packer Demo

Setting up:

To run this demo:

  1. Install Packer. (see our installation guide for details, if you need them).

  2. Add valid AWS credentials to your environment: export AWS_ACCESS_KEY_ID=<YOUR KEY HERE> and export AWS_SECRET_ACCESS_KEY=<YOUR KEY HERE>.

Once you've exported those credentials, save the above file and run:

packer build -parallel-builds=2 test_parallelism.json
2019/05/02 15:29:30 [INFO] Packer version: 1.4.1-dev (1dca416f8)
2019/05/02 15:29:30 Packer Target OS/Arch: darwin amd64
2019/05/02 15:29:30 Built with Go Version: go1.12.4
2019/05/02 15:29:30 Detected home directory from env var: /Users/mmarsh
2019/05/02 15:29:30 Using internal plugin for oneandone
2019/05/02 15:29:30 Using internal plugin for docker
2019/05/02 15:29:30 Using internal plugin for lxc
2019/05/02 15:29:30 Using internal plugin for linode
2019/05/02 15:29:30 Using internal plugin for oracle-classic
@SwampDragons
SwampDragons / breakpoints.json
Created February 20, 2019 21:12
Cool New Features in Packer Sample Code
{
"builders": [
{
"type": "null",
"communicator": "none"
}
],
"provisioners": [
{
"type": "shell-local",
{
"builders": [
{
"boot_command": [
"<esc><wait>",
"<esc><wait>",
"<enter><wait>",
"/install/vmlinuz<wait>",
" auto<wait>",
" console-setup/ask_detect=false<wait>",