Compare commits

..

No commits in common. "89790fdd10b854c93e2af14b021bd8723181b1d3" and "5d7deb24d70d48092f4014b0becc816d2fdd07e4" have entirely different histories.

9 changed files with 26 additions and 61 deletions

View file

@ -72,7 +72,7 @@ Version 2019-11-04 2021-02-16"
(defun xf/org-journal-current () (defun xf/org-journal-current ()
(interactive) (interactive)
(org-journal-open-current-journal-file) (org-journal-open-current-journal-file)
;(goto-char (point-max)) (goto-char (point-max))
) )
;; rebing C-u - https://emacs.stackexchange.com/a/58320 ;; rebing C-u - https://emacs.stackexchange.com/a/58320
@ -923,7 +923,7 @@ Version 2019-11-04 2021-02-16"
(add-to-list 'auto-mode-alist '("\\.jrnl\\'" . org-mode)) (add-to-list 'auto-mode-alist '("\\.jrnl\\'" . org-mode))
(add-to-list 'auto-mode-alist '("\\.el##" . emacs-lisp-mode)) (add-to-list 'auto-mode-alist '("\\.el##" . emacs-lisp-mode))
(add-to-list 'auto-mode-alist `(,(getenv "CONFIG_SHELLS") . sh-mode)) ;(add-to-list 'auto-mode-alist `(,(getenv "CONFIG_SHELLS") . sh-mode))
;(add-to-list 'auto-mode-alist `(,(getenv "CONFIG_ZSH") . sh-mode)) ;(add-to-list 'auto-mode-alist `(,(getenv "CONFIG_ZSH") . sh-mode))
(add-to-list 'auto-mode-alist `("\\.local/bin" . sh-mode)) (add-to-list 'auto-mode-alist `("\\.local/bin" . sh-mode))

View file

@ -4,17 +4,15 @@
\header { \header {
title = "${1:`(upcase-initials (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`}" title = "${1:`(upcase-initials (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`}"
%%subtitle = "" %%subtitle = ""
%%composer = "Janek Fischer" composer = "Janek Fischer"
arranger = "Janek Fischer"
} }
\version "2.24.1" \version "2.22.2"
\score { \score {
<< <<
\time 4/4 \time 4/4
%%% Chords %%% Chords
\new ChordNames { \new ChordNames {
\set chordChanges = ##t \set chordChanges = ##t
\set majorSevenSymbol = \markup { maj7 }
\chordmode { \chordmode {
c,,1\p c,,1\p
} }

View file

@ -2,8 +2,8 @@
# Check the first file against all other ones given and print duplicates. # Check the first file against all other ones given and print duplicates.
# Checks first size then diff. # Checks first size then diff.
# TODO diff initial bytes # TODO diff initial bytes
if test $# -lt 2 if ! test $# -lt 2
then echo "Need at least 2 files to compare!" >&2 then echo "Need at least 2 files to compare!" 2>/dev/null
exit 2 exit 2
fi fi
target="$1" target="$1"

View file

@ -3,22 +3,13 @@
# which exist elsewhere as listed by locate. # which exist elsewhere as listed by locate.
# Args: [threshold (MB)] <filepaths...> # Args: [threshold (MB)] <filepaths...>
# OptDepends: synct (for checking against original filename) # OptDepends: synct (for checking against original filename)
while test $# -gt 0; do case $1 in ([0-9]|[0-9][0-9]) threshold=$1; shift;; esac
case "$1" in find "$@" -size +${threshold:-50}M -type f -exec sh -c "IFS=$'\n'"'
([0-9]|[0-9][0-9]) threshold=$1;; filepath="{}"
(-n) noscan=$1;; target="$(synct-unarchive "$filepath" || echo "$filepath")"
(-v) verbose=$1; set -x;; highlight "$filepath"
(*) break;; for existing in $(locate -b "$target")
esac do test -n "$(dupcheck "$target" "$existing") &&
shift echo "Duplicate found at $existing"
done rm -vi "$filepath" && break
test "$noscan" || "Updating Locate Database..." && sudo updatedb
find "$@" -size +${threshold:-50}M -type f -exec sh -c "IFS=$'\n'; verbose='$verbose'"'
target="$(synct-unarchive "{}" || echo "{}")"
highlight "{}"
for existing in $(locate -b "$(basename "$target")")
do test "$verbose" && echo "Checking $existing against {}"
test -n "$(dupcheck "{}" "$existing")" &&
echo "Duplicate found at $existing" &&
rm -vi "{}" && break
done' \; done' \;

View file

@ -1,3 +0,0 @@
#!/bin/sh -e
cd /mnt/nas
find -mindepth 1 -maxdepth 1 -exec mount {} \;

View file

@ -5,5 +5,4 @@ pkill --echo --ignore-case discord
pkill --echo signal pkill --echo signal
pkill --echo aw-server pkill --echo aw-server
pkill --echo aw-qt pkill --echo aw-qt
systemctl stop --user syncthing plasma-baloorunner kde-baloo systemctl stop --user syncthing plasma-baloorunner kde-baloo openvpn-client@deltaPeak.service
systemctl stop openvpn-client@deltaPeak.service

View file

@ -1,7 +1,6 @@
#!/bin/sh -ex #!/bin/sh -ex
test "$1" = "-q" && quiet=$1 && shift test "$1" = "-q" && quiet=$1 && shift
case "$1" in ([0-9]) page=$1; shift;; esac test ! -r "$1" && echo "Usage: sign <document.pdf> [hoffset (-160) [voffset (-310) [scale [signature-image]]]]" && exit 1
test ! -r "$1" && echo "Usage: sign [page] <document.pdf> [hoffset (-160) [voffset (-310) [scale [signature-image]]]]" && exit 1
signature=$(pass info/signature$(test -n "$5" && echo "-$5") || echo "$5") signature=$(pass info/signature$(test -n "$5" && echo "-$5") || echo "$5")
@ -23,18 +22,15 @@ fi
export TEXMF="" export TEXMF=""
pdfjam $quiet "$signature" --outfile "$sig" --papersize "{595pt, 842pt}" --noautoscale true \ pdfjam $quiet "$signature" --outfile "$sig" --papersize "{595pt, 842pt}" --noautoscale true \
--offset "${h}pt ${v}pt" --scale "${4:-1}" --offset "${h}pt ${v}pt" --scale "${4:-1}"
pdfjam $quiet "$1" ${page:-last} "$sig" --outfile "$tmp_signed" --delta "0 -842pt" --nup "1x2" --fitpaper true pdfjam $quiet "$1" last "$sig" --outfile "$tmp_signed" --delta "0 -842pt" --nup "1x2" --fitpaper true
# TODO consider pdftk stamp # TODO consider pdftk stamp
timg "$tmp_signed" timg "$tmp_signed"
# https://apple.stackexchange.com/questions/198854/shell-command-to-count-pages-in-a-pdf-other-than-pdftk # https://apple.stackexchange.com/questions/198854/shell-command-to-count-pages-in-a-pdf-other-than-pdftk
if test "$page" if test "$(pdftk "$1" dump_data | grep Pages | cut -d' ' -f2)" -gt 1
then pdfjam $quiet "$1" 1-$(expr $page - 1) "$tmp_signed" 1 "$1" $(expr $page + 1)-last --outfile "$result" then
elif test "$(pdftk "$1" dump_data | grep Pages | cut -d' ' -f2)" -gt 1
then
pdfjam $quiet "$1" last-1 --outfile "$tmp_reversed" pdfjam $quiet "$1" last-1 --outfile "$tmp_reversed"
pdfjam $quiet "$tmp_reversed" last-2 "$tmp_signed" --outfile "$result" pdfjam $quiet "$tmp_reversed" last-2 "$tmp_signed" --outfile "$result"
else cp "$tmp_signed" "$result" else cp "$tmp_signed" "$result"
fi fi

View file

@ -1,2 +0,0 @@
#!/bin/sh
convert -background white -density 500 "$@" "$1.png"

View file

@ -2,32 +2,18 @@
# Update an Easy2Boot USB Stick after adding ISOs # Update an Easy2Boot USB Stick after adding ISOs
# Call with Linux ISOs to be copied as args # Call with Linux ISOs to be copied as args
# Need to be around E2B mountpoint if it is not the default # Need to be around E2B mountpoint if it is not the default
if ! dir="$(find . "${MNT:-${XDG_RUNTIME_DIR}/mnt}" -maxdepth 3 -name _ISO -type d | grep --max-count 1 .)" if ! dir="$(find . "${MNT:-${XDG_RUNTIME_DIR}/mnt}" -maxdepth 3 -name _ISO -type d | grep .)"
then echo "Please mount your multiboot stick first!" then echo "Please mount your multiboot stick first!"
exit 1 exit 1
fi fi
cmd=cp cmd=mv
case $1 in case $1 in
(-upgrade) upgrade=$2; shift 2;;
(-cp) cmd=cp; shift;; (-cp) cmd=cp; shift;;
(-mv) cmd=mv; shift;;
esac esac
test $# -eq 0 || $cmd -vi "$@" "$dir/LINUX" test $# -eq 0 || $cmd -vi "$@" "$dir/LINUX"
find "$dir" -type f -iname "*32-*.iso" -exec mv -vi {} {}def32 \; find "$dir" -type f -iname "*32-*.iso" -exec mv -vi {} {}def32 \;
find "$dir" -type f -name "*.iso" -exec mv -vi {} {}def64 \; find "$dir" -type f -name "*.iso" -exec mv -vi {} {}def64 \;
mountdir="$(dirname "$dir")" drive=$(mount | grep "$(dirname "$dir")" | cut -d' ' -f1)
drive=$(mount | grep "$mountdir" | cut -d' ' -f1) sudo umount $drive
sudo umount "$drive" sudo udefrag $drive
if test "$upgrade"; then
echo "Do you want to reformat $drive as NTFS? (Ctrl-C to abort)"
read
mkfs -t ntfs "$drive"
ntfslabel "$drive" "E2B"
sudo mount "$drive" "$mountdir"
unzip "$upgrade" -d "$mountdir"
touch -v "$dir/nodelay.txt"
cp -v /mnt/nas/media/iso/utilities/*.iso "$dir/UTILITIES"
else
sudo udefrag -m "$drive"
fi