From e2bfa49144d1f2f6c39eabf4988c50e4aed1aae0 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 9 Sep 2022 15:39:04 +0200 Subject: [PATCH] -git: checkout: +--ignore-other-worktrees - It corrupts other worktrees. --- .bashrc | 1 - .gdbinit | 10 ++++ .mailcap | 4 ++ .muttrc | 1 + .muttrc-gpg.rc | 73 -------------------------- .screenrc | 26 ++++++++++ bin/engine-di.fm | 15 +++--- bin/exx | 2 + bin/kernel/kernelkkfix | 4 +- bin/taillog | 2 +- public_html/cgi-bin/idnes-foto | 64 ++++++++++++++++++++++- src/OOo-LiveCD.ks | 115 ++++------------------------------------- src/OOo-LiveCD.sh | 110 +++++++++++++++++++++++++++++---------- 13 files changed, 208 insertions(+), 219 deletions(-) create mode 100644 .mailcap diff --git a/.bashrc b/.bashrc index 2bd97fb..0a78130 100644 --- a/.bashrc +++ b/.bashrc @@ -394,7 +394,6 @@ function rpmsrclist } function yumupdate {(ulimit -v unlimited;yum makecache;yum -y --skip-broken update "$@";);} function gitcommit { git commit -a --allow-empty-message -m '' "$@"; } -function git {(unset git;if [ "$1" = "checkout" ];then shift;git checkout --ignore-other-worktrees "$@";else git "$@";fi)} function gpg {(unset gpg; http_proxy= all_proxy= HTTP_PROXY= ALL_PROXY= gpg "$@"; );} function swap() {( set -ex;local TMPFILE=tmp.$$;[ $# = 2 ] && mv "$1" $TMPFILE && mv "$2" "$1" && mv $TMPFILE "$2" && echo done )} alias gthumb='rm -rf ~/.cache/thumbnails/fail/;gthumb' diff --git a/.gdbinit b/.gdbinit index 613d134..6d168c4 100644 --- a/.gdbinit +++ b/.gdbinit @@ -1,3 +1,13 @@ +add-auto-load-safe-path ~/src/stock +add-auto-load-safe-path ~/src/interview/.gdbinit +add-auto-load-safe-path ~/src/interview/asan/*-gdb.gdb +add-auto-load-safe-path ~/src/toptal.com-codility.com/.gdbinit +add-auto-load-safe-path ~/src/toptal.com-codility.com/asan/*-gdb.gdb +define bt + disable frame-filter all + backtrace +end + set break pending on set style enabled off # See .bashrc: export GDBHISTFILE="$HOME/.gdb_history" diff --git a/.mailcap b/.mailcap new file mode 100644 index 0000000..ad4dd1d --- /dev/null +++ b/.mailcap @@ -0,0 +1,4 @@ +# https://unix.stackexchange.com/a/42714/296319 +#text/html; (cp -p '%s' /tmp/$$.html\;chromium-freeworld /tmp/$$.html 2>/dev/null\;rm /tmp/$$.html)&; test=test -n "$DISPLAY"; needsterminal; +text/html; chromium-freeworld '%s' 2>/dev/null &; test=test -n "$DISPLAY"; nametemplate=%s.html; needsterminal; +text/html; lynx -dump $(: -width=$COLUMNS ) %s; nametemplate=%s.html; copiousoutput; diff --git a/.muttrc b/.muttrc index 09b4501..74da566 100644 --- a/.muttrc +++ b/.muttrc @@ -17,3 +17,4 @@ alias archer archer@sourceware.org alias binutils binutils@sourceware.org alias gccpat gcc-patches@gcc.gnu.org alias steph Marie Stephanie Kratochvilova +alias jacob Thomas Jacob diff --git a/.muttrc-gpg.rc b/.muttrc-gpg.rc index aee3df2..e69de29 100644 --- a/.muttrc-gpg.rc +++ b/.muttrc-gpg.rc @@ -1,73 +0,0 @@ -# -*-muttrc-*- -# -# Command formats for gpg. -# -# This version uses gpg-2comp from -# http://muppet.faveve.uni-stuttgart.de/~gero/gpg-2comp.tar.gz -# -# $Id$ -# -# %p The empty string when no passphrase is needed, -# the string "PGPPASSFD=0" if one is needed. -# -# This is mostly used in conditional % sequences. -# -# %f Most PGP commands operate on a single file or a file -# containing a message. %f expands to this file's name. -# -# %s When verifying signatures, there is another temporary file -# containing the detached signature. %s expands to this -# file's name. -# -# %a In "signing" contexts, this expands to the value of the -# configuration variable $pgp_sign_as. You probably need to -# use this within a conditional % sequence. -# -# %r In many contexts, mutt passes key IDs to pgp. %r expands to -# a list of key IDs. - -# decode application/pgp -set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f" - -# verify a pgp/mime signature -set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f" - -# decrypt a pgp/mime attachment -set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f" - -# create a pgp/mime signed attachment -# set pgp_sign_command="gpg-2comp --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" -set pgp_sign_command="gpg --no-verbose --compress-algo 1 --cipher-algo cast5 --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f" - -# create a application/pgp signed (old-style) message -# set pgp_clearsign_command="gpg-2comp --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" -set pgp_clearsign_command="gpg --no-verbose --compress-algo 1 --cipher-algo cast5 --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f" - -# create a pgp/mime encrypted attachment -# set pgp_encrypt_only_command="pgpewrap gpg-2comp -v --batch --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f" -set pgp_encrypt_only_command="pgpewrap gpg -v --compress-algo 1 --cipher-algo cast5 --batch --output - --encrypt --textmode --armor -- -r %r -- %f" -# --always-trust - -# create a pgp/mime encrypted and signed attachment -# set pgp_encrypt_sign_command="pgpewrap gpg-2comp --passphrase-fd 0 -v --batch --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f" -set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 -v --compress-algo 1 --cipher-algo cast5 --batch --textmode --output - --encrypt --sign %?a?-u %a? --armor -- -r %r -- %f" -# --always-trust - -# import a key into the public key ring -set pgp_import_command="gpg --no-verbose --import -v %f" - -# export a key from the public key ring -set pgp_export_command="gpg --no-verbose --export --armor %r" - -# verify a key -set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r" - -# read in the public key ring -set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" - -# read in the secret key ring -set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" - -# receive key from keyserver: -#set pgp_getkeys_command="wrap.sh -g %r" -set pgp_getkeys_command="" diff --git a/.screenrc b/.screenrc index a2a56d1..359a9a5 100644 --- a/.screenrc +++ b/.screenrc @@ -150,3 +150,29 @@ bindkey -d -k kb stuff \010 # bind + resize +1 # bind - resize -1 # bind _ resize max + +# jankratochvil: +bindkey -t \033OP select 1 +bindkey -t \033OQ select 2 +bindkey -t \033OR select 3 +bindkey -t \033OS select 4 +bindkey -t \033[15~ select 5 +bindkey -t \033[17~ select 6 +bindkey -t \033[18~ select 7 +bindkey -t \033[19~ select 8 +bindkey -t \033[20~ select 9 +bindkey -t \033[21~ select 10 +bindkey -t \033[23~ select 11 +bindkey -t \033[24~ select 12 +bindkey -t \033O2P select 13 +bindkey -t \033O2Q select 14 +bindkey -t \033O2R select 15 +bindkey -t \033O2S select 16 +bindkey -t \033[15;2~ select 17 +bindkey -t \033[17;2~ select 18 +bindkey -t \033[18;2~ select 19 +bindkey -t \033[19;2~ select 20 +bindkey -t \033[20;2~ select 21 +bindkey -t \033[21;2~ select 22 +bindkey -t \033[23;2~ select 23 +bindkey -t \033[24;2~ select 24 diff --git a/bin/engine-di.fm b/bin/engine-di.fm index 45a9968..8cefb64 100755 --- a/bin/engine-di.fm +++ b/bin/engine-di.fm @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id$ +# $Id: engine-di.fm,v 1.7 2008/05/08 09:08:23 lace Exp $ use strict; use warnings; @@ -84,14 +84,15 @@ if ("build" eq ($ARGV[0]||"")) { my($site,$page)=@_; my @newdashed; - while ($page=~m{"((?:http://www.'$site')?([^":]*(?" if m{[^-a-zA-Z 0-9/:.@=]}; } for @list; + do { die "[$&] <$_>" if m{[^-a-zA-Z 0-9/:.@=_?]}; } for @list; system {"bash"} "bash","-c",join(" ",@list); exit 0 if $?; } diff --git a/bin/exx b/bin/exx index 97f021b..8994599 100755 --- a/bin/exx +++ b/bin/exx @@ -14,6 +14,8 @@ use constant FORMATS=>{ "rpm" =>'rpm2cpio $pathname|cpio -id --quiet', #-v #FIXME: --sparse doesn't work, why? "zip" =>'unzip -Lq $pathname', "jar" =>'unzip -Lq $pathname', + "xpi" =>'unzip -Lq $pathname', + "crx" =>'unzip -Lq $pathname', "a" =>'ar x $pathname', "deb" =>'ar x $pathname;' .'for i in *.tar.gz;do j=`basename $i .tar.gz`;mkdir -p $j;cd $j;tar xzf ../$i;cd ..;rm -f $i;done', diff --git a/bin/kernel/kernelkkfix b/bin/kernel/kernelkkfix index 1bf168a..e6d03c2 100755 --- a/bin/kernel/kernelkkfix +++ b/bin/kernel/kernelkkfix @@ -1,8 +1,8 @@ #! /bin/bash # -# $Id$ +# $Id: kernelkkfix,v 1.2 2005/05/12 10:21:26 short Exp $ # -# Subst $Id$ -> $Id$ (as in cvs ... -kk) in all the subdirectories. +# Subst $Id: kernelkkfix,v 1.2 2005/05/12 10:21:26 short Exp $ -> $Id: kernelkkfix,v 1.2 2005/05/12 10:21:26 short Exp $ (as in cvs ... -kk) in all the subdirectories. # Required for proper diffing of CVSed Linux kernel sourcetrees. diff --git a/bin/taillog b/bin/taillog index b58d0e0..f6a48e6 100755 --- a/bin/taillog +++ b/bin/taillog @@ -1,2 +1,2 @@ #! /bin/bash -tail -fn0 `(file $(find /var/log -name ntpstats -prune -o -type f -print)|grep -v 'data$'|sed 's/:.*//'|grep -v '^\(/var/log/squid/store.log\|/var/log/acpid\|/var/log/btmp\|/var/log/maillog\)$';echo "$*"|tr ' ' '\n')|sort -u` # |grep -v ': bio too big device md3 (248 > 240)$' +tail -fn0 $(file $(find /var/log $(cat ~/.taillog.addon 2>/dev/null) -name ntpstats -prune -o -type f -print)|grep -v 'data$'|sed 's/:.*//'|grep -v '^/var/log/squid/store.log$\|/.tmp$\|[.]gz$') "$@" diff --git a/public_html/cgi-bin/idnes-foto b/public_html/cgi-bin/idnes-foto index 2cd8e73..6ead9ce 100755 --- a/public_html/cgi-bin/idnes-foto +++ b/public_html/cgi-bin/idnes-foto @@ -41,7 +41,30 @@ print <<"EOH"; EOH -$BASE=~m{^http://\w+\Q.idnes.cz/foto.asp?\E(?:r=[-_\w]+&c=[-_\w]+|c=[-_\w]+&r=[-_\w]+)$} or $BASE=""; +$BASE=~m{^http://\w+\Q.idnes.cz/foto.asp\Ex?[?](?:r=[-_\w]+&c=[-_\w]+|c=[-_\w]+&r=[-_\w]+)$} or $BASE=""; + + +my $ua=LWP::UserAgent->new(); +$ua->env_proxy(); +$ua->requests_redirectable([]); + +#sub webget($) +#{ +# my($url)=@_; +# +# my $resp=$ua->get($url); +# if ($resp->is_redirect()) { +# my $relurl=$resp->header("Location"); +# $relurl=~m{^foto.*[?]} or die; +# $url=~s{[^/]*$}{}; +# $url.=$relurl; +# warn "Redirect to: $url\n"; +# $resp=$ua->get($url); +# } +# $resp->is_success() or die $url; +# return $resp->decoded_content(); +#} + if ($BASE) { my $pageno=1; my %seen; @@ -50,7 +73,43 @@ PAGES: for (;;) { my $pageurl=$BASE.'&strana='.$pageno; my $page=LWP::Simple::get($pageurl) or die $pageurl; my $did=0; - while ($page=~m{"&]*(?:&inframe=1)?)"(?: target="foto-iframe")?>}gi) { + my $relurl=$1; + $relurl=~s{&}{&}g; + my $frameurl=$BASE; + $frameurl=~s{[?].*}{}; + $frameurl.=$relurl; + my $frame=LWP::Simple::get($frameurl) or die $frameurl; + if ($frame=~m{