Skip to content

Instantly share code, notes, and snippets.

@moschlar
moschlar / git-daemon
Created August 4, 2015 06:19
systemd-unit for git-daemon
# conf.d file for git-daemon
#
# Please check man 1 git-daemon for more information about the options
# git-daemon accepts. You MUST edit this to include your repositories you wish
# to serve.
#
# Some of the meaningful options are:
# --syslog --- Enables syslog logging
# --verbose --- Enables verbose logging
# --export-all --- Exports all repositories
# -*- coding: utf-8 -*-
'''
Attributes need to be declared in SHIBBOLETH_ATTRIBUTE_MAP:
SHIBBOLETH_ATTRIBUTE_MAP = {
...
"affiliation": (False, "affiliation"),
"groups": (False, "groups"),
}
$ grep ku3oghahghiv7aeC -r /fsapp/seafile_data/storage/blocks/9a06f3f8-1beb-4ee1-a83b-da7b2074cd4a/
/fsapp/seafile_data/storage/blocks/9a06f3f8-1beb-4ee1-a83b-da7b2074cd4a/9e/6643d813d6b2910128a5aaa301fca567d82842:ku3oghahghiv7aeC
$ rm /fsapp/seafile_data/storage/blocks/9a06f3f8-1beb-4ee1-a83b-da7b2074cd4a/9e/6643d813d6b2910128a5aaa301fca567d82842
$ sudo -u seafile /opt/seafile/seafile-server-latest/seaf-fsck.sh 9a06f3f8-1beb-4ee1-a83b-da7b2074cd4a
Starting seaf-fsck, please wait ...
[03/09/17 11:33:02] fsck.c(595): Running fsck for repo 9a06f3f8-1beb-4ee1-a83b-da7b2074cd4a.
[03/09/17 11:33:02] fsck.c(422): Checking file system integrity of repo Test(9a06f3f8)...
[03/09/17 11:33:02] fsck.c(97): Block 9a06f3f8-1beb-4ee1-a83b-da7b2074cd4a:9e6643d813d6b2910128a5aaa301fca567d82842 is missing.
@moschlar
moschlar / keybase.md
Created April 17, 2019 09:30
keybase.md

Keybase proof

I hereby claim:

  • I am moschlar on github.
  • I am moschlar (https://keybase.io/moschlar) on keybase.
  • I have a public key ASD13MtUQOwSqumx3aAnuB8GBSyOcUyFJQPMFkXFBCjU8Qo

To claim this, I am signing this object:

@moschlar
moschlar / md-accounts-contact-update.py
Last active April 4, 2023 11:55
Change contact email addresses in Apache httpd mod_md account files
#!/usr/bin/env python3
# TODO: File locking using fcntl.lock
import argparse
import base64
import json
import logging
import pathlib
import acme.client