Skip to content

Instantly share code, notes, and snippets.

View tehlers's full-sized avatar

Thorsten Ehlers tehlers

View GitHub Profile
@tehlers
tehlers / delete-old-mails.py
Created April 7, 2017 18:38
Delete old mails from a directory with folders in the maildir format.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Delete old mails from a directory with folders in the maildir format.
This script is intended to be used on a directory that contains mails managed by offlineimap.
Since offlineimap only provides the means to download mails of a maximal age but doesn't remove
them once they have been downloaded and became outdated, this script fills the void and removes
any mail exceeding a given age.
@tehlers
tehlers / gradle.sh
Created May 27, 2015 07:42
This script will execute the Gradle wrapper, if it is available in the current or a parent directory. Otherwise it will fall back to start the Gradle version found in $PATH. The intended way to use this script is as an alias for 'gradle'.
#! /usr/bin/env bash
#
# This script will execute the Gradle wrapper, if it is available in the current
# or a parent directory. Otherwise it will fall back to start the Gradle version
# found in $PATH.
#
# The intended way to use this script is as an alias for 'gradle'.
#