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 | |
| # | |
| # Notes to self: | |
| # * https://github.com/andrewrk/poop as an alternative to hyperfine | |
| # * https://easyperf.net/blog/2019/08/02/Perf-measurement-environment-on-Linux | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: $0 {bench|normal}" | |
| exit 1 |
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/python3 | |
| import serial | |
| import sys | |
| VT = b'\013' # ASCII vertical tab! | |
| CLEANUP = VT + b'[:nh][:dv ap 90 pr 0].END OF LINE[:np][:pp 0][:cp 0][:rate 200][:say line][:punct none][:pitch 35].\r' | |
| # DECtalk output over serial with command resetting | |
| ser = serial.Serial('/dev/ttyUSB0',9600,timeout=1) # open serial port with 9600 8N1 defaults |
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
| #compdef aur | |
| # Helper to complete aur package names | |
| # TODO: This is a bit slow (multiple seconds) when tab completing without any leading characters, | |
| # which suggests it is the built in compadd (or some presentation layer) being slow rather than | |
| # aur pkglist itself. See if anything can be done about this. | |
| __aur_list_pkgs() { | |
| local -a pkgs | |
| # TODO: Longer TTL? | |
| pkgs=( $(aur pkglist 2>/dev/null) ) |