Skip to content

Instantly share code, notes, and snippets.

View mesquka's full-sized avatar
📷
#BUIDL

Kieran Mesquita mesquka

📷
#BUIDL
View GitHub Profile
@mesquka
mesquka / 1_Utilities.md
Last active April 5, 2024 00:43
Utility scripts for bin folder :)

Utility bin scripts

@mesquka
mesquka / matcher.ts
Last active March 18, 2024 11:06
Chai ethersjs v5 struct/return value matcher
import { Result } from '@ethersproject/abi';
import chaiLocal from 'chai';
import { ethers } from 'ethers';
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace Chai {
interface Assertion {
matchStruct(expected: unknown): void;
}
@mesquka
mesquka / near_derivation.js
Created August 16, 2021 04:24
Derive near keys from seed
const bip32 = require('ed25519-hd-key');
const nacl = require('tweetnacl');
const bip39 = require('bip39');
const bs58 = require('bs58')
const path = "m/44'/397'/0'"
const mnemonic = 'test test test test test test test test test test junk';
const seed = bip39.mnemonicToSeedSync(mnemonic);
const keySeed = bip32.derivePath(path, seed).key;
@mesquka
mesquka / ReadFileToHex.js
Last active April 1, 2021 01:25
Reads file and prints as hex string in a single line of JS (NodeJS)
console.log(require('fs').readFileSync(process.argv[2]).toString('hex'));
@mesquka
mesquka / monero.sh
Created July 14, 2020 15:48
Run a self-updating Monero node
#!/bin/bash
RPC_USER=username
RPC_PASS=password
run()
{
docker rm -f "monerod"
docker image rm -f xmrto/monero:latest
@mesquka
mesquka / incognito_eth.sh
Last active January 16, 2021 18:40
Run multiple vNodes on the same machine/cloud VM
#!/bin/bash
validator_keys=(
"KEY 1"
"KEY 2"
"KEY 3"
...
"KEY X"
)
@mesquka
mesquka / keybase.md
Last active March 31, 2019 00:58
keybase.md

Keybase proof

I hereby claim:

  • I am mesquka on github.
  • I am mesquka (https://keybase.io/mesquka) on keybase.
  • I have a public key whose fingerprint is 60CB 4E4F 84F1 27C0 9C35 DD1D 44D2 D0D3 8BAC 951A

To claim this, I am signing this object: