# pvcreate /dev/nvme0n1pX
# vgcreate foo /dev/nvme0n1pX
# lvcreate --name bar -l '100%FREE' foo
# mkfs.ext4 /dev/foo/bar
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/python3 | |
import sys | |
# 4 -> odd -> 4,1 | |
# even -> 2,3 | |
# 8 -> odd -> 8,1 6,3 | |
# even -> 2,7 4,5 |
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
/boot/config.txt: | |
[all] | |
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4 | |
/boot/cmdline.txt: | |
snd_bcm2835.enable_compat_alsa=1 | |
/etc/rc.local: |
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
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta charset="utf-8" /> | |
<script type="text/javascript"> | |
var url = "ws://" + location.host + location.pathname + "websocket"; | |
var connected = false; | |
var ws; | |
var ready = false; |
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
# AM2320 connected to Raspberry Pi pin 3 (SDA) and 5 (SCL) | |
# Public domain | |
import sys | |
import fcntl | |
import time | |
import struct | |
I2C_SLAVE = 0x0703 | |
AM2320_ADDR = 0x5c |
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
$ openssl req -new -x509 -days 365 -nodes -out server.crt -keyout server.key |
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 | |
echo "dwc2" >> /etc/modules | |
echo "g_ether" >> /etc/modules | |
echo "dtoverlay=dwc2" >> /boot/config.txt | |
cat > /etc/systemd/network/usb0.network << EOF | |
[Match] | |
Name=usb0 |