Skip to content

Instantly share code, notes, and snippets.

View garbast's full-sized avatar

Sebastian Fischer garbast

View GitHub Profile
# Delete all duplicate sys_file_records, where one and the same sys_file UID
# is related to the same tt_content record
DELETE t_orig
FROM sys_file_reference t_orig
INNER JOIN sys_file_reference t_copy
WHERE t_orig.tablenames='tt_content'
AND t_orig.fieldname='image'
AND t_orig.deleted=0
AND t_copy.tablenames='tt_content'
AND t_copy.fieldname='image'
@helhum
helhum / CacheWarmingFrontend.php
Created March 22, 2019 15:01
TYPO3 Cache Warming
<?php
declare(strict_types=1);
namespace Helhum\SitePackage\Cache\Frontend;
use TYPO3\CMS\Core\Cache\Backend\BackendInterface;
use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Http\ServerRequestFactory;
class CacheWarmingFrontend extends VariableFrontend
@spoonerWeb
spoonerWeb / .gitlab-ci.yml
Last active March 15, 2024 08:15
GitLab CI for building and deploying TYPO3 websites with deployer
cache:
paths:
- /cache/composer
stages:
- composer
- deploy
build:
stage: composer
@makasim
makasim / docker-compose.yml
Last active January 1, 2024 11:24
Secure Docker Registry with Traefik and LetsEncrypt
version: '3.1'
services:
registry:
restart: always
image: registry:2
volumes:
- registry:/var/lib/registry
environment:
- REGISTRY_HTTP_ADDR=0.0.0.0:5000
@mueslo
mueslo / ddns_ud.sh
Last active July 22, 2023 11:31
Dynamic A-Record DNS Updater for united-domains.de (OpenWRT/LEDE)
#!/bin/sh
# requires: wget, ca-certificates, grep
#rm /tmp/cookies.txt
cookiefile="/tmp/cookies.txt"
#domain should contain "domain_id-record_id"
domain_id=$(echo $domain | tr "-" "\n" | sed -n "1p")
record_id=$(echo $domain | tr "-" "\n" | sed -n "2p")
@ipedrazas
ipedrazas / gist:2c93f6e74737d1f8a791
Created September 18, 2014 22:13
List Docker Container Names and IPs
function drips(){
docker ps -q | xargs -n 1 docker inspect --format '{{ .NetworkSettings.IPAddress }} {{ .Name }}' | sed 's/ \// /'
}
@helhum
helhum / .htaccess
Created May 7, 2014 16:05
Hosting your own Fluid XSD schemas
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* /index.php [L]