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 / client.c
Last active February 4, 2025 22:24
PicoTLS Handshake
// client.c
#include <picotls.h>
#include "picotls/openssl.h"
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
#define PORT 8443
@richard-ramos
richard-ramos / publisher.nim
Last active January 14, 2025 19:14
Publisher/Subscriber
import
std/[tables, times, sequtils],
stew/byteutils,
stew/shims/net,
chronicles,
results,
chronos,
confutils,
libp2p/crypto/crypto,
eth/keys,
{
"jsonrpc": "2.0",
"id": 0,
"result": {
"16Uiu2HAm8mUZ18tBWPXDQsaF7PbCKYA35z7WB2xNZH2EVq1qS8LJ": {
"protocols": [
"/vac/waku/filter-subscribe/2.0.0-beta1",
"/vac/waku/filter/2.0.0-beta1",
"/vac/waku/peer-exchange/2.0.0-alpha1",
"/libp2p/autonat/1.0.0",
package main
import (
"context"
"crypto/rand"
"encoding/hex"
"fmt"
"net"
"os"
"os/signal"
package main
import (
"context"
"fmt"
"net"
"os"
"os/signal"
"syscall"
"time"
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name="viewport" />
<link rel="icon" href="data:,">
<title>String art</title>
<script type="text/javascript" src="jquery.min.js"></script>
<style>
html, body {
import collections
import math
import os
import cv2
import numpy as np
import time
MAX_LINES = 4000
N_PINS = 36*8
MIN_LOOP = 20 # To avoid getting stuck in a loop
@richard-ramos
richard-ramos / libgowaku.h
Created August 4, 2023 12:19
libgowaku.h
/* Code generated by cmd/cgo; DO NOT EDIT. */
/* package github.com/waku-org/go-waku/library/c */
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h>
#ifndef GO_CGO_EXPORT_PROLOGUE_H
@richard-ramos
richard-ramos / rln-trusted-setup-ceremony_attestation.log
Created August 2, 2023 13:01
Attestation for RLN Trusted Setup Ceremony MPC Phase 2 Trusted Setup ceremony
Hey, I'm richard-ramos-1106587 and I have contributed to the RLN Trusted Setup Ceremony MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (rln-withdraw)
Contributor # 18
Contribution Hash: 08410046 ed2a6cad f31e3330 4a64d190
3246042e 42463023 57745d72 79fe8ff0
a74ea086 024d4f4c 6805daf7 2191ab43
24118c57 0fb5ceb5 4c96fe34 5b0b897b
@richard-ramos
richard-ramos / main.go
Last active September 11, 2023 14:41
Producer/Consumer
package main
import (
"context"
"fmt"
"os"
"os/signal"
"syscall"
)