Skip to content

Instantly share code, notes, and snippets.

@tehplague
tehplague / .Renovate configuration example.md
Last active December 12, 2024 19:21
Renovate example configuration for TYPO3

Example Configuration for Renovate in TYPO3 Projects (as shown at #T3CRR24)

This Gist provides an example configuration for Renovate, designed to automate updates in TYPO3 projects.
Note: This configuration is a starting point and should be adjusted to fit your specific requirements. The update behavior, in particular, likely has room for improvement depending on your workflow.

Key Assumptions

  1. Git Hosting: The example assumes the use of either GitLab or GitHub for managing TYPO3 projects.
  2. Shared Configuration: A shared GitLab project (gitlab/renovate-config) is used to store general configuration files (.json). This setup allows reusing shared rules across all TYPO3 projects.
  3. Project-Specific Configuration: The renovate.json file must reside in the TYPO3 project repository you wish to update. This file references the shared configuration and defines project-specific overrides.
@tehplague
tehplague / certbot-renew.sh
Last active September 30, 2023 11:37
Automatic Let's Encrypt certificate issuance for QNAP QTS. You need to have Container Station installed to have Docker available.
#!/bin/sh
DOMAIN=nas.domain.tld
[email protected]
BASEDIR=$(dirname $0)
test -d ${BASEDIR}/etc/letsencrypt || mkdir -p ${BASEDIR}/etc/letsencrypt
test -d ${BASEDIR}/var/log/letsencrypt || mkdir -p ${BASEDIR}/var/log/letsencrypt
docker run --rm -v "$(pwd)/etc/letsencrypt:/etc/letsencrypt" -v "$(pwd)/var/log/letsencrypt:/var/log/letsencrypt" certbot/dns-digitalocean:latest certonly -n --agree-tos -m ${CA_EMAIL} --dns-digitalocean --dns-digitalocean-credentials /etc/letsencrypt/digitalocean.ini --dns-digitalocean-propagation-seconds 60 -d ${DOMAIN}
@tehplague
tehplague / purge-old-kernels
Created December 15, 2015 15:29
purge-old-kernels - Script to remove all but the last n kernel packages from a Debian/Ubuntu system
#!/bin/sh
#
# purge-old-kernels - remove old kernel packages
# Copyright (C) 2012 Dustin Kirkland <[email protected]>
#
# Authors: Dustin Kirkland <[email protected]>
# Kees Cook <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@tehplague
tehplague / fs.php
Created May 29, 2013 08:30
Some PHP filesystem benchmarks
<?php
clearstatcache();
$t1 = (double)microtime(true);
for ($i = 0; $i < 100000; ++$i) {
$result = file_exists('/tmp') && is_writable('/tmp');
}
$t2 = (double)microtime(true);
echo sprintf('file_exists + is_writable: %f' . PHP_EOL, ($t2 - $t1));