This file contains 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/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) | |
# |
This file contains 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
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 |
This file contains 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
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; |
This file contains 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
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; |
This file contains 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
service tftp | |
{ | |
protocol = udp | |
port = 69 | |
socket_type = dgram | |
wait = yes | |
user = nobody | |
server = /usr/sbin/in.tftpd | |
server_args = /tftpboot | |
disable = no |
This file contains 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
#!/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] |
This file contains 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
Mongoid.default_client.collections.each(&:drop) |
This file contains 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
rsync -aAXv --progress --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/usr/tmp/*","/run/*","/mnt/*","/media/*","/var/cache/*","/","/lost+found","/backup"} /* /backup/ |
This file contains 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
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
core_a: ["STM32"] | |
core_b: ["stm32"] | |
board: ["Nucleo_144"] | |
opts: ["pnum=NUCLEO_F767ZI,upload_method=MassStorage,xserial=generic,usb=none,xusb=FS,opt=osstd,rtlib=nano"] |
This file contains 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
function strokesRequired(picture) { | |
var strokes = 0; | |
while (true) { | |
// Find the next truthy cell and extract x and y | |
const next = picture.flatMap((row, x) => row.flatMap((char, y) => (char && { char, x, y }))).filter(r => r)[0]; | |
if (!next) { // None left means the picture is filled | |
break; | |
} | |
const remove = [[next.x, next.y]]; // We will remove the current cell after | |
eliminateNeighbours(picture, [], remove, next.char, next.x, next.y); |
OlderNewer