Format USB flash drive

I was in need of a really Windows compatible USB flash drive.
To be sure the drive is compatible I wanted to format it using Windows.
But the drive was used before, so Windows didn't want to format it.
The easiest way was to wipe the drive on linux using

sudo dd if=/dev/zero of=/dev/sdX bs=1k count=2048

After this procedure Windows asks to format the drive when plugged in.

Raspberry PI Shutdown on button press

After adding a button with resistors (there are lots of other resources about that). I wanted a version using systemd.

The gpio testing script is using wiringpi.

Add this as /root/pin-shutdown.sh:

#!/bin/bash

pin=29  # pin 40 (internal: 21) on raspi layout
gpio mode $pin in
gpio wfi $pin both
logger Shutdown button pressed
shutdown -h now

gpio wfi 21 both is blocking until the pin changes its state.

And the systemd service as: /etc/systemd/system/button-shutdown.service:

[Unit]
Description=button shutdown service

[Service]
ExecStart=/root/pin-shutdown.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target

Enable the systemd service with: systemctl enable button-shutdown