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 getFlagEmoji(countryCode) { | |
const codePoints = countryCode | |
.toUpperCase() | |
.split('') | |
.map(char => 127397 + char.charCodeAt()); | |
return String.fromCodePoint(...codePoints); | |
} |
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 () { | |
const on = window.addEventListener | |
let parent = null | |
const _post = function () { | |
parent.postMessage( | |
{ | |
type: 'FRAME_HEIGHT', | |
height: document.documentElement.scrollHeight, | |
}, |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
export default class DidLoadElement extends HTMLElement { | |
constructor() { | |
super(); | |
const shadow = this.attachShadow({ mode: "open" }); | |
} | |
static get observedAttributes() { | |
return ["loaded"]; | |
} |
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
.theme--light { | |
--SystemRed: rgba(255, 59, 48, 1); | |
--SystemOrange: rgba(255, 149, 0, 1); | |
--SystemYellow: rgba(255, 204, 0, 1); | |
--SystemGreen: rgba( 52, 199, 89, 1); | |
--SystemTeal: rgba( 90, 200, 250, 1); | |
--SystemBlue: rgba( 0, 122, 255, 1); | |
--SystemIndigo: rgba( 88, 86, 214, 1); | |
--SystemPurple: rgba(175, 82, 222, 1); | |
--SystemPink: rgba(255, 45, 85, 1); |
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
#!/bin/sh | |
port=${1-1919} | |
# 1. Navigate to the built folder & start a server in it | |
cd public | |
python -m SimpleHTTPServer "$port" & | |
server_pid=$! | |
# 2. Trap any killing of this process so that we kill the backgrounded server |
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 { helper } from '@ember/component/helper'; | |
import { htmlSafe } from '@ember/string'; | |
export function matchDigits([value, max, pad]) { | |
max = max.toString(); | |
value = value.toString(); | |
return htmlSafe( | |
value.length >= max.length ? value : new Array(max.length - value.length + 1).join(pad) + value | |
); | |
} |
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
:root { | |
--ease-in-quad: cubic-bezier(.55, .085, .68, .53); | |
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19); | |
--ease-in-quart: cubic-bezier(.895, .03, .685, .22); | |
--ease-in-quint: cubic-bezier(.755, .05, .855, .06); | |
--ease-in-expo: cubic-bezier(.95, .05, .795, .035); | |
--ease-in-circ: cubic-bezier(.6, .04, .98, .335); | |
--ease-out-quad: cubic-bezier(.25, .46, .45, .94); | |
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1); |
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
/// <reference path="../../../../node_modules/@types/jszip/index.d.ts" /> | |
const JSZIP_URL = 'https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.5/jszip.min.js'; | |
function loadJSZip() { | |
return new Promise((resolve, reject) => { | |
vsRequire([JSZIP_URL], (script) => { | |
resolve(script); | |
}); | |
}); |
NewerOlder