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
// javascript (tested in Chrome 61) | |
// also here: https://runkit.com/dosyago-coder-0/cracklepop | |
(new Array(8)).join('///Crackle//Pop/Crackle///Crackle/Pop//Crackle///CracklePop') | |
.split(/\//g).slice(0,101).forEach((print,number) => number > 0 ? console.log(`${number}: ${print}`) : ''); |
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
/** | |
Idea is we want to "attach" something ( annotation, edit, image, link, whatever ) | |
to a particular piece of text that is not necessarily defined by an element. | |
In other words, some free form text. Whether this text comes from HTML, or a text file | |
is unimportant. The point is to find this attachment point even when: | |
- the order of paragraphs is altered | |
- the order of sentences in a paragraph is altered | |
- the order of words in a sentence is altered | |
And we would like to still find the attachment point with high probability when: |
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
/** see a live demo here: https://runkit.io/dosyago-coder-0/kvdb/branches/master **/ | |
const express = require("express"); | |
const bodyParser = require("body-parser"); | |
const db = new Map(); | |
const page = () => ` | |
<!DOCTYPE html> | |
<meta charset=utf-8> |
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 dc = require("dosycrypt"); | |
const page = ({message:message = ''}={}) => ` | |
<title>DOSYCRYPT</title> | |
<meta name=viewport content="width=device-width, initial-scale=1"> | |
<style> | |
:root, body, input, textarea, button { | |
background: orange; color: white; | |
} | |
</style> |
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 dc = require("dosycrypt"); | |
self.dc = dc; | |
const page = ({message:message = ''}={}) => ` | |
<title>DOSYCRYPT</title> | |
<meta name=viewport content="width=device-width, initial-scale=1"> | |
<style> | |
:root, body, input, textarea, button { | |
background: orange; color: white; | |
} |
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
"use strict"; | |
{ | |
const doc = document.implementation.createHTMLDocument(''); | |
let html; | |
html = document.documentElement.innerHTML; | |
doc.write(html); | |
doc.documentElement.setAttribute('xmlns', doc.documentElement.namespaceURI); | |
html = (new XMLSerializer).serializeToString(doc); | |
console.log(html); | |
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
(async function (){ | |
try { | |
const {width,height} = getDOMRect(); | |
const doc = document.implementation.createHTMLDocument(''); | |
doc.write(document.head.outerHTML); | |
const dom = getSelectedDOMOrBody(); | |
doc.write(dom.outerHTML); | |
doc.documentElement.setAttribute('xmlns', doc.documentElement.namespaceURI); | |
const page = `<article id=fantasticprogress style="z-index:1000000000;width:100vw;height:100vh;position: fixed;top:0;left:0;background:rgba(50,50,50,0.5);display:flex;justify-content:center;align-items: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
"use strict"; | |
{ | |
const {get:edit_distance} = require('fast-levenshtein'); | |
const SEN_MARK = { | |
en: [ ".", "!", "?", "()", "[]" ], | |
zh: [ "γ", "γγ", "οΌ", "οΌ", "οΌοΌ", "οΌ»οΌ½", "γγ", "γγ", "γγ"], | |
es: [ ".", "'", '"', ";", "Β‘!", "ΒΏ?", "ββ", "ββ" ], | |
hi: [ "|", ";", "?", "!", "β" ], | |
ar: [ ".", "Ψ", ":", "ββ" ] | |
}; |
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
"use strict"; | |
{ | |
const page = document.documentElement.outerHTML; | |
const pageBlob = new Blob([page]); | |
const objectURL = URL.createObjectURL(pageBlob); | |
const anchor = document.createElement('a'); | |
anchor.target = "_new"; | |
anchor.setAttribute('download','page.html'); | |
anchor.href = objectURL; | |
anchor.innerText = 'download page.html'; |
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
// i want to create something viral | |
// and interesting | |
// for other developers to do and get behind | |
// people don't need frameworks - we have enough | |
// we don't need prop formats, such as b64, etc | |
// we have enough | |
// what if i mix both? | |
// a framework, a website, a delivery system in a format? |