Skip to content

Instantly share code, notes, and snippets.

@nijynot
nijynot / bson.md
Created February 12, 2025 18:52
bson.ts
export default class BSON {
  static stringify(value: string, space?: string | number) {
    return JSON.stringify(value, replacer, space);
  }

  static parse(text: string) {
    return JSON.parse(text, reviver);
  }
}
@nijynot
nijynot / react-in-choo.md
Created February 3, 2025 18:47
react-in-choo.md

React-in-Choo

This document will describe how to render React code in Choo. To understand how React can be rendered inside of Choo, we must first understand how Choo renders, and then how React renders.

On Choo rendering

If you navigate to a page, and index.html loads, then the events that are emitted are

  1. DOMContentLoaded
  2. render
@nijynot
nijynot / hyperliquid-validator-guide.md
Last active January 25, 2025 23:56
The Hyperliquid Validator Guide

The Hyperliquid Validator Guide

This document will guide a user through setting up a validator for the Hyperliquid testnet.

Non-validator

The non-validator does not partake in consensus and requires minimal setup. For the non-validator, the ports 4001-4002 need to be open.

echo '{"chain": "Testnet"}' > ~/visor.json
// SPDX-License-Identifier: GNU
pragma solidity ^0.8.0;
import {Nil, Precompile} from "./nil/Nil.sol";
interface IMinter {
function create(uint256 amount, address owner, string memory name, address sendTo) external payable returns (bool);
}
contract NETH {

Keybase proof

I hereby claim:

  • I am nijynot on github.
  • I am nijynot (https://keybase.io/nijynot) on keybase.
  • I have a public key whose fingerprint is 2591 0F3F CBCB 03F4 AEEE 2B1C 435B D5F6 9A22 2C2E

To claim this, I am signing this object:

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0000659849277106424395760548640804408995290780351434779637258237233479994509710741228798150783370100887619377438033167693526702942429697182654493011878525269005203188994707843630425586280653351330985915157318443269951919911843338558470982491431755916195205114278694816511724236597454884393234769708386027141095973505901711338959181760390012965706157115310375754626831923307878372681161001895819387317400377780905723941238677072993462034858618186418423456662549732530346555352972161303767925185029320457754725620640408797162891154141699717277007130178664629800644415855491882461244599836379018101276762826841802229588464560182000565939477215142489571509814530445899074573080143977918275328223397994905921524127879360573382010588716487248303366764807620744247969263760494301687807076405020368894925734813047558173560380133598546065236344376990646941634338855392593294143675546169025011477864936601622428659290983484323976925388107214159592805540621138895463671084001796525165216031087570917633642335787382763161100689536488236
import {
GraphQLInt,
GraphQLObjectType,
GraphQLString
} from 'graphql';
import {
fromGlobalId,
toGlobalId,
globalIdField