A package intended for usage during development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Located in sitepackage/Classes/Hook/DataHandlerHook.php | |
declare(strict_types=1); | |
namespace Acme\AcmeSitepackage\Hook; | |
use TYPO3\CMS\Core\Database\ConnectionPool; | |
use TYPO3\CMS\Core\DataHandling\DataHandler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Mirror page (infinite recursion), download assets as well, add html extension to pagelinks, make links relative, wait one second after each request to avoid hitting rate limits, identify as archive crawler | |
wget --mirror --page-requisites --adjust-extension --convert-links --wait=1 --user-agent="Archive Crawler" https://www.example.com | |
### maybe you want/need to turn off checks for robots.txt as well: `--execute robots=off` | |
### Watch out for relative/absolute links, with or without www. Crawling »www.example.com«, but all links point to »example.com« will cause wget to mirror the first page URL ony, and not follow any more links. | |
### To allow multipe domains use `--span-hosts --domains=example.com,www.example.com,cdn.example.com` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
// composer require swiftmailer/swiftmailer | |
require_once 'vendor/autoload.php'; | |
// Create the Transport |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Download/Update php-version-pickup | |
git: | |
repo: https://github.com/webit-de/php-version-pickup.git | |
dest: /home/{{ username }}/.php-version-pickup | |
clone: yes | |
update: yes | |
- name: Source script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "pixelbrackes/php-version-pickup", | |
"description": "Set a PHP version used in a shell session through a `.php-version` file", | |
"type": "project", | |
"license": "GPL-2.0-or-later" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
echo 'Password: ' . PHP_EOL; | |
fscanf(STDIN, '%s', $password); | |
$passwordHash = password_hash($password, PASSWORD_ARGON2I); | |
echo 'Hash: ' . PHP_EOL; | |
echo $passwordHash . PHP_EOL; | |
$result = password_verify($password, $passwordHash); |
Using the PPA ondrej/php it is possible to run multiple PHP version on one system.
All single versions are useable on the CLI, e.g. php7.4 --version
. The command php
will point to the default version.
- Generate GitHub Access Token: https://github.com/settings/tokens
- Generate GitLab Access Token: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
For a single project:
- Run
composer config github-oauth.github.com
orcomposer config gitlab-token.gitlab.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Valid till: <span class="datetime" data-datetime="2017-02-21 17:00">2017-02-21 17:00 (GMT)</span> | |
<script> | |
// Given: Date and time in UTC timezone and international format | |
// Returned: Date and time in local timezone and international format | |
// Note: Returning localised date formats is not possible in JavaScript | |
// without the help of a library like moment.js! | |
// Extend date object with format method |
NewerOlder