Skip to content

Instantly share code, notes, and snippets.

View barend's full-sized avatar
☀️

Barend Garvelink barend

☀️
View GitHub Profile
@barend
barend / logging.py
Created October 26, 2020 09:44
Configure Python logging with ISO-8601 format and UTC time
import logging
from time import gmtime
# https://stackoverflow.com/a/7517430/49489
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s.%(msecs)03dZ [%(name)s] %(message)s",
datefmt="%Y-%m-%dT%H:%M:%S",
)
logging.Formatter.converter = gmtime
@barend
barend / gup
Created January 22, 2021 12:23
Update all git repositories under PWD or $1
#!/bin/bash
# Update all git repositories under PWD or $1
# Assumes basic `git clone` usage; may not work for more elaborate git layouts.
BASEDIR="${1:-.}"
SSH_KEY_NAME="..." # some distinguishing string from your ssh-add -l output
SSH_KEY_FILE="..." # the filename of your SSH key
if ssh-add -l | grep -F -q $SSH_KEY_NAME; then
@barend
barend / keybase.md
Created April 29, 2021 06:35
keybase.md

Keybase proof

I hereby claim:

  • I am barend on github.
  • I am barend (https://keybase.io/barend) on keybase.
  • I have a public key ASCB83tj3TtNwDtix1P2-b41Qt-_scb4bUKbw-XGJq5hSAo

To claim this, I am signing this object: