Skip to content

Instantly share code, notes, and snippets.

View aluferraz's full-sized avatar
🎯
Focusing

Lucas Mohallem Ferraz aluferraz

🎯
Focusing
  • alu.soft
View GitHub Profile
@tvdstaaij
tvdstaaij / rpi-install-cryptroot.sh
Last active July 29, 2024 07:40
Raspberry Pi headless full disk encryption with remote unlock
#!/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
@chicagoworks
chicagoworks / jQuery.stringify.js
Created December 24, 2010 19:05
jQuery.stringify() utility
/**
* 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({