Is this working? I don't know.
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
{ | |
"magic": [0x2, 0x24, 0x99], | |
"version": { "!format": "u1", "!equal": { "!or": [0x14, 0x13] } }, | |
} |
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
//@ts-check | |
class PushbackIterator { | |
/** | |
* @param {Iterator<string, string, string>} stringIter | |
*/ | |
constructor(stringIter) { | |
/** @type {Iterator<string, string, string>} */ | |
this.stringIter = stringIter; | |
/** @type {Array<string>} */ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Sections demo</title> | |
<style> | |
section { | |
display: none; | |
} |
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
const phrases = [ | |
["Champ,","the mere idea of you","has serious game,","24/7."], | |
["Fact:","your soul","rains magic,","can I get an amen?"], | |
["Everybody says","your hair today","deserves the Nobel Prize,","and that's a fact."], | |
["Dang…","everything you do","raises the roof,","so treat yourself."], | |
["Check it:","your personal style","breeds miracles,","you feel me?"], | |
["Just saying...","every thought you have","is paying off big time,","that's just science."], | |
["Superstar,","that sparkle in your eye","shows mad skills,","would I lie?"], | |
["Tiger,","your presence here","just shimmers,","for reals."], | |
["Self,","what you got going on","is a national treasure,","mic drop."], |
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
const maxCharCode = 2 ** 16 - 1; | |
export function compress(input: string): string { | |
let output = ""; | |
for (let pos = 0; pos < input.length; pos++) { | |
const maxLookBack = Math.min(pos, maxCharCode); | |
let didOutputMatch = false; | |
let charsToSkip = 0; | |
for (let back = 0; back < maxLookBack; back++) { | |
let backLen = 0; |
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
// | |
// JSONWrapper.swift | |
// | |
// Created by Maria Zaitseva on 16.03.2021. | |
// | |
import Foundation | |
/// This class provides a straightforward way to encode/decode | |
/// objects of type `[String: Any]` to and from JSON. |
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
ALGORITHM SHOW MESSAGE | |
PARAMETERS T$ | |
VARIABLES D<>; M<> | |
START | |
10 IF T$ .EQ NULL THEN GOTO 70 | |
20 PARAMETERS T$ | |
30 CALL "createElement" OF DOCUMENT INTO D<> | |
40 SET "innerHTML" OF D<> TO T$ | |
50 PARAMETERS "#messageArea" | |
60 CALL "querySelector" OF DOCUMENT INTO M<> |
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 const base64Alphabet = new Array(64).fill(null).map((_, i) => btoa(String.fromCharCode(0, 0, i))[3]).join(''); |
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
data:text/html,<script>d=document,d.querySelector('*').append(d.createTextNode(location))</script> | |
Shorter, non-HTML5: | |
data:text/html,<script>d=document,d.all[0].append(d.createTextNode(location))</script> |