Skip to content

Instantly share code, notes, and snippets.

View josefglatz's full-sized avatar
👨‍💻

Josef Glatz josefglatz

👨‍💻
View GitHub Profile
@josefglatz
josefglatz / vhost-anonip-directly-before-logging.conf
Created July 9, 2019 19:05
Apache vHost anonip usage example
# ...
CustomLog "|/usr/local/bin/anonip --output /var/log/apache2/www.website.com-access.log" proxy
# ...
@josefglatz
josefglatz / gitlab-ci_checkTYPO3deprecationsInYourExtensionsSnippet.yml
Last active July 8, 2019 05:26
GitLab CI TYPO3 Deprecations Check with latest version usage of Tuurlijk/typo3scan
checkDeprecations:
stage: test
image: edbizarro/gitlab-ci-pipeline-php:7.2
before_script:
- 'which wget || ( sudo apt-get update -y && sudo apt-get install wget -y )'
- cd $CI_PROJECT_DIR/
- mkdir -p Build/Report/Deprecations
- cd $CI_PROJECT_DIR/app
- curl -s https://api.github.com/repos/Tuurlijk/typo3scan/releases/latest | grep "browser_download_url.*phar" | cut '-d' ':' '-f' '2,3' | tr '-d' '\"' | wget -qi -
- chmod +x typo3scan.phar
@josefglatz
josefglatz / Redirect exact TYPO3 index.php?id=1 URI to rootpage aka homepage
Created February 11, 2019 13:18
Redirect TYPO3 index.php with ID 1 to root page with slash
# Redirects an exact index.php?id=1 to /
RewriteCond %{QUERY_STRING} ^id=1$
RewriteRule ^index.php(.*) /$1? [R=301,L]
@josefglatz
josefglatz / a-sshAndSwitch.sh
Last active July 12, 2024 20:50
Synology cheatsheet: how to query internal Synology postgresql database
# Connect to you NAS with YOUR admin account
ssh [email protected]
# go sudo
sudo -i
# switch to user postgres
su - postgres
@josefglatz
josefglatz / TYPO3 9.5 LTS open tasks-bugs-suggestions Integrators.md
Last active December 10, 2018 04:26
TYPO3 9.5. LTS open task/bug/suggestion list thoughts

For editors missing stuff or newly introduced bugs/regressions/changes

(This list is updated regulary/if something is tested/fixed by me)


a) TYPO3 Pagetree: New pages must respect TCAdefaults.pages.hidden = 0 and other properties

https://forge.typo3.org/issues/87089 https://forge.typo3.org/issues/59383 If you create a new page within the pagetree, it's always disabled per default. it would be a real benefit if such settings get's respected

@josefglatz
josefglatz / TYPO3-surf-deployment.php
Last active June 19, 2018 07:14
TYPO3/surf snippets for TYPO3 CMS deployments
<?php
// ...
/**
* Set custom symlinks (in addition to fileadmin and uploads)
*/
$application->setSymlinks([
'web/typo3conf/l10n' => '../../../../shared/Data/l10n'
]);
@josefglatz
josefglatz / plesk_17.0-17.5-fix-stopped-websites-after-reboot-linux.md
Last active June 4, 2018 04:52
Plesk 17.x Cheatsheet to autostart websites after a system reboot

I used the following commands to fix stopped hosted plesk websites (with nginx reverse proxy and Apache as webserver) after a system reboot

/usr/local/psa/admin/sbin/nginxmng --disable
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

Environment: Ubuntu 16.0.4; Plesk 17.0-17.5

It could be possible that it's enough to just only enable the nginx service (the plesk way)

@josefglatz
josefglatz / openssl_extract_cert_and_key_from_pfx.md
Last active April 1, 2023 22:44
Cheatsheet: How to extract certificate and private key from a PFX file

How to extract certificate and private key from a PFX file

Given PFX file

stern-domain-at.pfx (optionally secured with passphrase)

Openssl needs to be installed

Commands

@josefglatz
josefglatz / fluid-modulotest.html
Last active September 15, 2024 13:18
TYPO3 Fluid Easy Modulo (with ext:vhs)
<f:if condition="{i.cycle -> v:math.modulo(b: 3)} === 0">
<div class="break-lg-up"></div>
</f:if>
<!-- without the last item -->
<f:if condition="({i.cycle -> v:math.modulo(b: 3)} === 0) && (!{i.isLast})">
<div class="break-lg-up"></div>
</f:if>
<v:if stack="{0: '{v:content.get(column: \"0\")}', 1: 'OR', 2: '{v:content.get(column: \"1\")}'}">
This text is only shown, if colPos 0 and colPos 1 has content elements.
</v:if>