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 | |
class Authentication | |
{ | |
/** | |
* hashed with password_hash and self::HASH_ALGORITHM | |
*/ | |
protected $users = [ | |
'admin' => '$2y$10$ea80bTD/1qmS.HFJbSL2luYYXYhYVOkUq7J6obihEjg/p0EHzoKPm', | |
]; |
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 | |
$matches = []; | |
$content = file_get_contents('inputfile.txt'); | |
$pattern = '#.*http[s]?:\/\/(music\.)?youtube\.com\/watch\?v=([[:alnum:]_-]{4,18}).*#'; | |
preg_match_all($pattern, $content, $matches); | |
echo count($matches[2])." Videos found\n\n"; | |
$chunks = array_chunk($matches[2], 50); |
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 | |
require './vendor/autoload.php'; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
use Illuminate\Database\Migrations\DatabaseMigrationRepository; | |
use Illuminate\Database\Migrations\Migrator; | |
use Illuminate\Filesystem\Filesystem; | |
define('MIGRATION_PATH', '../database/migrations'); |
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 | |
namespace My\Package\Fusion; | |
class EmailObfuscationImplementation extends \Neos\Fusion\FusionObjects\DataStructureImplementation | |
{ | |
const MAILTO_REGEX = '/<a(.*?)href="mailto:(.+?)"(.*?)>(.*?)<\/a>/i'; | |
/** | |
* Get the glue to insert between items |
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
/** | |
* @param NodeInterface $node | |
* @return Calendar | |
* @throws Exception | |
* @throws \Neos\ContentRepository\Exception\NodeException | |
*/ | |
protected function generateIcsFileByNode(NodeInterface $node): Calendar | |
{ | |
$calendar = new Calendar('www.example.com'); | |
$event = new Event($node->getNodeAggregateIdentifier()); |
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
prototype(Wysiwyg.OGE.CorporateSite:FormElement.MultiFieldGroup) < prototype(Neos.Fusion:Tag) { | |
tagName = 'div' | |
attributes.class = 'row' | |
content = afx` | |
<Neos.Fusion:Loop items={ element.elements } itemName="element"> | |
<Neos.Fusion:Augmenter class={ element.properties.colClass ? element.properties.colClass : 'col' }> | |
<Neos.Fusion:Renderer type={element.type} /> | |
</Neos.Fusion:Augmenter> | |
</Neos.Fusion:Loop> | |
` |
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
prototype(Wysiwyg.OGE.CorporateSite:FormElement.MultiFieldGroup) < prototype(Neos.Fusion:Tag) { | |
tagName = 'div' | |
attributes.class = 'row' | |
content = afx` | |
<Neos.Fusion:Loop items={ element.elements } itemName="element"> | |
<Neos.Fusion:Augmenter class={ element.properties.colClass ? element.properties.colClass : 'col' }> | |
<Neos.Fusion:Renderer type={element.type} /> | |
</Neos.Fusion:Augmenter> | |
</Neos.Fusion:Loop> | |
` |
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
prototype(Wysiwyg.OGE.CorporateSite:FormElement.MultiFieldGroup) < prototype(Neos.Fusion:Tag) { | |
tagName = 'div' | |
attributes.class = 'row' | |
content = afx` | |
<Neos.Fusion:Loop items={ element.elements } itemName="element"> | |
<Neos.Fusion:Augmenter class={ element.properties.colClass ? element.properties.colClass : 'col' }> | |
<Neos.Fusion:Renderer type={element.type} /> | |
</Neos.Fusion:Augmenter> | |
</Neos.Fusion:Loop> | |
` |
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
prototype(Wysiwyg.OGE.CorporateSite:FormElement.MultiFieldGroup) < prototype(Neos.Fusion:Tag) { | |
tagName = 'div' | |
attributes.class = 'row' | |
content = afx` | |
<Neos.Fusion:Loop items={ element.elements } itemName="element"> | |
<Neos.Fusion:Augmenter class={ element.properties.colClass ? element.properties.colClass : 'col' }> | |
<Neos.Fusion:Renderer type={element.type} /> | |
</Neos.Fusion:Augmenter> | |
</Neos.Fusion:Loop> | |
` |
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
prototype(Wysiwyg.OGE.CorporateSite:FormElement.MultiFieldGroup) < prototype(Neos.Fusion:Tag) { | |
tagName = 'div' | |
attributes.class = 'row' | |
content = afx` | |
<Neos.Fusion:Loop items={ element.elements } itemName="element"> | |
<Neos.Fusion:Augmenter class={ element.properties.colClass ? element.properties.colClass : 'col' }> | |
<Neos.Fusion:Renderer type={element.type} /> | |
</Neos.Fusion:Augmenter> | |
</Neos.Fusion:Loop> | |
` |
NewerOlder