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 modules\ExtendFormie\console\controllers; | |
use Throwable; | |
use verbb\formie\helpers\ImportExportHelper; | |
use yii\console\Controller; | |
use yii\console\ExitCode; | |
use yii\helpers\Console; |
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
## Default (locallang.xml to locallang.xlf) | |
## search | |
<label index="(.*?)">(.*?)</label> | |
## replace | |
<trans-unit id="$1">\n\t<source>$2</source>\n</trans-unit> | |
## langauge (locallang.xml to de.locallang.xlf) | |
## search | |
<label index="(.*?)">(.*?)</label> | |
## replace |
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
page.10.stdWrap.replacement { | |
10 { | |
search = #(<a.*?target="_blank".*?>)(.*?)(</a>)#i | |
replace { | |
wrap2 = ${1}${2} |${3} | |
noTrimWrap = |<span class="show-for-sr"> |</span>| | |
data = LLL:EXT:...locallang.xlf:link_open_in_new_windows | |
} | |
useRegExp = 1 | |
} |
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
// extend jQuery: | |
$.fn.setClassRand = function(cssClass) { | |
return this.eq( Math.floor( Math.random() * this.length ) ).addClass(cssClass); | |
}; | |
//usage: | |
//add the class "teaser__video--active" and play it: | |
var video = $(".teaser__video").setClassRand("teaser__video--active"); | |
if (video.length) { | |
video[0].play(); |
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
lib.parseFunc { | |
tags.a.typolink { | |
ATagParams.stdWrap.cObject = FILES | |
ATagParams.stdWrap.cObject { | |
stdWrap.if { | |
isPositive.data = parameters:href | |
isPositive.stdWrap.replacement { | |
10 { | |
search = t3://file?uid= | |
replace = |
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
lib.parseFunc { | |
tags.a.typolink { | |
#add text in the A-Tag | |
ATagBeforeWrap = 1 | |
wrap.cObject = FILES | |
wrap.cObject { | |
#get file ID | |
files.stdWrap { | |
data = parameters:href | |
stdWrap.replacement { |
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
RewriteEngine On | |
RewriteCond %{HTTP_HOST} webpage2\.com$ [NC] | |
RewriteRule ^favicon\.ico$ /webpage2_favicon.ico [L,NC] |
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
const numberOfLoops = 100 | |
const numbersToReplace = [ [3,'Fizz'], [5,'Buzz'] ] | |
for(i=1;i<=numberOfLoops;i++){ | |
r = numbersToReplace.filter( replacement => !(i % replacement[0])) | |
console.log( r.length ? r.map(result => result[1]).join('') : i ) | |
} |
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
<html lang="de"> | |
<head> | |
<meta charset="utf-8"> | |
<title>cmd box by Megafry</title> | |
<style> | |
body { | |
background-color: rgba(0, 0, 0, 0.5); | |
color: #fff; | |
} | |
* { |
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 | |
defined('TYPO3_MODE') or die(); | |
$GLOBALS['TCA']['sys_file_reference']['columns']['crop']['config']['ratios'] = array( | |
'1.7777777777777777' => '16:9', | |
'1.3333333333333333' => '4:3', | |
'1' => '1:1', | |
'2.380952381' => 'Slider', | |
'1.66666666666666666' => 'Slider Mobile', | |
'NaN' => 'Free', |
NewerOlder