This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on guide: https://github.com/ViRb3/pi-encrypted-boot-ssh (rev cac7ac5) | |
# | |
# Some usage notes: | |
# - Definitions: "host" means the machine executing this script, "source" means the prebuilt Raspberry Pi OS image used as a base, "target" means the image or disk being provisioned | |
# - Assumes Debian host system, and execution as root. Running in a VM is highly recommended for safety reasons | |
# - Only tested with https://raspi.debian.net/tested-images/ Bullseye/Bookworm RPi4 images as source (should also work for RPi3) | |
# - Assumes target with boot and root partition on one disk | |
# - Assumes Raspberry Pi is connected with Ethernet and DHCP (i.e. no special network configuration in initramfs) | |
# - After booting for the first time, you can ssh as `root` using one of the keys authorized for Dropbear |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* converted stringify() to jQuery plugin. | |
* serializes a simple object to a JSON formatted string. | |
* Note: stringify() is different from jQuery.serialize() which URLEncodes form elements | |
* UPDATES: | |
* Added a fix to skip over Object.prototype members added by the prototype.js library | |
* USAGE: | |
* jQuery.ajax({ |