This file contains hidden or 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
let error | |
function stackoverflow() { | |
try { | |
stackoverflow() | |
} catch(e) { | |
try { | |
[1,2,3] // try commenting this line | |
} catch(e) { | |
error = e |
This file contains hidden or 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 delay(fn) { | |
return function(...args) { | |
return [fn, args] | |
} | |
} | |
function a(arg) { | |
// performs some IO operation that have to be mocked for testing | |
return arg + 10 | |
} |
This file contains hidden or 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> | |
<title>Random Health Advice</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
#coin { | |
width: 100px; | |
height: 100px; | |
background-image: url('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD84QzQ5OjcBCgoKDQwNGg8PGjclHyU3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3N//AABEIAH8AfwMBIgACEQEDEQH/xAAbAAACAgMBAAAAAAAAAAAAAAAFBgMEAAECB//EAEEQAAIBAwIDBQUEBwYHAQAAAAECAwAEEQUhBhIxEyJBUWEUMnGBkQcVQqEjUpKiscHwM2JygrLRJENzo7PS8Rb/xAAZAQADAQEBAAAAAAAAAAAAAAABAgMEAAX/xAAkEQACAgICAwACAwEAAAAAAAAAAQIRAyExQQQSUTJSIkJxE//aAAwDAQACEQMRAD8A9xrKysrjjKyuXdUUsx5QBkk9BSRr/G3LKbTR8Fzt27EAHPQjOwHqQc4PKrDeg5JcjRi5PQ33l/a2Kq11MsfN7qndm+AG5+VLF7xvF2jRadaPcODjJPQ/Bc/vFaUL2G6FyWuyt1I0TyyrJIVV+XHdyc8/U+9t5AVYlhmivY5rNZWicRFFRsIgB7ysucbqdttip8cVnlmb4NUfHiuQrLxBxHdAGNUt18sqh/hJ/EVRTUtauOzxrW8jKqheY5LKWG4K+AJ6USjieUkQxu2PAAnFUN |
This file contains hidden or 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
{"type": "module"} |
This file contains hidden or 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 assert = require('assert') | |
/* | |
Blueprint 1: | |
Each ore robot costs 4 ore. | |
Each clay robot costs 2 ore. | |
Each obsidian robot costs 3 ore and 14 clay. | |
Each geode robot costs 2 ore and 7 obsidian. | |
*/ | |
const bp_1 = [ |
This file contains hidden or 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
<script type='module'> | |
async function* fromEvent(el, event){ | |
let resolve | |
el.addEventListener(event, e => resolve(e)) | |
while(true){ | |
let promise = new Promise(_resolve => resolve = _resolve) | |
yield await promise | |
} | |
} |
This file contains hidden or 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 sys, json | |
from substrateinterface import SubstrateInterface, Keypair | |
from scalecodec.base import ScaleDecoder, RuntimeConfiguration, ScaleBytes | |
from scalecodec.type_registry import load_type_registry_preset | |
import requests | |
URL = 'wss://fullnode-relay.chachacha.centrifuge.io' | |
keysencoded = '...your keys from rotate keys here...' |
This file contains hidden or 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
class TreeMap { | |
constructor(){ | |
this.root = null | |
} | |
get(key){ | |
return this.doGet(key, this.root) | |
} |
This file contains hidden or 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
<script> | |
// TODO | |
// отражение одно сферы с текстурой в другой зеркальной сфере | |
// multiple light sources | |
// multiple reflections | |
// TODO multimethods | |
// waves | |
// зеркала напротив друг друга | |
// сделать сочетание цветов |
This file contains hidden or 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
<style> | |
body { | |
position: relative; | |
display: grid; | |
height: 100%; | |
grid-template-areas: | |
"m h h h " | |
"m c c c " | |
"m c c c "; |
NewerOlder