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
| declare global { | |
| enum ChooseFileSystemEntriesType { | |
| 'open-file', | |
| 'save-file', | |
| 'open-directory' | |
| } | |
| interface ChooseFileSystemEntriesOptionsAccepts { | |
| description?: string; | |
| mimeTypes?: string; |
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
| wget -q -nv https://easylist-downloads.adblockplus.org/easylist.txt -O list | |
| egrep '^\|\|([a-Z\.]+)\^$' list | cut -d '^' -f1 | sed 's#||#address=/# ; s#$#/127.0.0.1#' | sort | uniq > list.dnsmasq | |
| rm list |
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
| console.log('err'); |
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 xml2js = require('xml2js'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const fontsXmlPath = process.argv[2]; | |
| const fontsFolderPath = path.resolve(fontsXmlPath, '..', 'Fonts'); | |
| const tryRename = (filename, psName) => { | |
| try { | |
| fs.renameSync(path.resolve(fontsFolderPath, filename), path.resolve(fontsFolderPath, psName + path.extname(filename))); |
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 Extensible<T> = T & { [P in keyof any]: any[P] }; | |
| interface IFoo { | |
| value: string; | |
| } | |
| declare const foo: IFoo; | |
| foo.value; | |
| foo.noError; |
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
| var historyBackWithFallback = function(url){ | |
| var originalHref = window.location.href; | |
| var timeoutId = setTimeout(function(){ | |
| if(window.location.href !== originalHref){ | |
| return; | |
| } | |
| window.location = 'https://google.de'; | |
| }, 1500); | |
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 | |
| /** | |
| * @author Sebastian Langer <sl@scn.cx> | |
| * @license MIT | |
| */ | |
| use Shopware\Bundle\StoreFrontBundle\Service\Core\ContextService; | |
| use Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\MediaGateway; | |
| use Shopware\Components\Compatibility\LegacyStructConverter; |
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 | |
| use Shopware\Bundle\StoreFrontBundle\Service\Core\ContextService; | |
| use Shopware\Bundle\StoreFrontBundle\Gateway\DBAL\MediaGateway; | |
| use Shopware\Components\Compatibility\LegacyStructConverter; | |
| use Enlight_Template_Default; | |
| use InvalidArgumentException; | |
| /** | |
| * @author Sebastian Langer <sl@scn.cx> |
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
| abstract class State<T> { | |
| abstract id: T; | |
| isCurrent: boolean = false; | |
| listeners: { [key: string]: Function } = {}; | |
| fsm!: StateMachine<T>; | |
| on(event: string, cb: Function): void { | |
| this.listeners[event] = cb; | |
| } | |
| trigger(event: string, data?: any): void { | |
| if (!this.listeners.hasOwnProperty(event)) { |
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 Color = string; | |
| class Player { | |
| constructor(public name: string, public color: Color){ } | |
| } | |
| type Field = Player|null; | |
| class GameField { | |
| private fields: Field[][]; |