Skip to content

Instantly share code, notes, and snippets.

Brutus brutus

Block or report user

Report or block brutus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am brutus on github.
  • I am brutusdmc ( on keybase.
  • I have a public key ASCBMtJBtbl2Og0T9r1A_vpvQze_cV7-GVtmlX7RNnNAPAo

To claim this, I am signing this object:

brutus /
Created Aug 23, 2018
scan trough qmail queue
for i in $( \
${base_path}/bin/qmail-qread \
| grep -Po '#\d+' \
| cut -c2-
); do
brutus / misc-backup.automount
Created Jul 24, 2018
systemd automount NFS partitions and icinga disk check
View misc-backup.automount
# /etc/systemd/system/misc-backup.automount
Description=Automount for NFS backup share from ''
brutus / Makefile
Created Aug 16, 2017
Makefile for Python projects
View Makefile
# Python Project
# Some targets to lint your code, run tests, builds and do some cleanup.
# Works fine with tox and Travis, etc.
# This setup assumes that you take care of the virtual environment setup
# yourself and that the needed requirements are installed. And also that
# you configure your tools. So edit your own `setup.cfg` or `.tox.ini`
# with the settings needed for the tools.
brutus /
Created Jun 30, 2017
Converts the collation and character set of a database using a Django migration.
Converts the *collation* and *character set* of a database using a Django
migration. Data in the tables is converted if needed.
from django.db import migrations
def get_conversion_function(collation, character_set='utf8'):
Calculates checksums like those used in the German *Ausweisnummer*.
The Algorithm
1. Take each character of the input and translate it to a token: integers are
taken as is, some chars are ignored others are translated (A10Z35).
brutus /
Last active Jun 16, 2017
Pipeline class to collect items using Scrapy
This pipeline collects yielded items to process them after a crawl finishes.
For each yielded item :meth:`process_item` is calledand handles the storing
of items for later use. After all items are yielded, :meth:`close_spider` is
called and assembles the data from the previously collected items
(:meth:`assemble_collection`) and dumps the results (:meth:`dump_collection`).
brutus /
Created May 17, 2017
Collection of invoke tasks to test `dry` setting.
Quick check for `dry` / `ignore_dry` args to ``run``.
An ``invoke undry dry`` should result in::
[undry] Hello World!
[undry] Hello other World!
echo '[isdry] Hello World!'
[isdry] Hello other World!
brutus /
Last active Jul 3, 2017
A very basic Ansible module for toast.
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
Ansible module to interact with `toast`_.
To use this from Ansible, copy it in your `library`_::
cd path/to/library
git clone toast
brutus /
Created Oct 1, 2015
Mutagen MP3 Image Error
def add_image(
filenames, image_path, description='Cover', img_type=3, encoding=3
Adds an image to MP3 from *filenames*.
filenames (lits): paths to the MP3
image_path (string): path to image file
You can’t perform that action at this time.