Skip to content

Instantly share code, notes, and snippets.

View clonejo's full-sized avatar

Feiko Nanninga clonejo

  • Aachen / Leer, Germany
View GitHub Profile
bch2_dev_in_fs() Split brain detected between /dev/sdb3 and /dev/sdc3:
/dev/sdc3 believes seq of /dev/sdb3 to be 70, but /dev/sdb3 has 71
Not using /dev/sdb3
bch2_dev_in_fs() Split brain detected between /dev/sda3 and /dev/sdc3:
/dev/sdc3 believes seq of /dev/sda3 to be 70, but /dev/sda3 has 71
Not using /dev/sda3
bch2_dev_in_fs() Split brain detected between /dev/nvme0n1p2 and /dev/sdc3:
/dev/sdc3 believes seq of /dev/nvme0n1p2 to be 70, but /dev/nvme0n1p2 has 71
Not using /dev/nvme0n1p2
bch2_dev_in_fs() Split brain detected between /dev/sde3 and /dev/sdc3:
`--> GPGBINARY=gpg2 pytest -k test_scan_keys -s
=============================================== test session starts ===============================================
platform linux -- Python 3.10.9, pytest-7.2.1, pluggy-1.0.0
rootdir: /home/clonejo/code/python-gnupg
plugins: flake8-1.1.1, enabler-2.0.0, cov-4.0.0, black-0.3.12, mypy-0.10.3, checkdocs-2.7.1
collected 41 items / 38 deselected / 3 selected
test_gnupg.py gpg2 --status-fd 2 --no-tty --no-verbose --fixed-list-mode --batch --with-colons --homedir /tmp/keys-lp13e6kv --version
gpg2 --status-fd 2 --no-tty --no-verbose --fixed-list-mode --batch --with-colons --homedir /tmp/keys-lp13e6kv --debug-quick-random --dry-run --import-options import-show --import /tmp/pygpg-test-7nblxwbl
gpg: keybox '/tmp/keys-lp13e6kv/pubring.kbx' created
@clonejo
clonejo / restic-backup
Last active October 25, 2021 21:40
My scripts for automated restic backups
#!/bin/bash
set -eu
if [[ ${1:-} != "-f" ]]; then
if ! ip route | head -n 1 | grep --quiet 'dev en' ; then
echo "Not connected to Ethernet, skipping backup." >&2
exit 0
fi
ac=$(cat /sys/class/power_supply/AC/online)
@clonejo
clonejo / gist:d282812e5ca662b7e594d8938ff2ec5d
Last active February 15, 2020 23:08
Zahlen alphabetisch / Numbers in alphabetical order
./zahlen-alphabetisch 0 100 0
In order
========
0) null 4 zero 4
1) eins 4 one 3
2) zwei 4 two 3
3) drei 4 three 5
4) vier 4 four 4
5) fünf 4 five 4
6) sechs 5 six 3
$ ./spaceapi-stats
Total spaces: 154 100.0%
url 154 100.0%
space 154 100.0%
logo 154 100.0%
api 154 100.0%
state.open 144 93.5%
location.lon 144 93.5%
location.lat 144 93.5%

Keybase proof

I hereby claim:

  • I am clonejo on github.
  • I am clonejo (https://keybase.io/clonejo) on keybase.
  • I have a public key whose fingerprint is CF43 B6EE 1D53 D2BD A01B BEE1 D8B8 1FDC 9310 A684

To claim this, I am signing this object:

#!/usr/bin/python3
from datetime import datetime
import json
import requests
import sys
# TODO: locally check first if we are in the correct wifi network (WLANonICE)
try:
{{! Our format string: }}
{{{ entry_a }}}
{{{ entry_a2 }}}
{{{ entry_b }}}
{{^ entry_b }}
some value
{{/entry_b}}
- and some static stuff
================ BARTENDER-SNIP ================
@clonejo
clonejo / .Xdefaults
Last active September 20, 2016 19:20
dotfiles
! vim: set filetype=xdefaults :
*foreground: #D7D0C7
*background: #151515
!
!black
! *color0: #AF875F
! *color8: #AF875F
*color0: #101010
*color8: #606060
!red
@clonejo
clonejo / podcast-feed-generator.py
Created August 24, 2016 19:49
Generates an XML feed file for a directory of media files. Next you could serve the directory with a web server, subscribe to the feed in your podcatcher and download episodes.
#!/usr/bin/python3
from pathlib import Path
import urllib.parse
def walk_tree(path):
for f in path.iterdir():
if f.is_dir():
yield from walk_tree(f)
else: