Skip to content

Instantly share code, notes, and snippets.

View MarkTiedemann's full-sized avatar

Mark Tiedemann MarkTiedemann

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1Lx58STssinS8LvcDXYw4Z3uMP9N8dpMvy https://explorer.blockstack.org/address/1Lx58STssinS8LvcDXYw4Z3uMP9N8dpMvy
[INFO] Invoking bench 'bench1' with image 'bench:latest' (15:19:14)
Running 30s test @ http://app1:5000/sync
20 connections
Stat Avg Stdev Max
Latency (ms) 9.95 26.1 1996.68
Req/Sec 1911.84 275.3 2427
Bytes/Sec 176 kB 25.6 kB 223 kB
Percentile Latency (ms)
@MarkTiedemann
MarkTiedemann / index.html
Last active July 1, 2022 08:10
Poor Man's Live-Reload Client And Server
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script>
var source = new EventSource('/')
source.onmessage = () => {
source.close()
location.reload()
@MarkTiedemann
MarkTiedemann / parse.js
Created July 17, 2018 02:21
Simple Parser
function Grammar(rules) {
this.rules = rules
}
function Rule(lhs, rhs) {
this.lhs = lhs
this.rhs = rhs
}
function parse(input) {
@echo off
set log=C:\sys_init.log
:isAdmin
net sessions > nul 2>&1
if %errorlevel% equ 0 goto stopDiskMonitor
:runAsAdmin
powershell ^
FROM microsoft/nanoserver:1709
ADD https://nodejs.org/dist/v10.12.0/win-x64/node.exe C:/Windows/system32/node.exe
COPY prebuilt/addon_x64.node addon_x64.node
<body style="display: flex; flex-direction: row; justify-content: center; margin: 0;">
<svg style="width: 100vh; height: 100vh;" viewBox="0 0 210 210" preserveAspectRatio="none">
<polygon points="100,10 40,190 190,80 10,80 160,190" style="fill: orange; fill-rule: nonzero;" />
</svg>
</body>
<!DOCTYPE html>
<span>for </span><span id="typer"></span>
<script>
var target = document.getElementById("typer");
var texts = [
["developers", "☕"],
["beginners", "🔥"],
["unicorns", "🦄"],
["hackers", "💀"],
# Based on:
# https://web.archive.org/web/20180121193320/http://git-scm.com/blog/2010/08/25/notes.html
# - Pushing notes
git push origin "refs/notes/*"
# - Fetching notes
git fetch origin "refs/notes/*:refs/notes/*"
let http = require("http")
let html = String.raw
let cms = {
title: "My Title",
text: "My text"
}
function site(editable) {
let edit = editable ? ` contenteditable="true"` : ""