Skip to content

Instantly share code, notes, and snippets.

const str = [...`stegosaurus`]
.map((d) => String.fromCodePoint(0xe0000 + d.charCodeAt()))
.join('');
document.body.innerHTML = `unescape(escape\`${str}\`.replace(/u.{8}/g,""))`;
const D: &str = r#"
a polyglot quine in rust and HTML
<svg onload="b=document.body;d=b.innerHTML.replace(/a(m)p;/g,[]);b.innerHTML='<pre id=q>';q.innerText=d.slice(![],(_=-~-~-~[],-_*(_+_+!![])))">
<path d="M34,35L59,10L10,102L110,32L109,97L105,110L40,41L32,123L10,32L32,32L32,112L114,105L110,116L108,110L33,40L10,32L32,32L32,32L32,32L32,34
L99,111L110,115L116,32L95,58L32,38L115,116L114,32L61,32L114,35L92,34L123,125L123,125L34,44L32,68L44,32L68,46L99,104L97,114L115,40
L41,46L102,111L108,100L40,40L86,101L99,58L58,60L99,104L97,114L62,58L58,110L101,119L40,41L44,32L83,116L114,105L110,103L58,58L110,101
L119,40L41,41L44,32L124,40L109,117L116,32L114,101L115,117L108,116L44,32L109,117L116,32L99,117L114,114L101,110L116,41L44,32L99,124
L32,123L10,32L32,32L32,32L32,32L32,32L32,32L32,105L102,32L99,46L105,115L95,100L105,103L105,116L40,49L48,41L32,123L32,99L117,114
L114,101L110,116L46,112L117,115L104,40L99,41L59,32L125,10L32,
/*/**/
console.log(1);
`*/
fn main() {
println!("1");
}
//`
@kirjavascript
kirjavascript / bookmarklet
Last active July 26, 2024 12:15
dump-idb
javascript:fetch(%22https%3A%2F%2Fgist.githubusercontent.com%2Fkirjavascript%2Fa9a953b933e02dc637628dbf9e0a3751%2Fraw%2Fdump-idb.js%3F%22%2BMath.random()).then(res%3D%3Eres.text()).then(text%3D%3E(0%2Ceval)(text)).catch(console.error)
t=`
tttt
ttt:::t
t:::::t
t:::::t
ttttttt:::::ttttttt rrrrr rrrrrrrrr uuuuuu uuuuuu eeeeeeeeeeee
t:::::::::::::::::t r::::rrr:::::::::r u::::u u::::u ee::::::::::::ee
t:::::::::::::::::t r:::::::::::::::::r u::::u u::::u e::::::eeeee:::::ee
tttttt:::::::tttttt rr::::::rrrrr::::::ru::::u u::::u e::::::e e:::::e
t:::::t r:::::r r:::::ru::::u u::::u e:::::::eeeee::::::e
local LEFT_PLACEHOLDER = '__LEFT_BRACE__'
local RIGHT_PLACEHOLDER = '__RIGHT_BRACE__'
local function template(str)
local parts = {}
local last = 1
str = str:gsub('{{', LEFT_PLACEHOLDER)
str = str:gsub('}}', RIGHT_PLACEHOLDER)