Skip to content

Instantly share code, notes, and snippets.

View NetOpWibby's full-sized avatar
🌿
imagine being mad, touch grass

netop://ウィビ NetOpWibby

🌿
imagine being mad, touch grass
View GitHub Profile
'use strict';
const assert = require('assert');
const path = require('path');
const fs = require('fs');
const os = require('os');
const {Chain, Pool} = require('hsd');
const NetAddress = require('hsd/lib/net/netaddress');
const Logger =require('hsd/node_modules/blgr');
const IP =require('hsd/node_modules/binet');

fmt-semi-colons

This patch adds the ability to control how semi colons are palced by deno fmt.

Install

The general idea is to clone deno and patch with this file

git clone https://github.com/denoland/deno.git
cd deno
@pfrazee
pfrazee / schemas-design-doc-draft.md
Created June 8, 2022 20:22
An initial draft proposal of record schemas for Bluesky's ADX project.

Schemas Design Doc (draft)

Please note: The following document is an initial draft proposal. All decisions are subject to change. Our present goal is to collect feedback and iterate upon this document. Please feel free to share your suggestions and concerns.

Overview

ADX is a federated network for distributing data. It leverages cryptographic signatures and hashes to distribute authenticity proofs along with the data, enabling each node to transact upon the data independently of the data's origin. ADX might therefore be described as an Internet-native database in which records are replicated across nodes.

As a consequence of relying on authenticity proofs, ADX must exchange "canonical" records. That is, ADX records must be transmitted in their original encoding and structure in order to validate the signatures and hashes which comprise the proofs. This stands in contrast to the RESTful model of the Web in which "representations" of records are exchanged and therefore may be constructed at the ti

@glommer
glommer / cs-array.ts
Last active November 22, 2022 00:05
const all = await User.findAll();
const user = all.find(user => user.name == "Glauber Costa" && user.age >= 40);
return new Response(user?.email ?? "not found");
'use strict';
const {NodeClient} = require('hs-client');
const {Address, Network} = require('hsd');
const network = Network.get('main');
if (process.argv.length !== 3)
throw new Error('Usage:\n node transfer-address.js <NAME>');
const name = process.argv[2];
Twitter ID Screen name Followers Removal observed Before After
17461978 SHAQ 15612791 2022-02-26T22:24:52Z SHAQ.ETH SHAQ.SOL
21910850 jakeowen 2119904 2022-02-26T15:45:18Z jakeowen.eth Jake Owen
7846 ijustine 1811449 2022-03-09T14:43:37Z iJustine.eth iJustineUltra
1666038950 BoredElonMusk 1752290 2022-02-17T08:05:47Z bored.eth Bored
381051960 ethRuby 1267133 2022-03-19T08:08:11Z CryptoSolis.eth Ruby
1282418324228337665 wsbmod 832406 2022-02-24T06:52:07Z wsbmod.eth wsbmod
20882981 EclecticMethod 495235 2022-02-18T04:39:30Z eclecticm.eth Eclectic Method
811350 alexisohanian 479340 2022-02-08T06:31:55Z AlexisOhanian.eth 7️⃣7️⃣6️⃣ Alexis Ohanian 7️⃣7️⃣6️⃣
22784458 Fwiz 410813 2022-03-22T08:54:42Z Ryan Wyatt - fwiz.eth 💜 Ryan Wyatt - @ GDC
// USAGE: hsd --log-console=false --plugins=/path/to/this/file/expiring-plug.js
'use strict';
const {
Namestate,
Network
} = require('hsd');
const plugin = exports;
@timaschew
timaschew / client.js
Last active February 22, 2023 07:04
Peerjs with peerID validation by using ed25519
import Peer from "peerjs"
import * as ed from "@noble/ed25519";
import { Buffer } from "buffer"
(async function() {
const privateKey = ed.utils.randomPrivateKey()
const _message = Date.now().toString(16)
const message = Uint8Array.from(Buffer.from(_message, "hex"))
const publicKey = await ed.getPublicKey(privateKey)
const peerId = Buffer.from(publicKey).toString("hex")
@Noxturnix
Noxturnix / fingertip-on-android.md
Created January 30, 2022 02:27
Fingertip on Android

Fingertip on Android

So, I just managed to install [Fingertip] on my Android device and I want to share how I did it

Note

I have written this from my experiments. It might not work on your device, or in worst case, you might lose your data. Feel free to follow what I did, but make sure you understand what you are doing. I'm not responsible on what is happening to your device c:

Note 2

@tndata
tndata / gist:313688ffe2e2d24b676e2264a9943d5c
Created December 1, 2021 12:39
Sega MegaDrive development kit debugger
******************************************
*SEGA Megadrive comunication program *
*(c) 1991 Synchron Assembly *
*https://www.tn-data.se *
******************************************
*f1=trace, f2=skip instruction f4=go
*d xxxx set dissasm window, d pc
*m xxxx set memory window, m pc
*j xxxx set sega PC