Skip to content

Instantly share code, notes, and snippets.

View HunterLarco's full-sized avatar
🚀
making all the things

Hunter Larco HunterLarco

🚀
making all the things
View GitHub Profile
function isIgnoredNode(node) {
if (node.nodeName == 'NOSCRIPT') {
return true;
}
return false;
}
function* preOrderNodeIterator(root) {
const treeWalker = document.createTreeWalker(
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 ' +
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) {
function* inOrderIterator(root) {
if (root.left) {
for (const child of inOrderIterator(root.left)) {
yield child;
}
}
yield root
if (root.right) {
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)
<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.
<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"
>
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({
{
"emulators": {
"firestore": {
"port": 9000
},
"ui": {
"enabled": true,
"host": "localhost",
"port": 4001
}