Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am koehnlein on github.
  • I am koehnlein (https://keybase.io/koehnlein) on keybase.
  • I have a public key whose fingerprint is 5EA7 95BA 7EF4 64BD F1B4 6919 192C 4FED 9B30 67DE

To claim this, I am signing this object:

{
"patches": {
"lavitto/typo3-form-to-database": {
"PHP 8.1 compatibility": "https://gitlab.com/lavitto/typo3-form-to-database/-/merge_requests/34.diff",
"Make console command also executable in scheduler": "https://gitlab.com/lavitto/typo3-form-to-database/-/merge_requests/31.diff"
},
"wapplersystems/shyguy": {
"PHP 8.1": "https://patch-diff.githubusercontent.com/raw/WapplerSystems/Shyguy/pull/5.diff"
},
"evoweb/recaptcha": {
OS Information: Darwin Albrechts-MacBook-Pro.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
User information: uid=501(albrechtkoehnlein) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae),701(com.apple.sharepoint.group.1)
ITEM VALUE
DDEV version v1.18.1
architecture amd64
db drud/ddev-dbserver-mariadb-10.3:20211017_mysql_arm64
dba phpmyadmin:5
ddev-ssh-agent drud/ddev-ssh-agent:v1.18.0
docker 20.10.10
docker-compose v2.1.1
@koehnlein
koehnlein / dbeaver
Last active October 27, 2023 06:49
ddev dbeaver // UPDATE: A better `ddev dbeaver` command is part of DDEV since https://github.com/ddev/ddev/releases/tag/v1.22.4 and nobody should need this snippet from here anymore.
#!/usr/bin/env bash
## Usage: dbeaver
## Description: Open DBeaver and create database connection with the current project
## Example: "ddev dbeaver"
dbeaver -con "name=ddev-${DDEV_PROJECT}|driver=mariadb|database=db|user=root|password=root|host=127.0.0.1|port=${DDEV_HOST_DB_PORT}|openConsole=true"
@koehnlein
koehnlein / ContentElementIdAspect.php
Last active November 21, 2019 09:42
Create and use a simple individual routing aspect "ContentElementIdAspect" to have URLs without cHash parameter. It only validates, if the given value does exist in database. Of course, you can even do some mapping and unmapping to not show the uid in the URL, but replace it with another unique value or combination.
<?php
declare(strict_types=1);
namespace Vendor\MyExample\Routing\Aspect;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Routing\Aspect\StaticMappableAspectInterface;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class ContentElementIdAspect implements StaticMappableAspectInterface
@koehnlein
koehnlein / Redirect.php
Created April 3, 2019 09:37
Redirect configuration for einpraegsam/ipandlanguageredirect
<?php
return [
'actions' => [
[
'referrers' => [
'*',
],
'events' => [
'redirect'
]
@koehnlein
koehnlein / gist:32334c3854cffa7718309cabe338e3d1
Last active March 13, 2019 09:47
Block AdBlock blocker
127.0.0.1 faz-de.faz.net
127.0.0.1 sueddeutsche-de.sueddeutsche.de
127.0.0.1 spiegel-de.spiegel.de
Log opened at 2018-02-19 13:00:09
I: Connecting to configured address/port: docker.for.mac.host.internal:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/vendor/helhum/typo3-console/typo3cms" language="PHP" xdebug:language_version="7.0.12" protocol_version="1.0" appid="56" idekey="PHPSTORM"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
<- feature_set -i 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
<- feature_set -i 2 -n max_depth -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success
@koehnlein
koehnlein / .gitlab-ci.yml
Last active December 1, 2021 15:21
simple deployment based on TYPO3 Surf and Gitlab CI
stages:
- deploy
# use caching
cache:
key: "$CI_BUILD_REF_NAME/$CI_BUILD_STAGE"
paths:
- .caches/
variables: