- https://www.raspberrypi.org/downloads/raspbian/ Buster lite image
- https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md Raspberry Pi 3B+, CM3+
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
| #!/usr/bin/bash | |
| # Script in /opt ablegen | |
| server="192.168.100.100" | |
| port=22 | |
| while true; do | |
| if ! nc -z $server $port 2>/dev/null; then | |
| kill -9 xinit-login |
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
| [Unit] | |
| Description=Start servercheck script | |
| After=network-online.target | |
| [Service] | |
| Type=simple | |
| ExecStart=/opt/servercheck.sh | |
| [Install] | |
| WantedBy=multi-user.target |
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
| import io | |
| import sys | |
| import os | |
| from colorthief import ColorThief | |
| from PIL import Image | |
| original = Image.open(sys.argv[1]) | |
| left = 950 | |
| right = left + 50 |
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 | |
| now=$(date +"%Y-%m-%dT%H-%M-%S") | |
| file="/home/pi/bwt-${now}.jpg" | |
| raspistill -vf -hf -t 1000 -o $file | |
| python3 /home/pi/status.py $file |
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
| # Place this file in /usr/share/X11/xkb/symbols/usde | |
| # Load it with setxkbmap -model pc105 -layout usde -variant intlde -option caps:none | |
| default partial alphanumeric_keys modifier_keys | |
| xkb_symbols "basic" { | |
| name[Group1]= "English (US)"; | |
| key <TLDE> { [ grave, asciitilde ] }; | |
| key <AE01> { [ 1, exclam ] }; |
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
| FG0='\e[38;5;0m' | |
| FG1='\e[38;5;1m' | |
| FG2='\e[38;5;2m' | |
| FG3='\e[38;5;3m' | |
| FG4='\e[38;5;4m' | |
| FG5='\e[38;5;5m' | |
| FG6='\e[38;5;6m' | |
| FG7='\e[38;5;7m' | |
| FG8='\e[38;5;8m' | |
| FG9='\e[38;5;9m' |
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
| sudo su | |
| sgdisk -o -g -n 1::+550M -t 1:ef00 -n 2:: -t 2:8300 /dev/nvme0n1 | |
| cryptsetup luksFormat --type luks1 /dev/nvme0n1p2 | |
| cryptsetup open /dev/nvme0n1p2 lvm | |
| pvcreate /dev/mapper/lvm | |
| vgcreate vg /dev/mapper/lvm | |
| lvcreate -L 32G -n swap vg |
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
| import sys | |
| import os | |
| import errno | |
| import json | |
| from base64 import b64decode | |
| def extract(file, output, challenge): | |
| # Read JSON file | |
| data = json.loads(open(file).read()) |
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
| # -*- coding: utf-8 -*- | |
| """ | |
| A corona virus status plugin for py3status. | |
| Save this into ~/.config/py3status/modules/corona.py | |
| This is static for Germany and gets its data from https://github.com/sagarkarira/coronavirus-tracker-cli | |
| Can be easily changed for a different country by changing the requests url below. | |
| """ | |
| import requests |