Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
serverlogarchive.py ... 20200401 Dewey Hylton
enumerates over files in current directory.
if matches server.log.* attempts to create directory,
write compressed version in new directory with
serialized name, then remove original file.
"""
import os, datetime, gzip, shutil
@dehylton
dehylton / swarm-stack-config-secret-update.sh
Created May 11, 2018 20:37
docker stack: safely (?) rotate configs and secrets across all services in a given stack ... WIP
#!/usr/bin/env bash
#DEBUG=1
decho () {
test -n "$DEBUG" && echo DEBUG: $@
}
JQ=`which jq`
TR=`which tr`
COMM=`which comm`
@dehylton
dehylton / config.toml
Created August 27, 2017 20:51
hugo-bootstrap config
baseurl = "http://dblog.redacted/"
languageCode = "en-us"
title = "Dewbert's Blatherings"
author = "Dewey Hylton"
copyright = "Copyright (c) 2017, Dewey Hylton; all rights reserved."
canonifyurls = true
paginate = 3
theme = "hugo-bootstrap"
#disqusShortname = "xxxxxx"
@dehylton
dehylton / fossetup.sh
Created August 6, 2017 20:55
/bin/sh script for setting up projects in fossil
#!/bin/sh
#set -vx
## 2016 / dewey hylton
## wrapper to create/modify fossil repositories
## handles with default documentation, users, etc.
DATADIR="./fossils"
DATADIR="./fossil"
READMEDIR="docs"
READMEMD="${READMEDIR}/README.md"