From 5913fc67b4719cec87cdc5b6d5cb077381fc521a Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 29 Jun 2015 21:21:58 +0200 Subject: [PATCH 1/3] add gpg-sync-keys --- gpg-sync-keys | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 gpg-sync-keys diff --git a/gpg-sync-keys b/gpg-sync-keys new file mode 100755 index 0000000..89eb3fc --- /dev/null +++ b/gpg-sync-keys @@ -0,0 +1,23 @@ +#!/bin/sh +# sync gpg public keys between localhost and the specified hosts +# +# gpg-sync-keys host1 [host2 ...] +# + +#GPG="gpg -q --batch" +GPG=gpg + +hosts=$@ + +for host in $hosts; do + echo "Importing from $host ..." + ssh -C $host $GPG --export | $GPG --import +done + +#echo "Refreshing keys ..." +#$GPG --refresh-keys + +for host in $hosts; do + echo "Exporting to $host ..." + $GPG --export | ssh -C $host $GPG --import +done From 9273822038541ad21a2d01102892bc7c86b9c4ed Mon Sep 17 00:00:00 2001 From: neingeist Date: Mon, 29 Jun 2015 21:30:37 +0200 Subject: [PATCH 2/3] add crontab-suggest --- crontab-suggest | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 crontab-suggest diff --git a/crontab-suggest b/crontab-suggest new file mode 100755 index 0000000..c45bf00 --- /dev/null +++ b/crontab-suggest @@ -0,0 +1,17 @@ +#!/bin/bash +# suggest a random time for a cronjob + +set -u +set -e + +hour=$((($RANDOM*24)/32768)) +minute=$((($RANDOM*60)/32768)) +dow="*" + +if [ $# -gt 0 ]; then + if [ "$1" == "-w" ]; then + dow=$((($RANDOM*7)/32768)) + fi +fi + +printf "%02i %02i * * %s\n" "$minute" "$hour" "$dow" From eaef668c0ff7cd5433dccb4ee45fba87e1e7d97e Mon Sep 17 00:00:00 2001 From: neingeist Date: Wed, 1 Jul 2015 06:51:42 +0200 Subject: [PATCH 3/3] find-junk: add ~/.cache/tracker to list of junk directories --- find-junk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/find-junk b/find-junk index f714cf0..4416799 100755 --- a/find-junk +++ b/find-junk @@ -14,7 +14,8 @@ M = 1024*1024 def junk_dirs(): """Return directories which potentially contain junk""" - for d in ['~/tmp', '~/.local/share/Trash', '~/rpmbuild', '~/RPM']: + for d in ['~/tmp', '~/.local/share/Trash', '~/rpmbuild', '~/RPM', + '~/.cache/tracker']: d = os.path.expanduser(d) if os.path.exists(d): yield d