Notes:
- password generation is purely offline; no risk of mitm
- uses browser crypto API if available; fallback to
Math.random
- Copy and paste the following URL in your browser address bar:
@stores({ | |
... | |
}) | |
@debouncePropsUpdate({ | |
x: 1000, | |
}) | |
@throttlePropsUpdate({ | |
y: 1000, | |
}) | |
class MyComponent extends React.Component { |
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Run", | |
"type": "shell", | |
"windows": { | |
"command": "C:\\Octave\\Octave-4.2.1\\bin\\octave-gui.exe", |
const state = { | |
counter: 0 | |
}; | |
const randomInt = (min, max) => | |
Math.floor(Math.random() * (max - min + 1)) + min; | |
const sleep = (min, max = min) => | |
new Promise(resolve => { | |
setTimeout(resolve, randomInt(min, max)); |
const state = { | |
counter: 0 | |
}; | |
const randomInt = (min, max) => | |
Math.floor(Math.random() * (max - min + 1)) + min; | |
const sleep = (min, max = min) => | |
new Promise(resolve => { | |
setTimeout(resolve, randomInt(min, max)); |
(async () => { | |
// small function that resolves after t ms | |
const sleep = t => new Promise(resolve => setTimeout(resolve, t)); | |
let state = { | |
counter: 0, | |
running: true | |
}; | |
const setCounter = v => { |
import { IProtocol, IRequestResponseMap, IEventMap } from "./IProtocol"; | |
import { ISerializable } from "./ISerializable"; | |
type RequestResponseMap = { | |
ping: { | |
RequestParams: {}; | |
ResponseParams: {}; | |
}; | |
echo: { | |
RequestParams: ISerializable; |
(() => { | |
const MAX_BASENAME_LENGTH = 64; | |
const clicks = []; | |
const getNodesInRectangle = (topLeft, bottomRight) => | |
Array.from(document.querySelectorAll("*").values()).filter(node => { | |
const { x, y, width, height } = node.getBoundingClientRect(); | |
return ( | |
x >= topLeft.x && | |
x + width <= bottomRight.x && | |
y >= topLeft.y && |
interface IDockerComposeProps { | |
cwd?: string; | |
dockerComposeFile: string; | |
} | |
class DockerCompose { | |
private readonly props: IDockerComposeProps; | |
private state: "unknown" | "pending-up" | "up" | "pending-down" | "down"; | |
public constructor(props: IDockerComposeProps) { |
.DropDown-backdrop { | |
display: none; | |
position: fixed; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
z-index: 100; | |
} | |
.DropDown.open .DropDown-backdrop{ |
Notes:
Math.random