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
function isIgnoredNode(node) { | |
if (node.nodeName == 'NOSCRIPT') { | |
return true; | |
} | |
return false; | |
} | |
function* preOrderNodeIterator(root) { | |
const treeWalker = document.createTreeWalker( |
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
import Bowser from 'bowser'; | |
import fetch from 'node-fetch'; | |
import { JSDOM } from 'jsdom'; | |
import * as LinkReference from '@/src/server/firestore/LinkReference'; | |
function getDoctype(dom) { | |
const node = dom.window.document.doctype; | |
return ( | |
'<!DOCTYPE ' + |
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
function createConjoinedCursor(a, b) { | |
const a_current = a && a.cursor.current ? a.cursor.current : null; | |
const a_next = a && a.cursor.next ? a.cursor.next : null; | |
const b_current = b && b.cursor.current ? b.cursor.current : null; | |
const b_next = b && b.cursor.next ? b.cursor.next : null; | |
const conjoinParts = (a_prime, b_prime) => { | |
if (!a_prime && !b_prime) { | |
return null; | |
} else if (!a_prime) { |
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
function* inOrderIterator(root) { | |
if (root.left) { | |
for (const child of inOrderIterator(root.left)) { | |
yield child; | |
} | |
} | |
yield root | |
if (root.right) { |
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
function computeRopeCosts(password, additionsNeeded, removalsNeeded) { | |
let ropes = [] | |
let lastChar; | |
let lastCharIndex; | |
for (let i = 0; i < password.length; ++i) { | |
const char = password[i]; | |
if (char != lastChar) { | |
if (lastChar && i - lastCharIndex >= 3) { | |
ropes.push(i - lastCharIndex) |
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
<template> | |
<div :class="[$style.Host, ...hostModifiers_]"> | |
<div :class="$style.Modal"> | |
<ModalTitle :title="title" @back="$emit('back')" /> | |
<slot></slot> | |
</div> | |
</div> | |
</template> | |
<script> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<mjml> | |
<mj-body background-color="#F4F4F4"> | |
<mj-section | |
background-color="#ffffff" | |
background-repeat="repeat" | |
padding-bottom="0px" | |
padding-top="30px" | |
padding="20px 0" | |
text-align="center" | |
> |
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
import Joi from 'joi'; | |
import Email from '@/src/server/types/firestore/Email'; | |
export default Joi.object({ | |
email: Email.required(), | |
username: Joi.string().required(), | |
sso: Joi.object({ | |
google: Joi.object({ |
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
{ | |
"emulators": { | |
"firestore": { | |
"port": 9000 | |
}, | |
"ui": { | |
"enabled": true, | |
"host": "localhost", | |
"port": 4001 | |
} |