Merge branch 'master' of waschsauger:git/dirty-helpers

master
neingeist 10 years ago
commit f7ab634d8b

@ -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"

@ -14,7 +14,8 @@ M = 1024*1024
def junk_dirs(): def junk_dirs():
"""Return directories which potentially contain junk""" """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) d = os.path.expanduser(d)
if os.path.exists(d): if os.path.exists(d):
yield d yield d

@ -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
Loading…
Cancel
Save