This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Modified from https://gist.github.com/yuanying/3aa7d59dcce65470804ab43def646ab6. | |
IMAGE="ubuntu:20.04" | |
COMMAND="/bin/bash" | |
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]') | |
usage_exit() { | |
echo "Usage: $0 [-n namespace] [-c command] [-i image] PVC ..." 1>&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib.auth import SESSION_KEY | |
from django.core.cache import cache | |
from django.utils.functional import SimpleLazyObject | |
from django.contrib.auth.signals import user_logged_out | |
from django.contrib.auth import get_user_model | |
from django.db.models.signals import post_save, post_delete | |
from functools import partial | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (C) 2021 Bas Stottelaar <[email protected]> | |
License: Beerware | |
Disclaimer: use at your own risk | |
Usage: | |
- Install dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS collectd_metrics ( | |
time TIMESTAMPTZ NOT NULL, | |
plugin TEXT, | |
plugin_instance TEXT, | |
type_instance TEXT, | |
type TEXT, | |
host TEXT, | |
metric TEXT, | |
value DOUBLE PRECISION | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Plugin for collectd to fetch Fail2ban statistics per jail. | |
Recreated, but based on the original source code by Antti Jaakkola | |
(https://github.com/annttu/collectd-plugins). | |
To add this plugin to collectd, create a definition as below: | |
```python | |
LoadPlugin python |
OlderNewer