From 574db704cc3908964bee9aecbfa7c83a32aa6770 Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 13 Oct 2022 20:24:45 +0200 Subject: [PATCH] packaging --- README.md | 2 +- docs/notes.sh | 13 +++++++++++++ scripts/copyparty-repack.sh | 2 +- scripts/make-sfx.sh | 18 ++++++++++++------ scripts/rls.sh | 11 +++++------ 5 files changed, 32 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 95c61d4e..c3be7dac 100644 --- a/README.md +++ b/README.md @@ -1399,7 +1399,7 @@ first grab the web-dependencies from a previous sfx (assuming you don't need to ```sh rm -rf copyparty/web/deps curl -L https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py >x.py -python3 x.py -h +python3 x.py --version rm x.py mv /tmp/pe-copyparty/copyparty/web/deps/ copyparty/web/deps/ ``` diff --git a/docs/notes.sh b/docs/notes.sh index b1ee4374..f3a2232c 100644 --- a/docs/notes.sh +++ b/docs/notes.sh @@ -67,6 +67,7 @@ mkdir -p "${dirs[@]}" for dir in "${dirs[@]}"; do for fn in ふが "$(printf \\xed\\x93)" 'qw,er;ty%20as df?gh+jkl%zxc&vbn "rty'"'"'uio&asd fgh'; do echo "$dir" > "$dir/$fn.html"; done; done # qw er+ty%20ui%%20opdf&gh&jk#zx'cv"bn`m=qw*er^ty?ui@op,as.df-gh_jk + ## ## upload mojibake @@ -143,6 +144,17 @@ sqlite3 -readonly up2k.db.key-full 'select w, v from mt where k = "key" order by sqlite3 -readonly up2k.db.key-full 'select w, v from mt where k = "key" order by w' > k1; sqlite3 -readonly up2k.db 'select mt.w, mt.v, up.rd, up.fn from mt inner join up on mt.w = substr(up.w,1,16) where mt.k = "key" order by up.rd, up.fn' > k2; ok=0; ng=0; while IFS='|' read w k2 path; do k1="$(grep -E "^$w" k1 | sed -r 's/.*\|//')"; [ "$k1" = "$k2" ] && ok=$((ok+1)) || { ng=$((ng+1)); printf '%3s %3s %s\n' "$k1" "$k2" "$path"; }; done < <(cat k2); echo "match $ok diff $ng" +## +## scanning for exceptions + +cd /dev/shm +journalctl -aS '720 hour ago' -t python3 -o with-unit --utc | cut -d\ -f2,6- > cpp.log +tac cpp.log | awk '/RuntimeError: generator ignored GeneratorExit/{n=1} n{n--;if(n==0)print} 1' | grep 'generator ignored GeneratorExit' -C7 | head -n 100 +awk '/Exception ignored in: : |Exception|Traceback + + ## ## tracking bitflips @@ -168,6 +180,7 @@ printf ' %s [%s]\n' $h2 "$(grep -F $h2 /dev/null +$f$s.py --version >/dev/null [ $parallel -gt 1 ] && { printf '\033[%s' s 2r H "0;1;37;44mbruteforcing sfx size -- press enter to terminate" K u "7m $* " K $'27m\n' @@ -44,9 +43,9 @@ $f.py -h >/dev/null for ((a=0; a<$parallel; a++)); do while [ -e .sfx-run ]; do CSN=sfx$a ./make-sfx.sh re "$@" - sz=$(wc -c <$f$a.py | awk '{print$1}') + sz=$(wc -c <$f$a$s.py | awk '{print$1}') [ $sz -ge $min ] && continue - mv $f$a.py $f.py.$sz + mv $f$a$s.py $f$s.py.$sz min=$sz done & done @@ -55,7 +54,7 @@ $f.py -h >/dev/null } while true; do - mv $f.py $f.$(wc -c <$f.py | awk '{print$1}').py + mv $f$s.py $f$s.$(wc -c <$f$s.py | awk '{print$1}').py ./make-sfx.sh re "$@" done