Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
@jpmschuler
jpmschuler / README.md
Last active September 8, 2023 06:23
SSL cert expiry and chain check

Purpose: check cert expiry and cert chain issues

Note: domains.txt needs emptyline at end of file

Example output:

059 days of validity left for https://www.google.com, chain fine (issued by GTS CA 1C3)
046 days of validity left for https://www.typo3.org, chain fine (issued by R3)
Next expiry in 46 days
everything fine
@jonaseberle
jonaseberle / logrotate.py
Created October 4, 2021 10:13
Python logrotate
#! /usr/bin/env python
import sys
import logging.handlers
try:
logfile = sys.argv[1]
except:
print("param 1: logfile")
sys.exit(1)
@bnf
bnf / Makefile
Last active April 20, 2022 14:13
Makefile wrapper for TYPO3 core Gruntfile – location: Build/Makefile
.PHONY: assets css js install help watch build
HAS_DDEV_CONFIG=$(if $(wildcard ../.ddev/config.yaml),1)
IS_IN_DDEV_CONTAINER=${IS_DDEV_PROJECT}
# Generate "ddev exec" prefix if ddev is configured and not running inside the ddev container
COMMAND_PREFIX=$(if $(HAS_DDEV_CONFIG),$(if $(IS_IN_DDEV_CONTAINER),,(ddev exec -s web true >/dev/null || ddev start) && ddev exec -s web -d /var/www/html/Build))
YARN=$(COMMAND_PREFIX) yarn
GRUNT=$(COMMAND_PREFIX) node_modules/.bin/grunt
<?php
namespace MyVendor\MyPackage\Service;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
/**
* Use in ext_localconf.php with ExtensionManagementUtility::addTypoScript()
@xperseguers
xperseguers / README.md
Last active March 23, 2024 18:21
Create composer patch from a pending TYPO3 patch on Gerrit

Following structure is expected for your TYPO3 project (adapt script if it differs):

.
├── composer.json
├── composer.lock
├── patches
│   ├── ...
│   └── ...
└── scripts
@htuscher
htuscher / worker.conf
Created January 14, 2021 18:15
The entrypoint of `webdevops/php-nginx:7.4` allows to start a different entrypoint script. The default starts the supervisord but we can switch to a worker.
# Copy this file to /opt/docker/etc/supervisor.d/worker.conf
[group:worker]
programs=queue-worker
priority=25
[program:queue-worker]
command = /app/bin/console messenger:consume default --time-limit=180 -vv
user = application
process_name=%(program_name)s
@spoonerWeb
spoonerWeb / AddCategoriesToFile.php
Created August 7, 2020 10:18
Add category records to TYPO3 file record (e.g. for using it when fetching files via DataProcessing)
<?php
namespace Vendor\Package\EventListener;
/*
* This file is part of a TYPO3 extension.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
@ohader
ohader / .htaccess
Last active June 2, 2021 22:15
Apache HTML, SVG, PHP restricted handlers
# Additions to existing Apache's .htaccess rules
# Security: Enforce file types matching at end of filename only
# see https://docs.typo3.org/m/typo3/reference-coreapi/10.4/en-us/Security/GuidelinesAdministrators/Index.html#file-extension-handling
# see https://httpd.apache.org/docs/2.4/mod/mod_mime.html#multipleext
<IfModule mod_mime.c>
RemoveType .html .htm
<FilesMatch ".+\.html?$">
AddType text/html .html
AddType text/html .htm
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@islander
islander / cronlist.sh
Last active March 31, 2021 11:53 — forked from Zitrax/cronlist.sh
Script to list all cron events on a system - found on stackoverflow.com: http://bit.ly/nkFwD9 Modified from original to list /etc/anacron jobs
#!/bin/bash
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
ANACRONTAB='/etc/anacrontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")