Skip to content

Instantly share code, notes, and snippets.

@tfeuerst
tfeuerst / .Renovate configuration example.md
Created November 18, 2024 09:04 — forked from tehplague/.Renovate configuration example.md
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.
@tfeuerst
tfeuerst / Backend.js
Created November 16, 2022 08:13 — forked from vkemeter/Backend.js
Add Custom TCA Field (for Simple Informations in the Backend e.g.)
// location: EXT:theme/Resources/Public/JavaScript/Backend.js
// depending on https://gist.github.com/vkemeter/92e0c11eba014399e68cbd1fa95f7738#file-complexinformation-php-L56
define([
'jquery',
'TYPO3/CMS/Backend/Modal',
'TYPO3/CMS/Backend/ActionButton/ImmediateAction',
'TYPO3/CMS/Backend/Notification',
'TYPO3/CMS/Core/Event/RegularEvent'
], function ($, Modal, ImmediateAction, Notification, RegularEvent) {
<?php
declare(strict_types=1);
namespace Vendor\Sitepackage\DataProcessing;
use Doctrine\DBAL\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction;
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
@tfeuerst
tfeuerst / swiperinit.html
Created March 2, 2022 07:16 — forked from pavelblednov/swiperinit.html
Swiper Initialization with data attributes
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Swiper demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1">
<!-- Link Swiper's CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.5.0/css/swiper.min.css">
@tfeuerst
tfeuerst / downloadAction.php
Created February 3, 2021 09:52 — forked from markhowellsmead/downloadAction.php
TYPO3 ExtBase: Force download of a file from a controller action. Example will force download a file from a folder defined in the TypoScript settings for the extension
/**
* @param string $fileName
* @return void
*/
public function downloadAction($fileName) {
$file = $this->settings['uploadFolder'] . 'uploadedPhotos/' . $fileName;
if(is_file($file)) {
@tfeuerst
tfeuerst / warm_varnish
Created December 10, 2020 09:45 — forked from jaseclamp/warm_varnish
Warm Varnish Cache
#!/bin/bash
# this script will
# a. crawl the designated site X levels deep to generate a urls list
# b. completely purge all urls on the desisgnated varnish servers for the designated url
# c. clear cache on nginx / mod pagespeed for the designated app servers
# d. individually warm all the listed urls on each designated varnish server
# e. rewarm them in case pagespeed sent a purge request
# define some variables
@tfeuerst
tfeuerst / background.js
Created May 19, 2020 10:06 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@tfeuerst
tfeuerst / wget--crawl.sh
Created November 19, 2019 13:08 — forked from steveosoule/wget--crawl.sh
Wget - Options & Sample Crawler
#!/bin/sh
# wget --mirror --adjust-extension --page-requisites --execute robots=off --wait=30 --rand om-wait --convert-links --user-agent=Mozilla http://www.example.com
### V1
# wget \
# --recursive \
# --no-clobber \
# --page-requisites \
# --html-extension \
@tfeuerst
tfeuerst / default.conf
Created November 22, 2017 07:33 — forked from cbmd/default.conf
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";
@tfeuerst
tfeuerst / 4ffd0b928327fe8b8edcadb94bedc2dc.html
Created November 22, 2017 07:33 — forked from pricejn2/4ffd0b928327fe8b8edcadb94bedc2dc.html
responsive ad unit with revive ad server
<div id="revive-responsive-top" style="display: block; text-align: center;">
<script type="text/javascript">
adUnit = document.getElementById("revive-responsive-top");
adWidth = adUnit.offsetWidth;
if ( adWidth >= 728 ) {
/* Leaderboard 728x90 */
adUnit.innerHTML = '<ins data-revive-zoneid="3" data-revive-id="4689b54ec658f530f3250f4124e7f1ea"></ins>';
} else {