dot

packages and services management
Log | Files | Refs | README

commit 0fd09c5b22b07a535693bfef6265d95fb9b248f6
parent 2ed044f616c6aea4ceb87ca5ebb143bd0171779c
Author: Josuah Demangeon <mail@josuah.net>
Date:   Mon, 19 Feb 2018 00:00:34 +0100

removed unused scripts

Diffstat:
Dbin/adagio | 234-------------------------------------------------------------------------------
Dbin/collectd-ploot | 33---------------------------------
Mbin/piano | 9++++-----
Dbin/plot | 42------------------------------------------
Mbin/tls | 6+++---
5 files changed, 7 insertions(+), 317 deletions(-)

diff --git a/bin/adagio b/bin/adagio @@ -1,234 +0,0 @@ -#!/bin/sh -# Albinoni, Adagio fog G minor adapted to 'beep' - -# notes frequencies - -C0=16 Cd0=17 Db0=17 D0=18 Dd0=19 Eb0=19 E0=21 F0=22 Fd0=23 -Gb0=23 G0=25 Gd0=26 Ab0=26 A0=28 Ad0=29 Bb0=29 B0=31 -C1=33 Cd1=35 Db1=35 D1=37 Dd1=39 Eb1=39 E1=41 F1=44 Fd1=46 -Gb1=46 G1=49 Gd1=52 Ab1=52 A1=55 Ad1=58 Bb1=58 B1=62 -C2=65 Cd2=69 Db2=69 D2=73 Dd2=78 Eb2=78 E2=82 F2=87 Fd2=93 -Gb2=93 G2=98 Gd2=104 Ab2=104 A2=110 Ad2=117 Bb2=117 B2=123 -C3=131 Cd3=139 Db3=139 D3=147 Dd3=156 Eb3=156 E3=165 F3=175 Fd3=185 -Gb3=185 G3=196 Gd3=208 Ab3=208 A3=220 Ad3=233 Bb3=233 B3=247 -C4=262 Cd4=277 Db4=277 D4=294 Dd4=311 Eb4=311 E4=330 F4=349 Fd4=370 -Gb4=370 G4=392 Gd4=415 Ab4=415 A4=440 Ad4=466 Bb4=466 B4=494 -C5=523 Cd5=554 Db5=554 D5=587 Dd5=622 Eb5=622 E5=659 F5=698 Fd5=740 -Gb5=740 G5=784 Gd5=831 Ab5=831 A5=880 Ad5=932 Bb5=932 B5=988 -C6=1047 Cd6=1109 Db6=1109 D6=1175 Dd6=1245 Eb6=1245 E6=1319 F6=1397 Fd6=1480 -Gb6=1480 G6=1568 Gd6=1661 Ab6=1661 A6=1760 Ad6=1865 Bb6=1865 B6=1976 -C7=2093 Cd7=2217 Db7=2217 D7=2349 Dd7=2489 Eb7=2489 E7=2637 F7=2794 Fd7=2960 -Gb7=2960 G7=3136 Gd7=3322 Ab7=3322 A7=3520 Ad7=3729 Bb7=3729 B7=3951 -C8=4186 Cd8=4435 Db8=4435 D8=4699 Dd8=4978 Eb8=4978 E8=5274 F8=5588 Fd8=5920 -Gb8=5920 G8=6272 Gd8=6645 Ab8=6645 A8=7040 Ad8=7459 Bb8=7459 B8=7902 - -# music score - -# with $n the note from above, and $d the duration in millisecond. -# Use '1' for silent note. - -# 4:3 in the original score, but here, full mesure is 12. 6 mesure per line. -# In addition, some "interpretation" are added, as in a performance. - -# | | | | | | -n="$n $G3 $G3 $A3 $Ad3 $G3 " -d="$d 36 2 2 26 6 " -# | | | | | | -n="$n $G3 $A3 $Ad3 $C4 " -d="$d 36 2 2 56 " -# | | | | | | -n="$n $G3 $A3 $Ad3 $A3 $Ad3 " -d="$d 6 6 2 2 38 " -# | | | | | | -n="$n $G3 $A3 $G3 $A3 $G3 $Fd3 $G3 " -d="$d 6 2 2 12 4 4 36 " -# | | | | | | - -# | | | | | | -n="$n $D4 $C4 $Ad3 $A3 $G3 $G3 $Fd3 " -d="$d 12 8 4 8 4 24 12 " -# | | | | | | -n="$n $Dd4 $D4 $C4 $Ad3 $A3 $A3 $G3 " -d="$d 12 8 4 8 4 24 12 " -# | | | | | | -n="$n $G4 $F4 $G4 $Dd4 $F4 $D4 $Dd4 " -d="$d 12 6 6 4 4 4 36 " -# | | | | | | -n="$n $F4 $Dd4 $F4 $D4 $Dd4 $C4 $D4 " -d="$d 12 6 6 4 4 4 36 " -# | | | | | | -n="$n $Dd4 $D4 $Dd4 $C4 $D4 $Ad4 $C4 " -d="$d 12 6 6 4 4 4 36 " -# | | | | | | -n="$n $D4 $Dd4 1 $D4 1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3 4 4 3 4 5 6 7 8 16 4" -# -n="$n 1 $G4 $Gd4 $G4 $Fd4 $G4 $F4 $Dd4 $D4 $Dd4 $F4 $Dd4 $D4 $Dd4 $D4 $D4 $C4 $B3 $C4 1" -d="$d 4 8 7 6 5 4 3 3 3 3 4 4 3 4 5 6 7 8 16 4" -# -n="$n 1 $G3 $C4 $Dd4 $G4 $C5 $Dd5 $C5 $G4 $Dd4 $G4 $C5 $Dd5 $G5 $C6 $G5 $Dd5 $C5 $Dd5 $G5 $C6 $Dd6 $C6 $G5 $Dd5 $C5 $Dd5 $G5 $C6 $Dd6 1" -d="$d 4 8 7 6 5 4 3 3 2 2 2 2 2 2 2 2 2 2 3 3 2 2 2 3 4 5 6 7 10 9 7" -# | | | | | | | -n="$n $C4 $D4 $Dd4 $Dd4 $D4 $F4 $Dd4 $Dd4 $D4 $D4 $C4 $B3 $C4 $B3 $C4 $D4 $C4 $C4 1" -d="$d 6 6 4 5 4 4 4 4 4 4 5 6 6 2 2 16 4 24 12" -# | | | | | | | - -# | | | | | | -n="$n $C4 $C4 $D4 $Dd4 $C4 " -d="$d 36 2 2 26 6 " -# | | | | | | -n="$n $C4 $D4 $Dd4 $F4 " -d="$d 36 2 2 56 " -# | | | | | | -n="$n $C4 $D4 $Dd4 $D4 $Dd4 " -d="$d 6 6 2 2 38 " -# | | | | | | -n="$n $C4 $D4 $C4 $D4 $C4 $B3 $C4 " -d="$d 6 2 2 12 4 4 36 " -# | | | | | | - -# | | | | | | -n="$n $G4 $F4 $Dd4 $D4 $C4 $C4 $B3 " -d="$d 12 8 4 8 4 24 12 " -# | | | | | | -n="$n $Gd4 $G4 $F4 $Dd4 $D4 $D4 $C4 " -d="$d 12 8 4 8 4 24 12 " -# | | | | | | -n="$n $C6 $Ad4 $C6 $Gd4 $Ad4 $G4 $Gd4 " -d="$d 12 6 6 4 4 4 36 " -# | | | | | | -n="$n $Ad4 $Gd4 $Ad4 $G4 $Gd4 $F4 $G4 " -d="$d 12 6 6 4 4 4 36 " -# | | | | | | - -# | | | | | | -n="$n $F4 $A3 $Ad3 $C4 $Ad3 $F4 $D4 $Ad3 " -d="$d 20 4 10 2 20 4 10 2 " -# | | | | | | -n="$n $Ad3 $A3 $Ad3 $C4 $Ad3 " -d="$d 20 4 10 2 32 " -# | | | | | | -n="$n $Ad4 $A4 $G4 $F4 $Dd4 $D4 $C4 $Ad3 $G3 $G4 " -d="$d 20 3 3 3 3 3 3 6 12 12 " -# | | | | | | -n="$n $Dd4 $C4 $Ad3 $Gd3 $F4 $D4 $Ad3 $Gd3 $Gd3 $G3 " -d="$d 4 4 20 16 12 4 4 4 12 12 " -# | | | | | | -n="$n 1 $Dd4 $Ad3 $G3 $F3 $G3 $Gd3 1 " -d="$d 8 4 11 3 24 11 5 22 " -# | | | | | | -n="$n $G3 1 $G3" -d="$d 36 30 6 " -# | | | | | | -n="$n $Fd4 $G4 $Gd4 1 $Gd4 $Ad4 $C5 1 $Ad4 $Gd4 $G4 1 $G4" -d="$d 6 6 12 12 2 2 4 8 2 3 21 1 6" -# | | | | | | -n="$n $Fd4 $G4 $Gd4 1 $Gd4 $Ad4 $C5 1 $Ad4 $Gd4 $G4 1" -d="$d 6 6 12 12 2 2 4 8 2 3 21 6" -# | | | | | | - -# | | | | | | -n="$n $C5 $D5 $Dd5 $D5 $C5 $B4 $C5 1 $Ad4 " -d="$d 6 6 7 5 5 6 6 13 24 " -# | | | | | | -n="$n $Ad4 $C5 $Cd5 1 $C5 $Ad4 $Gd4 $F4 $Gd4 $C5 $G4 $Dd4" -d="$d 1 1 4 4 1 2 18 6 8 4 24 6 " -# | | | | | | -n="$n $G4 $C5 $F4 $F4 $G4 $Gd4 1 $G4 $F4 $Dd4 " -d="$d 8 4 24 1 1 4 4 1 2 24 " -# | | | | | | -n="$n $Dd4 $F4 $G4 1 $F4 $Dd4 $D4 $D4 $Dd4 $F4 1 $Dd4 $D4 $C4 " -d="$d 1 1 4 4 1 2 24 1 1 4 4 1 3 24 " -# | | | | | | - -# This passage has 5 mesure per hypermeasure, hence the sum should be near 48. -# -n="$n $C5 $D5 $Dd5 " -d="$d 1 1 46 " -# | | | | | | -n="$n $C5 $D5 $Dd5 " -d="$d 1 1 46 " -# | | | | | | -n="$n $C5 $D5 $Dd5 1 $Dd5 $D5 $D5 " -d="$d 1 1 10 8 4 12 24 " -# | | | | | | | -n="$n $F5 1 $F5 $Dd5 $D5 $C5 " -d="$d 12 8 4 1 11 24 " -# | | | | | | | -n="$n $G5 1 $G5 $G5 $F5 " -d="$d 12 8 4 12 24 " -# | | | | | | | -n="$n $Dd5 1 $Dd5 $Dd5 $Cd5 " -d="$d 12 8 4 12 24 " -# | | | | | | | -n="$n $D5 " -d="$d 36 " -# | | | | | | | -n="$n $A5 1 $A5 $A5 $G5 " -d="$d 12 8 4 12 24 " -# | | | | | | | -n="$n $F5 1 $F5 $F5 $Dd5 " -d="$d 12 8 4 12 24 " -# | | | | | | | -n="$n $Ad4 1 $Ad4 $Ad4 $Ad4 " -d="$d 12 8 4 32 4 " -# | | | | | | | -n="$n $A4 $Ad4 $C5 " -d="$d 2 2 44 " -# | | | | | | | -n="$n $Ad4 $A4 $Ad4 " -d="$d 2 2 44 " -# | | | | | | -n="$n $A4 $G4 $A4 " -d="$d 2 2 38 " -# | | | | | | -n="$n $G4 $Fd4 $G4 " -d="$d 5 6 44 " -# | | | | | | - -# -n="$n $G4 $Ad4 $D5 $G5 $Ad5 $G5 $D5 $Ad4 $D5 $G5 $Ad5 $G5 $Ad5 $D6 $G6 " -d="$d 8 7 6 5 4 4 4 4 5 6 7 7 8 10 24 " -# - -main() -{ - printf '%s' "$d" | sed -re 's/^ *//' -e 's/ *$//' -e 's/ +/\n/g' | - for note in $n - do - read duration - kill -9 "$pid" - speaker-test -t sine -f $note & pid="$!" - sleep "$(busybox dc "$duration" 10 / f)" - done -} - -main "$@" diff --git a/bin/collectd-ploot b/bin/collectd-ploot @@ -1,33 +0,0 @@ -#!/bin/sh -e - -# usage: collectd-ploot <collectd-dir> <target-dir> - -for host in "$1"/* -do - { - printf '\n' - - sed '1 d; s/,/ /' \ - "$host/cpu/percent-idle-$(date +%Y-%m-%d)" | - ploot -o 900 -t 'cpu idle %' - - sed '1 d; s/,/ /' \ - "$host/cpu/percent-user-$(date +%Y-%m-%d)" | - ploot -o 900 -t 'cpu user %' - - sed '1 d; s/,/ /' \ - "$host/cpu/percent-system-$(date +%Y-%m-%d)" | - ploot -o 900 -t 'cpu system %' - - sed '1 d; s/,/ /' \ - "$host/cpu/percent-interrupt-$(date +%Y-%m-%d)" | - ploot -o 900 -t 'cpu interrupt %' - - sed '1 d; s/,/ /g' \ - "$host/load/load-relative-$(date +%Y-%m-%d)" | - cut -d' ' -f1-2 | ploot -o 900 -t 'load average' - - printf '\n' - - } > "$2/$(basename "$host")" -done diff --git a/bin/piano b/bin/piano @@ -1,7 +1,6 @@ -#!/bin/sh -# console piano using speaker-test +#!/usr/bin/awk -f -SPEAKER_TEST='speaker-test -t sine' +# console piano using speaker-test # _________________________________________________________________________ # | | | | | | | | | | | | | | | | | | | | | | | | | @@ -56,9 +55,9 @@ SPEAKER_TEST='speaker-test -t sine' # |Ctrl |Super |Alt |Space |Alt Gr|Opt |Ctrl | # |______|______|______|_______________________________|______|_____|_____| -awk -v SPEAKER_TEST="$SPEAKER_TEST" ' - BEGIN { + SPEAKER_TEST = "speaker-test -t sine" + qwerty = "zsxdcvgbhnjm,l.;/" "q2w3er5t6y7ui9o0p[=]"; QWERTY = "ZSXDCVGBHNJM<L>:/" "Q@W#ER%T^Y&UI(O)P{+}"; qwerty = qwerty QWERTY; diff --git a/bin/plot b/bin/plot @@ -1,42 +0,0 @@ -#!/bin/sh - -awk ' - -BEGIN { - if (ARGC != 3 || ARGV[1] != "-h") { - print "usage: plot -h <height>"; - exit(1); - } - height = ARGV[2] + ARGV[2] % 2; - ARGC = 0; -} - -{ - x_max = split($0, dots); - for (x = 1; x <= x_max; x++) { - if (skip[x] = (dots[x] == "?")) - dots[x] = 0; - if (y_max < dots[x]) - y_max = dots[x]; - } - y_step = y_max / height; - if (y_step <= 0) - y_step = 1; - float = y_step < 1; - margin = length(y_max) > 15 ? length(y_max) : 15; - for (y = height * y_step * 2; y >= 0; y -= y_step * 2) { - if (num = !num) { - if (float) printf("%" margin ".2f _|", y); - else printf("%" margin "d _|", y); - } else printf("%" margin "s |", ""); - for (x = 1; x <= x_max; x++) - printf("%s", (dots[x] > y + y_step ? ":" : \ - dots[x] > y ? "." : " ")); - print(""); - } - printf("%" margin "s0 +", ""); - for (x = 1; x <= x_max; x++) - printf("%s", skip[x] ? "x" : "-"); - print("+ " x_max); - print("\n"); -}' "$@" diff --git a/bin/tls b/bin/tls @@ -1,9 +1,9 @@ -#!/bin/sh +#!/bin/sh -ex case "$1" in (update) [ "$#" -eq 2 ] || exec "$0" - set -ex + mkdir -p "$(dirname "$2")" openssl req -x509 -newkey rsa:4096 -days 365 \ -keyout "$2.key" -out "$2.pem" @@ -13,6 +13,6 @@ case "$1" in chmod 444 "$2.dhparams.pem" ;; (*) - echo 'usage: tls <update> <path>' + echo 'usage: tls update <directory>' ;; esac