Skip to content

Instantly share code, notes, and snippets.

View Lefaux's full-sized avatar

Mathias Schreiber Lefaux

  • Magento Association
  • Düsseldorf, Germany
  • X @mattLefaux
View GitHub Profile
@Lefaux
Lefaux / .ddev___docker-compose.mysql.yaml
Created November 8, 2019 09:17
Shopware6 DDEV Zeug
version: "3.6"
services:
mysql:
hostname: ${DDEV_SITENAME}-mysql
container_name: ddev-${DDEV_SITENAME}-mysql
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
# Versions other than 5.7 should work here.
image: mysql:5.7
@Lefaux
Lefaux / readibility.php
Last active January 27, 2018 13:30
Readibility Test
<?php
// Variant A (in order to make PHPStorm EA Inspections happy)
if ($this->languageHasTranslationsCache[$lP]['hasStandAloneContent']
&& $this->languageHasTranslationsCache[$lP]['hasTranslations']
) {
$languageMode = $this->getLanguageService()->getLL('languageModeMixed');
$labelClass = 'danger';
} elseif (!$this->languageHasTranslationsCache[$lP]['hasStandAloneContent']
&& $this->languageHasTranslationsCache[$lP]['hasTranslations']
) {
d8J9uaqBfTEjfomQ2fvLTrvI0FbYmHkMlvvZgsltHuDtqXPv6Bssr3cQu7uuTxYUrz)a8tQsnmrPXrvIQtkjvdvsWGb0WPkoiO6ZGCmfQZjkSqqPLkPOfdvz5s8qjvEQQhdXZLAIkKYufAYcMoYfPkPRkPQNrvIY1fzJqLSvjP0MHY2Le9rjPWxvizAII8DfIrcv1LPmAGA8II6suLWzLu6AscDEf8jQse)MkVwsYASI6CffP36JUVX(Y6RAQp1d6bf1BdfRcULr6W6Dm6nm44vCf1lg06yXbpMouXL8OZsZyzHGSsR8X6Bqhwx3yleyQ1rD8GI6P2aHGY7w4Px4iMI6ZekTkksKEyXWwKeknOO(mHsRIIePtCuJrkQptO0QOir6fhQPO(mHsRIIejs3YSholybbRiDefv(yf1ZS3yyTrkh3vmBwDQSqqwrrDRsJr61ZwcaW6aZlCeYkBtlsRhm8syyXbpMo(WRjm4QEC0tmRsJr68e50z8P1kQ8X6vJfJaa0Hbaib2aaegoZlHxwr6P2aLyljy1rsn5MGaVbtN2PfePJ5yKoCeKnymIJcayfkwVbJHmOd2wiWKYZiRoQJhuupSyylscLguuFMqPvrrI0loutr9zcLwffjsN4OgJuuFMqPvrrI0lCetr9zcLwffjsKoMJrFRHP8XzsVyqRJfh8y6lIJPJ4COb3imbR(g0RglgbaOddaqcSbaimCM(iBGaR8mYQZsZyzHGSsR8X6CeADSwr9M4fsr9P1nhY0HHtK1aaotDdaikpHzmF(85daWxh(5EfhC0doqTlXccw9P1nhYardEm9dVw92Lyb9QZiRGXrm)WdbVzT)rz8QGNk82pmwy5(VlXcTF4BbFxH5ZbbPhCGMw3Cit4jshBzBdwr9Gd006Mdzcp9P1nhYardEm9dVwrIeP8rxrDQSqqwrrDRsJr61ZwcaW6aZlCeYkBtlsRhm8syyXbpMo(WRjm4QEC0z8P1kQ8X6hmNiRybaahndZyT1I0tmRsJr68e50
@Lefaux
Lefaux / moduleconf.php
Last active August 27, 2015 13:59
[Proposal] TYPO3 Module Configuration
<?php
$TYPO3_CONF_VARS = [
'modules' => [
'direct_mail' => [
'configuration' => [
'showInWorkspaces' => true,
'navFrameRoute' => 'modules/web/pagetree',
'icon' => 'EXT:somewhere/Resources/Public/Icons/moduleIcon.svg',
'labels' => [
@Lefaux
Lefaux / tca.php
Last active August 29, 2015 14:21
Proposal for a new Syntax for the showItem list in TYPO3s TCA
<?php
$TCA['tt_content']['types']['html'] = array(
//YUG! :(
'showitem' => '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general, header;LLL:EXT:cms/locallang_ttc.xlf:header.ALT.html_formlabel, bodytext;LLL:EXT:cms/locallang_ttc.xlf:bodytext.ALT.html_formlabel;;nowrap:wizards[t3editor], --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility, --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended',
//NEAT! :)
'showItems' => array(
'generalTab ' => array(
'tabLabel' => 'General',
'tabItems' => array(
<div class="addressblock">
<f:for each="{rows}" as="address" key="number">
<f:cycle values="{0: 0, 1: 1}" as="cycle">
<f:if condition="{cycle}">
<f:then><div class="location last"></f:then>
<f:else><div class="location first"></f:else>
</f:if>
<h4>{address.name}</h4>
<div class="locationdata">
<p class="company">{address.company}</p>
payload={
"channel": "#general",
"username": "webhookbot",
"text": "This is posted to #general and comes from a bot named webhookbot.",
"icon_emoji": ":ghost:"
}