Skip to content

Instantly share code, notes, and snippets.

View richard-ramos's full-sized avatar
👷‍♂️

richΛrd richard-ramos

👷‍♂️
View GitHub Profile
@richard-ramos
richard-ramos / main.go
Created March 9, 2023 18:28
relay.msgIdFn
import (
"crypto/sha256"
"hash"
"sync"
)
var sha256Pool = sync.Pool{New: func() interface{} {
return sha256.New()
}}
@richard-ramos
richard-ramos / test.sh
Last active February 21, 2023 20:12
Test that status-go works with some fleet
#!/bin/sh
# Requires https://github.com/status-im/status-go/pull/3218 to be merged
# and a status-desktop version containing this status-go commit to have been merged
# The following environment variables can be used:
# ENRTREE_ADDRESS: use a custom enrtree address instead of the default status.prod
# GIT_BRANCH: by default it will attempt to retrieve the latest desktop release,
# but you can specify a commit/branch/tag here instead
#
# Examples:
richard@laptop:~/helloworld/android$ ./gradlew bundleRelease
> Task :react-native-gradle-plugin:compileKotlin
w: /home/richard/helloworld/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (10, 37): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/richard/helloworld/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (119, 30): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/richard/helloworld/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (135, 26): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/richard/helloworld/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (157, 32): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/richard/helloworld/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactExtension.kt: (163, 31): 'BaseVariant' is deprecated. Deprecated in Java
w: /home/
@richard-ramos
richard-ramos / main.go
Created January 12, 2023 13:15
Lightpush
package main
import (
"context"
"crypto/rand"
"encoding/hex"
"fmt"
"net"
"os"
"os/signal"
/* tslint:disable */
/* eslint-disable */
/**
*/
export function init_panic_hook(): void;
/**
* @param {number} tree_height
* @param {any} circom_buffer
* @param {any} zkey_buffer
* @param {any} vk_buffer
[package]
name = "myproject"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib"]
[dependencies]
wasm-bindgen = "0.2"
@richard-ramos
richard-ramos / CID list
Last active August 11, 2022 13:44
Get all packs cids
QmPF2C8DZCw6QonaLC9iggYrrq3JwuxKdHwU6FFeeVqhVd
QmTsMLJ7seDwTA3KC7W8iTvTvFkRuPVHd5BQ4MiQdWf2kn
Qmd3hJM3YtnL3jS6BX96H4shGbJsNdTuVWK3E4xwtBaz5F
QmXxe9r217cvLZD8sb2pwYHcGUdtFRFAPGdQ2NbbVSxS92
QmbbBdLzGqtZdDt1rUBip6zPvHog8Cjv2GzDkPmJppcvfB
QmXHhG8aksobX5yrwGyyPTDeVkBYjaz3w1uM4jWYJhQwYy
QmUhshXzQPHQBqEBKh1nmHEAqfywcCTBBMHxkFct8sEuKz
QmYyiayaAu2yNBu7dCTwKLjnbmXvaaREmqfHfr2MYmk6hy
QmNdjqR5VFRFFJDwBXKeMWN12ZZUx7fxdbovwGv5u14iHa
Qmc2DDM1whhCGYGRjQhKRyzKbKFdz4jxeVyzRnFauXkKJE
@richard-ramos
richard-ramos / 00_readme.md
Created July 16, 2022 22:31 — forked from p4bl0-/00_readme.md
A complete compiler for a simple language (in less than 150 LoC)

This project is a tiny compiler for a very simple language consisting of boolean expression.

The language has two constants: 1 for true and 0 for false, and 4 logic gates: ! (not), & (and), | (or), and ^ (xor).

It can also use parentheses to manage priorities.

Here is its grammar in BNF format:

expr ::= "0" | "1"

1) Discovery [live data]
Check pre-defined nodes against hosted JSON [live data]:
AssertionError: expected { …(3) } to deeply equal { …(3) }
+ expected - actual
{
- "node-01.ac-cn-hongkong-c.wakuv2.prod": "/dns4/node-01.ac-cn-hongkong-c.wakuv2.prod.statusim.net/tcp/443/wss/p2p/16Uiu2HAm4v86W3bmT1BiH6oSPzcsSr24iDQpSN5Qa992BCjjwgrD"
- "node-01.do-ams3.wakuv2.prod": "/dns4/node-01.do-ams3.wakuv2.prod.statusim.net/tcp/443/wss/p2p/16Uiu2HAmL5okWopX7NqZWBUKVqW8iUxCEmd5GMHLVPwCgzYzQv3e"
- "node-01.gc-us-central1-a.wakuv2.prod": "/dns4/node-01.gc-us-central1-a.wakuv2.prod.statusim.net/tcp/443/wss/p2p/16Uiu2HAmVkKntsECaYfefR1V2yCR79CegLATuTPE6B9TxgxBiiiA"
/* Code generated by cmd/cgo; DO NOT EDIT. */
/* package github.com/status-im/go-waku/library */
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h> /* for ptrdiff_t below */
#ifndef GO_CGO_EXPORT_PROLOGUE_H