Skip to content

Instantly share code, notes, and snippets.

View schams-net's full-sized avatar
:octocat:
always busy like hell.

schams.net schams-net

:octocat:
always busy like hell.
View GitHub Profile
@schams-net
schams-net / UsingAjaxUrl.html
Last active May 25, 2017 03:52 — forked from helhum/UsingAjaxUrl.html
Using TS rendering
{namespace t=Helhum\TyposcriptRendering\ViewHelpers}
<button class="ajax-button" data-ajaxUri="{t:uri.ajaxAction(action: 'foo', controller: 'MyController') -> f:format.htmlentities()}">
Click Me
</button>
<script type="text/javascript">
jQuery.ajax(
jQuery(".ajax-button").data("ajaxuri")
).done(
@schams-net
schams-net / aws_sdk_php.typo3v8.patch
Created July 3, 2017 19:31
Patch to make EXT:aws_sdk_php compatible with TYPO3 version 8.x
--- aws_sdk_php/Contrib/aws-autoloader.php.a 2017-07-03 18:01:54.227378997 +0000
+++ aws_sdk_php/Contrib/aws-autoloader.php.b 2017-06-24 03:18:00.000000000 +0000
@@ -717,13 +717,7 @@
}, true);
require __DIR__ . '/Aws/functions.php';
-if (!function_exists('GuzzleHttp\\uri_template')) {
- require __DIR__ . '/GuzzleHttp/functions.php';
-}
-if (!function_exists('GuzzleHttp\\Psr7\\str')) {
@schams-net
schams-net / typo3v10.extensionmanager.patch
Created October 14, 2020 23:45
TYPO3 v10 Extension Manager: import all extensions
--- a/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php 2020-10-15 00:00:00.000000000 +0000
+++ b/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php 2020-10-15 00:00:00.000000000 +0000
@@ -180,7 +180,7 @@
// within TYPO3 Core.
// For TYPO3 v11.0, this date could be set to 2018-10-02 (v9 LTS release).
// Also see https://decisions.typo3.org/t/reduce-size-of-extension-manager-db-table/329/
- $this->minimumDateToImport = strtotime('2017-04-04T00:00:00+00:00');
+ $this->minimumDateToImport = 0;
}
@schams-net
schams-net / argon2.sh
Created November 20, 2021 22:55
Set a new BE user password (Argon2-hashed)
#!/bin/bash
RANDOM_PASSWORD=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w16 | head -n1)
ARGON2_PASSWORD=$(php -r "echo password_hash('${RANDOM_PASSWORD}', PASSWORD_ARGON2I, ['memory_cost' => 64000, 'time_cost' => 30, 'threads' => 4]);")
echo -e "Password:\t${RANDOM_PASSWORD}\nArgon2 Hash:\t${ARGON2_PASSWORD}"
mysql -e "UPDATE be_users SET password = '${ARGON2_PASSWORD}' WHERE uid = 1"
mysql -e "SELECT uid, username, password FROM be_users WHERE uid = 1"