This file contains hidden or 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
| # Create tar.gz archive | |
| tar -czvf archive.tar.gz what_to_pack | |
| # Extract zipper archive | |
| tar xzf archive.tar.gz |
This file contains hidden or 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
| # run with | |
| # `scrapy runspider crawl-site.py` | |
| import scrapy | |
| from scrapy.spiders import CrawlSpider, Rule | |
| from scrapy.linkextractors import LinkExtractor | |
| class MySpider(CrawlSpider): | |
| name = 'domain.com' | |
| allowed_domains = ['domain.com'] |
This file contains hidden or 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 : fn => the function to convert | |
| @param : time => the time delay for debounce | |
| */ | |
| function debounce(fn, delay) { | |
| let timer = null | |
| return (...args) => { | |
| if (timer) clearTimeout(timer) | |
| timer = setTimeout(() => fn(...args), delay) |
This file contains hidden or 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
| if($_SERVER['REMOTE_ADDR'] == '37.209.17.41'){ | |
| var_dump($var); | |
| exit; | |
| } |
This file contains hidden or 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
| # redirect non www to www | |
| RewriteCond %{HTTP_HOST} !^(www|dev)\. [NC] | |
| RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L] | |
| # Non SSL to SSL | |
| RewriteCond %{SERVER_PORT} !^443$ | |
| RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L] | |
This file contains hidden or 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(Joekolade.SbfwSite:Document.AbstractPage) < prototype(Neos.Neos:Page) { | |
| head { | |
| favicons = Joekolade.SbfwSite:Component.Favicon | |
| headTags = Neos.Fusion:Component { | |
| renderer = afx` | |
| <meta http-equiv="x-ua-compatible" content="ie=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| ` | |
| } |
This file contains hidden or 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 | |
| declare(strict_types=1); | |
| namespace Vendor\Extension\Hooks; | |
| use TYPO3\CMS\Core\Utility\GeneralUtility; | |
| use TYPO3\CMS\FrontendEditing\EditingPanel\FrontendEditingDropzoneModifier; | |
| use TYPO3\CMS\FrontendEditing\Service\ContentEditableWrapperService; | |
| /** |
This file contains hidden or 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.langSwitch = HMENU | |
| lib.langSwitch { | |
| special = language | |
| special.value = 0,1 | |
| special.normalWhenNoLanguage = 0 | |
| 1 = TMENU | |
| 1 { | |
| noBlur = 1 | |
| # Standard Sprachen | |
| NO = 1 |
This file contains hidden or 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
| 10 = TEXT | |
| 10.wrap = <a href="mailto:?Subject={$text.emailTip}&body={$text.emailTipBody} | "> | |
| 10.data = getIndpEnv:TYPO3_REQUEST_URL |
This file contains hidden or 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
| # Flush or warmup caches | |
| ./flow flow:cache:warmup | |
| ./flow flow:cache:flush | |
| # Flush or warmup caches in other contexts | |
| FLOW_CONTEXT=Production ./flow flow:cache:flush | |
| # Kickstart Page | |
| ./flow kickstart:site |