Skip to content

Instantly share code, notes, and snippets.

View zone117x's full-sized avatar

Matthew Little zone117x

View GitHub Profile
@zone117x
zone117x / stacks2.1-event-stream-borked.json
Created November 10, 2022 11:10
stacks2.1-event-stream-borked.json
["/new_burn_block",{"burn_amount":0,"burn_block_hash":"0x0c79e0a0b950d8838b92299f3c623a2275220567c1f09bd30dd14b82efe1e8c0","burn_block_height":100,"reward_recipients":[],"reward_slot_holders":[]}]
["/new_burn_block",{"burn_amount":0,"burn_block_hash":"0x37cdc44d61328ae67f8882d4754e2fa2160f4ef1ead91d2d19ad98808f400131","burn_block_height":101,"reward_recipients":[],"reward_slot_holders":[]}]
["/new_burn_block",{"burn_amount":0,"burn_block_hash":"0x79c0dc847ed7574c7d63627f0a7422e5a48d6315d0ff7d754323b886caab6108","burn_block_height":102,"reward_recipients":[],"reward_slot_holders":[]}]
["/new_burn_block",{"burn_amount":20000,"burn_block_hash":"0x7c45de287b70eb596b40833c2cdbde49282daf41cd0145186d0bcf8f6f9f53d6","burn_block_height":103,"reward_recipients":[],"reward_slot_holders":[]}]
["/new_block",{"anchored_cost":{"read_count":0,"read_length":0,"runtime":0,"write_count":0,"write_length":0},"block_hash":"0xe074842eca1985317e4b83f9064e4044ea0c4af3ca81bba569280b1b2a08c24b","block_height":1,"burn_block_hash":"0x7c4
@zone117x
zone117x / readline-transform-stream.ts
Last active January 12, 2021 14:15
Readline transform stream
import * as readline from 'readline';
import * as stream from 'stream';
export async function* asyncIterableToGenerator<T>(iter: AsyncIterable<T>) {
for await (const entry of iter) {
yield entry;
}
}
export class LineReaderStream extends stream.Duplex {
@zone117x
zone117x / mdn-json-sample.json
Created September 4, 2019 14:08
MDN JSON Sample
{
"squadName": "Super hero squad",
"homeTown": "Metro City",
"formed": 2016,
"secretBase": "Super tower",
"active": true,
"members": [
{
"name": "Molecule Man",
"age": 29,
@zone117x
zone117x / kubesail.gaia-hub-disk.yaml
Last active September 1, 2020 14:03
KubeSail template for deploying a free-tier Gaia Hub with disk-based storage
# Gaia hub & reader container deployment controller
apiVersion: apps/v1
kind: Deployment
metadata:
name: gaia-app
spec:
selector:
matchLabels:
app: gaia-app
@zone117x
zone117x / # osslsigncode - 2019-08-06_10-10-11.txt
Created August 6, 2019 14:56
osslsigncode on macOS 10.14.5 - Homebrew build logs
Homebrew build logs for osslsigncode on macOS 10.14.5
Build date: 2019-08-06 10:10:11
@zone117x
zone117x / clarity-contract-interface-json.json
Last active June 21, 2019 13:14
clarity-contract-interface-json
{
"functions": [
{
"name": "f00",
"access": "private",
"args": [
{
"name": "a1",
"type": "int128"
}
@zone117x
zone117x / gist:790486a8ea29ccf54621bf2d33a3909a
Created March 25, 2019 22:59
mattlittle.id blockstack verification
Verifying my Blockstack ID is secured with the address 1159ZPz88pypemHP84SMacuJWa3XmFSKcv https://explorer.blockstack.org/address/1159ZPz88pypemHP84SMacuJWa3XmFSKcv
@zone117x
zone117x / blockstack.d.ts
Created March 7, 2019 00:52
blockstack.d.ts
/// <reference types="bigi" />
/// <reference types="node" />
/// <reference types="bn.js" />
declare module "errors" {
export const ERROR_CODES: {
MISSING_PARAMETER: string;
REMOTE_SERVICE_ERROR: string;
INVALID_STATE: string;
NO_SESSION_DATA: string;
UNKNOWN: string;
@zone117x
zone117x / crypto-webworker-support-check.js
Created January 15, 2019 14:43
Check for web worker Crypto API support
// Checks if the global.crypto API is supported inside web workers.
// Uses a serialized function inside a Blob URL to run a web worker
// without an external file.
// See https://medium.com/@roman01la/run-web-worker-with-a-function-rather-than-external-file-303add905a0
function checkCryptoWorkerSupport() {
return new Promise((resolve) => {
const checkFn = () => {
const cryptoSupported = self.crypto && self.crypto.getRandomValues
postMessage(!!cryptoSupported)