Skip to content

Instantly share code, notes, and snippets.

View paul-ridgway's full-sized avatar

Paul Ridgway paul-ridgway

View GitHub Profile
Mongoid.default_client.collections.each(&:drop)
#!/usr/bin/env ruby
require 'hidapi'
bus_number = 1
device_address = 4
interface = 3
SOLID_GRN = [0x08, 0x00, 0x01, 0x06, 0x32, 0x02, 0x01, 0xbb]
PRESS_FADE_GRN = [0x08, 0x00, 0x04, 0x0a, 0x32, 0x02, 0x01, 0xb4]
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
default-lease-time 86400;
max-lease-time 86400;
authoritative;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
default-lease-time 86400;
max-lease-time 86400;
authoritative;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
pi@pi3-1:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
192.168.1.50:/nfs/client1 205G 68G 127G 35% /mnt
devtmpfs 460M 0 460M 0% /dev
root-rw 464M 103M 362M 23% /rw
192.168.1.50:/nfs/client1 205G 68G 127G 35% /ro
overlayfs-root 464M 103M 362M 23% /
tmpfs 464M 0 464M 0% /dev/shm
tmpfs 464M 12M 452M 3% /run
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
@paul-ridgway
paul-ridgway / ro-root.sh
Last active November 4, 2024 15:17
A scrip to replace the default RPi init to create and chroot to an overlayfs-backed root
#!/bin/sh
# Read-only Root-FS for Raspian using overlayfs
# Version 1.1:
# Changed to use /proc/mounts rathern than /etc/fstab for deriving the root filesystem.
#
# Version 1:
# Created 2017 by Pascal Suter @ DALCO AG, Switzerland to work on Raspian as custom init script
# (raspbian does not use an initramfs on boot)
#