From 75fab8053a6725d1c2e6e5b636839200feadee9b Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Wed, 22 Feb 2023 08:31:38 +0100 Subject: [PATCH] Update 2023-02-22 08:31 OpenBSD/amd64 --- .bin/12color.sh | 4 + .bin/16colors.sh | 22 + .bin/256color.sh | 10 + .bin/ascii | 59 ++ .bin/avg.c | 18 - .bin/backup | 13 + .bin/bitshift | 15 + .bin/blog | 80 +++ .bin/bm | 32 + .bin/bpm-rename | 36 + .bin/cbar | Bin 0 -> 9936 bytes .bin/cdrip2flac | 11 + .bin/clipdl | 10 + .bin/clone | 7 + .bin/compress_maildir.sh | 42 ++ .bin/cscope-update | 12 + .bin/cv_motd | 24 + .bin/cvs-log | 6 + .bin/ddev | 4 + .bin/dev-continue | 8 + .bin/dev-cscope-go | 2 + .bin/dev-cscope-go-definition | 2 + .bin/dev-cscope-go-symbol | 2 + .bin/dev-dirs | 18 + .bin/dev-fixrej | 8 + .bin/dev-grep-other-os | 3 + .bin/dev-here-openbsd | 46 ++ .bin/dev-portfiles | 29 + .bin/dev-portroach | 2 + .bin/dev-search-ports-all | 7 + .bin/dev-search-ports-makefiles | 10 + .bin/dev-search-ports-patches | 6 + .bin/dev-search-ports-plist | 6 + .bin/dev-showdevelopers | 5 + .bin/dev-showdiff | 8 + .bin/dev-showdiff-cvs | 9 + .bin/dev-ugrep-sys | 11 + .bin/devs | 15 + .bin/dexec_findwin.old | 4 + .bin/dexec_man.orig | 23 + .bin/dexec_pasteaction | 11 + .bin/dexec_ssh.bak | 13 + .bin/dexec_ssh_favs | 23 + .bin/dexec_work | 4 + .bin/diff-from-orig.sh | 14 + .bin/dmark | 8 + .bin/documents-ocr | 6 + .bin/dsys | 2 + .bin/dterm | 3 + .bin/encode | 11 + .bin/ext_ip_from_fritzbox.sh | 16 + .bin/findimagedupes | 1122 +++++++++++++++++++++++++++++++ .bin/gdb-get-backtrace | 8 + .bin/hlsvideo.sh | 71 ++ .bin/hostwatch | 13 + .bin/hpaste | 44 ++ .bin/ical2rem | 294 ++++++++ .bin/icb-tunnel | 4 + .bin/ipmi-tweety | 3 + .bin/ksh-update-completions | 31 + .bin/motd.sh | 33 + .bin/mutt-find | 6 + .bin/obsd-vm | 61 ++ .bin/obsdmake | 123 ++++ .bin/pass-add | 19 + .bin/passmenu | 11 + .bin/passmenu-edit | 18 + .bin/pastebitch | 2 + .bin/pwadd | 32 + .bin/rec_scr | 46 ++ .bin/rec_scr_fast | 18 + .bin/rec_scr_huff | 46 ++ .bin/recio | 22 + .bin/rename_to_lowercase | 9 + .bin/restore | 20 + .bin/s | 27 + .bin/smi | 5 + .bin/sndevice | 19 + .bin/sort-wantlib | 8 + .bin/ssh-tunnel | 5 + .bin/sshot | 26 + .bin/subsonic | 81 +++ .bin/tapebackup.sh | 96 +++ .bin/tarsnap-delete | 21 + .bin/texec | 7 + 85 files changed, 3073 insertions(+), 18 deletions(-) create mode 100755 .bin/12color.sh create mode 100755 .bin/16colors.sh create mode 100755 .bin/256color.sh create mode 100755 .bin/ascii delete mode 100644 .bin/avg.c create mode 100755 .bin/backup create mode 100755 .bin/bitshift create mode 100755 .bin/blog create mode 100755 .bin/bm create mode 100755 .bin/bpm-rename create mode 100755 .bin/cbar create mode 100755 .bin/cdrip2flac create mode 100755 .bin/clipdl create mode 100644 .bin/clone create mode 100755 .bin/compress_maildir.sh create mode 100755 .bin/cscope-update create mode 100755 .bin/cv_motd create mode 100755 .bin/cvs-log create mode 100755 .bin/ddev create mode 100755 .bin/dev-continue create mode 100755 .bin/dev-cscope-go create mode 100755 .bin/dev-cscope-go-definition create mode 100755 .bin/dev-cscope-go-symbol create mode 100755 .bin/dev-dirs create mode 100755 .bin/dev-fixrej create mode 100755 .bin/dev-grep-other-os create mode 100755 .bin/dev-here-openbsd create mode 100755 .bin/dev-portfiles create mode 100755 .bin/dev-portroach create mode 100755 .bin/dev-search-ports-all create mode 100755 .bin/dev-search-ports-makefiles create mode 100755 .bin/dev-search-ports-patches create mode 100755 .bin/dev-search-ports-plist create mode 100755 .bin/dev-showdevelopers create mode 100755 .bin/dev-showdiff create mode 100755 .bin/dev-showdiff-cvs create mode 100755 .bin/dev-ugrep-sys create mode 100755 .bin/devs create mode 100755 .bin/dexec_findwin.old create mode 100755 .bin/dexec_man.orig create mode 100755 .bin/dexec_pasteaction create mode 100755 .bin/dexec_ssh.bak create mode 100755 .bin/dexec_ssh_favs create mode 100755 .bin/dexec_work create mode 100755 .bin/diff-from-orig.sh create mode 100755 .bin/dmark create mode 100755 .bin/documents-ocr create mode 100755 .bin/dsys create mode 100755 .bin/dterm create mode 100755 .bin/encode create mode 100644 .bin/ext_ip_from_fritzbox.sh create mode 100755 .bin/findimagedupes create mode 100755 .bin/gdb-get-backtrace create mode 100755 .bin/hlsvideo.sh create mode 100755 .bin/hostwatch create mode 100755 .bin/hpaste create mode 100755 .bin/ical2rem create mode 100755 .bin/icb-tunnel create mode 100755 .bin/ipmi-tweety create mode 100755 .bin/ksh-update-completions create mode 100644 .bin/motd.sh create mode 100755 .bin/mutt-find create mode 100755 .bin/obsd-vm create mode 100755 .bin/obsdmake create mode 100755 .bin/pass-add create mode 100755 .bin/passmenu create mode 100755 .bin/passmenu-edit create mode 100755 .bin/pastebitch create mode 100755 .bin/pwadd create mode 100755 .bin/rec_scr create mode 100755 .bin/rec_scr_fast create mode 100755 .bin/rec_scr_huff create mode 100755 .bin/recio create mode 100755 .bin/rename_to_lowercase create mode 100755 .bin/restore create mode 100755 .bin/s create mode 100755 .bin/smi create mode 100755 .bin/sndevice create mode 100755 .bin/sort-wantlib create mode 100755 .bin/ssh-tunnel create mode 100755 .bin/sshot create mode 100755 .bin/subsonic create mode 100755 .bin/tapebackup.sh create mode 100755 .bin/tarsnap-delete create mode 100755 .bin/texec diff --git a/.bin/12color.sh b/.bin/12color.sh new file mode 100755 index 0000000..c33df66 --- /dev/null +++ b/.bin/12color.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +fgbg=90 +printf "\\e[${fgbg};5;%sm %3s \\e[0m" $fgbg diff --git a/.bin/16colors.sh b/.bin/16colors.sh new file mode 100755 index 0000000..227c076 --- /dev/null +++ b/.bin/16colors.sh @@ -0,0 +1,22 @@ +#!/usr/local/bin/bash + +# This program is free software. It comes without any warranty, to +# the extent permitted by applicable law. You can redistribute it +# and/or modify it under the terms of the Do What The Fuck You Want +# To Public License, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +#Background +for clbg in {40..47} {100..107} 49 ; do + #Foreground + for clfg in {30..37} {90..97} 39 ; do + #Formatting + for attr in 0 1 2 4 5 7 ; do + #Print the result + echo -en "\e[${attr};${clbg};${clfg}m ^[${attr};${clbg};${clfg}m \e[0m" + done + echo #Newline + done +done + +exit 0 diff --git a/.bin/256color.sh b/.bin/256color.sh new file mode 100755 index 0000000..ae894fb --- /dev/null +++ b/.bin/256color.sh @@ -0,0 +1,10 @@ +#!/bin/sh +for fgbg in 38 48; do + while [ "${color:=0}" -le 255 ]; do + printf "\\e[${fgbg};5;%sm %3s \\e[0m" $color $color + [ $(((color + 1) % 6)) = 4 ] && printf '\n' + color=$((color+1)) + done + printf '\n' && unset color +done +exit 0 diff --git a/.bin/ascii b/.bin/ascii new file mode 100755 index 0000000..a03b75d --- /dev/null +++ b/.bin/ascii @@ -0,0 +1,59 @@ +#!/bin/cat + +OCT: + + | 000 nul | 001 soh | 002 stx | 003 etx | 004 eot | 005 enq | 006 ack | 007 bel + | 010 bs | 011 ht | 012 lf | 013 vt | 014 ff | 015 cr | 016 so | 017 si + | 020 dle | 021 dc1 | 022 dc2 | 023 dc3 | 024 dc4 | 025 nak | 026 syn | 027 etb + | 030 can | 031 em | 032 sub | 033 esc | 034 fs | 035 gs | 036 rs | 037 us + | 040 sp | 041 ! | 042 " | 043 # | 044 $ | 045 % | 046 & | 047 ' + | 050 ( | 051 ) | 052 * | 053 + | 054 , | 055 - | 056 . | 057 / + | 060 0 | 061 1 | 062 2 | 063 3 | 064 4 | 065 5 | 066 6 | 067 7 + | 070 8 | 071 9 | 072 : | 073 ; | 074 < | 075 = | 076 > | 077 ? + | 100 @ | 101 A | 102 B | 103 C | 104 D | 105 E | 106 F | 107 G + | 110 H | 111 I | 112 J | 113 K | 114 L | 115 M | 116 N | 117 O + | 120 P | 121 Q | 122 R | 123 S | 124 T | 125 U | 126 V | 127 W + | 130 X | 131 Y | 132 Z | 133 [ | 134 \ | 135 ] | 136 ^ | 137 _ + | 140 ` | 141 a | 142 b | 143 c | 144 d | 145 e | 146 f | 147 g + | 150 h | 151 i | 152 j | 153 k | 154 l | 155 m | 156 n | 157 o + | 160 p | 161 q | 162 r | 163 s | 164 t | 165 u | 166 v | 167 w + | 170 x | 171 y | 172 z | 173 { | 174 | | 175 } | 176 ~ | 177 del + +HEX: + + | 00 nul | 01 soh | 02 stx | 03 etx | 04 eot | 05 enq | 06 ack | 07 bel + | 08 bs | 09 ht | 0a lf | 0b vt | 0c ff | 0d cr | 0e so | 0f si + | 10 dle | 11 dc1 | 12 dc2 | 13 dc3 | 14 dc4 | 15 nak | 16 syn | 17 etb + | 18 can | 19 em | 1a sub | 1b esc | 1c fs | 1d gs | 1e rs | 1f us + | 20 sp | 21 ! | 22 " | 23 # | 24 $ | 25 % | 26 & | 27 ' + | 28 ( | 29 ) | 2a * | 2b + | 2c , | 2d - | 2e . | 2f / + | 30 0 | 31 1 | 32 2 | 33 3 | 34 4 | 35 5 | 36 6 | 37 7 + | 38 8 | 39 9 | 3a : | 3b ; | 3c < | 3d = | 3e > | 3f ? + | 40 @ | 41 A | 42 B | 43 C | 44 D | 45 E | 46 F | 47 G + | 48 H | 49 I | 4a J | 4b K | 4c L | 4d M | 4e N | 4f O + | 50 P | 51 Q | 52 R | 53 S | 54 T | 55 U | 56 V | 57 W + | 58 X | 59 Y | 5a Z | 5b [ | 5c \ | 5d ] | 5e ^ | 5f _ + | 60 ` | 61 a | 62 b | 63 c | 64 d | 65 e | 66 f | 67 g + | 68 h | 69 i | 6a j | 6b k | 6c l | 6d m | 6e n | 6f o + | 70 p | 71 q | 72 r | 73 s | 74 t | 75 u | 76 v | 77 w + | 78 x | 79 y | 7a z | 7b { | 7c | | 7d } | 7e ~ | 7f del + +DEC: + + | 0 nul | 1 soh | 2 stx | 3 etx | 4 eot | 5 enq | 6 ack | 7 bel + | 8 bs | 9 ht | 10 lf | 11 vt | 12 ff | 13 cr | 14 so | 15 si + | 16 dle | 17 dc1 | 18 dc2 | 19 dc3 | 20 dc4 | 21 nak | 22 syn | 23 etb + | 24 can | 25 em | 26 sub | 27 esc | 28 fs | 29 gs | 30 rs | 31 us + | 32 sp | 33 ! | 34 " | 35 # | 36 $ | 37 % | 38 & | 39 ' + | 40 ( | 41 ) | 42 * | 43 + | 44 , | 45 - | 46 . | 47 / + | 48 0 | 49 1 | 50 2 | 51 3 | 52 4 | 53 5 | 54 6 | 55 7 + | 56 8 | 57 9 | 58 : | 59 ; | 60 < | 61 = | 62 > | 63 ? + | 64 @ | 65 A | 66 B | 67 C | 68 D | 69 E | 70 F | 71 G + | 72 H | 73 I | 74 J | 75 K | 76 L | 77 M | 78 N | 79 O + | 80 P | 81 Q | 82 R | 83 S | 84 T | 85 U | 86 V | 87 W + | 88 X | 89 Y | 90 Z | 91 [ | 92 \ | 93 ] | 94 ^ | 95 _ + | 96 ` | 97 a | 98 b | 99 c | 100 d | 101 e | 102 f | 103 g + | 104 h | 105 i | 106 j | 107 k | 108 l | 109 m | 110 n | 111 o + | 112 p | 113 q | 114 r | 115 s | 116 t | 117 u | 118 v | 119 w + | 120 x | 121 y | 122 z | 123 { | 124 | | 125 } | 126 ~ | 127 del + diff --git a/.bin/avg.c b/.bin/avg.c deleted file mode 100644 index 65a17a7..0000000 --- a/.bin/avg.c +++ /dev/null @@ -1,18 +0,0 @@ -#include -#include -#include - -int main(int argc, const char *argv[]) -{ - unsigned long long no = 0; - for (int i=1; i 1) - printf("%.0lld\n", no / (argc - 1) / 1000000); - - return 0; -} diff --git a/.bin/backup b/.bin/backup new file mode 100755 index 0000000..2cfd90e --- /dev/null +++ b/.bin/backup @@ -0,0 +1,13 @@ +#!/bin/sh +. $HOME/.bin/_config + +[ -d "$1" ] || ( printf "Usage: backup \n" && exit 2; ) + +print "Tarsnap Backup:" + +_target=$(readlink -f "$1") +_key=$(pwgen -n1 8) +_date=$(date "+%Y-%m-%d %H:%M") +_host=$(uname -n) + +doas tarsnap --humanize-numbers --checkpoint-bytes 52428800 --exclude "*/.git/*" -cvf "$_host: $_target $_date ($_key)" "$_target" diff --git a/.bin/bitshift b/.bin/bitshift new file mode 100755 index 0000000..02f710c --- /dev/null +++ b/.bin/bitshift @@ -0,0 +1,15 @@ +#!/bin/cat + + +-----+-----+-----+-----+-----+ + | x | y | x&y | x|y | x^y | + +-----+-----+-----+-----+-----+ + | 0 | 0 | 0 | 0 | 0 | + | 0 | 1 | 0 | 1 | 1 | + | 1 | 0 | 0 | 1 | 1 | + | 1 | 1 | 1 | 1 | 0 | + +-----+-----+-----+-----+-----+ + +x&y = 1 when: both need to be 1 +x|y = 1 when: one or both needs to be 1 +x^y = 1 when: x and y are different + diff --git a/.bin/blog b/.bin/blog new file mode 100755 index 0000000..81bb118 --- /dev/null +++ b/.bin/blog @@ -0,0 +1,80 @@ +#!/bin/sh +. $HOME/.bin/_config + +usage() { + printf 'Usage: %s