mysqldump -d --skip-triggers --skip-events --skip-routines {database} > structure.sqlmysqldump -t --fields-enclosed-by='"' --fields-escaped-by='\' --fields-terminated-by='\n' --lines-terminated-by='\n' --tab {absoluteTargetDir} {database}| <?php | |
| declare(strict_types=1); | |
| namespace MyVendor\MyPackage\Install; | |
| use Netresearch\RteCKEditorImage\Database\RteImagesDbHook; | |
| use Symfony\Contracts\Service\Attribute\Required; | |
| use TYPO3\CMS\Backend\Resource\PublicUrlPrefixer; | |
| use TYPO3\CMS\Core\Core\Bootstrap; |
| import * as path from 'node:path'; | |
| import * as fs from "node:fs"; | |
| const ViteWebpackManifest = () => { | |
| let base = '' | |
| return { | |
| configResolved(config) { | |
| // Remove leading "/" from base URL | |
| base = config.base.replace(/^\//, '') |
| <?php | |
| declare(strict_types=1); | |
| namespace YourVendor\YourPackage\Form; | |
| use TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable; | |
| use TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface; | |
| use TYPO3\CMS\Form\Domain\Runtime\FormRuntime; |
| ################################################################################### | |
| ### WARNING: This query uses recursion. This requires MySQL 8+ or MariaDB 10.2+ ### | |
| ################################################################################### | |
| # Find the used backend layout for each page, including next level layout from parent pages | |
| WITH RECURSIVE Layout AS ( | |
| SELECT | |
| uid, | |
| pid, | |
| slug, |
| # Copy this file into to playbook or your role's tasks directory | |
| # and include it with | |
| # - name: Generate SSH key pair for root {your-user-name-here} | |
| # include_tasks: ./ssh_key_pair.yaml | |
| # vars: | |
| # user: {your-user-name-here} | |
| # type: {ssh-key-type} # defaults to `rsa` | |
| # | |
| # Arguments: | |
| # - user: The user name you want to generate a key pair for (required) |
| <?php | |
| $dbConfig = [ | |
| 'host' => 'localhost', | |
| 'database' => '', | |
| 'user' => '', | |
| 'password' => '' | |
| ]; | |
| if (file_exists($_SERVER['HOME'] . '/.my.cnf')) { | |
| // If `.my.cnf` exists in PHP home directory, parse it with sections |
| #!/usr/bin/env bash | |
| # Takes stdin as message and prepends timestamp and severity and writes it into the given log file | |
| function log() { | |
| file=$1 | |
| severity=$2 | |
| while read text | |
| do | |
| LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") | |
| touch $file |
| #!/bin/sh | |
| # This script is meant to be user with docker images from https://hub.docker.com/r/webcoastdk/composer/tags | |
| # | |
| # It mounts the current working directory into /build in the container and calls the given command. | |
| # Additionally the current users `.ssh` and `.composer` directory are also mounted to give access to composer cache | |
| # and SSH known hosts | |
| # | |
| # On hosts with MacOS the SSH agent is started inside the container, as it is currently not possible to mount the SSH | |
| # authentication agent socket into the container. | |
| # On other hosts (mainly Linux) the current `$SSH_AUTH_SOCK` is mounted to `/ssh-agent` and the environment variable |
| // Sometimes it is helpful/necessary to create a promise, that delays the execution. | |
| // This snippet returns a promise, that is resolved after a given timeout. | |
| // The `min` and `max` arguments are used to calcuate a random delay in the range between `min` and `max` | |
| let delay = (min, max) => { | |
| return new Promise(resolve => { | |
| setTimeout(resolve, Math.random() * (max - min) + min) | |
| }) | |
| } | |
| // In your actual code you use it as follows: |