On mac, dd
needs to be a lowercase 'm'.
diskutil list
sudo diskutil unmount /dev/disk3s1
int speakerPin = 9; | |
int length = 15; // the number of notes | |
char notes[] = "ccggaagffeeddc "; // a space represents a rest | |
int beats[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 4 }; | |
int tempo = 300; | |
void playTone(int tone, int duration) { | |
for (long i = 0; i < duration * 1000L; i += tone * 2) | |
{ | |
digitalWrite(speakerPin, HIGH); |
zc/one/two/three/four | |
zc/one/two/three | |
zc/one/two | |
zc/one |
# Raspberry Pi Pico and GLowBit Rainbow | |
# Combination of sample code from | |
# GloBit: https://core-electronics.com.au/tutorials/how-to-use-ws2812b-rgb-leds-with-raspberry-pi-pico.html | |
# Temperature: https://github.com/geerlingguy/baby-safe-temp/blob/master/main.py | |
import array, utime | |
from machine import Pin | |
import rp2 | |
# Get the temperature from the internal RP2040 temperature sensor. |
#!//bin/bash | |
URL_LIST='/home/pi/kids-internet.dat' | |
case ${1} in | |
block) | |
FLAG='' | |
;; | |
unblock) | |
FLAG='--delmode' |
#!/usr/bin/env bash | |
# | |
# Makes list of twitter accounts that should be (un)followed. To use; Create a | |
# twitter list, add primary users to it and set primarylist variable to list | |
# name You will get three lists | |
# | |
# * groupies: these accounts follow you, but you don't follow them | |
# | |
# * to follow: these accounts have a relation with your primary accounts, but |
#!/usr/bin/env bash | |
#produces a dot graph for homebrew dependencies | |
#run using `./brew-tree.sh | dot -Tpdf -o brew-tree.pdf` | |
set -e #exit immediately if a simple command exits with a non-zero status | |
set -u #treat unset variables as an error when performing parameter expansion | |
set -o pipefail #exit status of last non-zero exit code is returned | |
echo "digraph brew {" |
Will automatically shred any inserted disks without warning.
Designed for raspberry pi.
sudo cp 91-shred_usb_device_rule.rules /etc/udev/rules.d/
sudo chmod 644 /etc/udev/rules.d/91-shred_usb_device_rule.rules
sudo cp shred_usb_device.sh /usr/local/bin/shred_usb_device.sh
sudo chmod 755 /usr/local/bin/shred_usb_device.sh
# tailfile="taildisk-`date "+%Y%m%dT%H%M%S"`.dat"
# dd if=/dev/sda of=${tailfile} bs=512 skip=$(( $(blockdev --getsz /dev/sda) - 4096 ))
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.0185222 s, 113 MB/s
# ls -lah ${tailfile}
-rw-r----- 1 root root 2.0M Jul 16 11:08 taildisk-20160716T110821.dat
#!/usr/bin/env perl -w | |
### 2016-06-01:davidm:simple program to center text on a line | |
use strict; | |
use warnings; | |
use POSIX; | |
#f1: string | |
#f2: total width |