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
type Anonymize<T> = Omit<T, "provide">; | |
export type AnonymousProvider<T = any> = | |
Anonymize<ClassProvider<T>> | | |
Anonymize<ValueProvider<T>> | | |
Anonymize<FactoryProvider<T>> | | |
Anonymize<ExistingProvider<T>>; | |
export type Plugin<T extends Record<string, AnonymousProvider>> = Pick<ModuleMetadata, "imports" | "providers"> & T; |
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
<VirtualHost *:80> | |
DocumentRoot /var/www/html/girard-perregaux.varnish | |
ServerName girard-perregaux.varnish | |
ServerAlias www.girard-perregaux.varnish | |
TimeOut 600 | |
# SSLEngine on | |
# SSLCertificateFile /etc/ssl/domain.com.crt | |
# SSLCertificateKeyFile /etc/ssl/domain.com.key |
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
export const test = 'FOO'; |
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
import {TwingTokenParser} from "../token-parser"; | |
import {Token, TokenType} from "twig-lexer"; | |
export class TwingTokenParserTrans extends TwingTokenParser { | |
parse(token: Token) { | |
let stream = this.parser.getStream(); | |
stream.expect(TokenType.TAG_END); | |
let body = this.parser.subparse([this, this.decideBlockEnd], true); |
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
const {TwingEnvironment, TwingLoaderArray} = require('twing'); | |
const {readFileSync} = require('fs'); | |
class CustomCache { | |
constructor() { | |
/** | |
* @type {Map<*, string>} | |
*/ | |
this.templates = new Map(); | |
this.TwingCacheInterfaceImpl = this; |
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 | |
$database = Drupal::database(); | |
$entity_type = 'paragraph'; | |
$field_name = 'field_value'; | |
$table = $entity_type . '__' . $field_name; | |
$field_storage = FieldStorageConfig::loadByName($entity_type, $field_name); | |
if (is_null($field_storage)) { |
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
$response = new CacheableResponse($data); | |
$cache = new CacheableMetadata(); | |
$cache->setCacheMaxAge(...); | |
$cache->setCacheContexts(...); | |
$cache->setCacheTags(...); | |
$response->addCacheableDependency($cache); |
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
@font-face { | |
font-family: 'Whatever'; | |
font-weight: 400; | |
src: url('./whatever.eot'); | |
} |