Skip to content

Instantly share code, notes, and snippets.

View sbmsr's full-sized avatar
👋
Welcome to my page!

seb sbmsr

👋
Welcome to my page!
View GitHub Profile
@sbmsr
sbmsr / attestation.txt
Created September 13, 2021 19:01
Attestation
I contributed to the clr.fund Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: qvt32
Contributor # 1
Hash: d1971682 7a00b1f5 cdf4e81e 60d032b7
5cd367f4 064067ee 766b9cff eb496900
ddbd258a 2d99998e 66f2fa15 c01a59e6
7a1fe87c 868a4da8 ed21f44e 73d27f44
@sbmsr
sbmsr / csv_2_json.sh
Created May 26, 2022 21:53
Turn CSV into JSON
cat my.csv | python -c 'import csv, json, sys; print(json.dumps([dict(r) for r in csv.DictReader(sys.stdin)]))
@sbmsr
sbmsr / main.ts
Created July 29, 2024 19:05
recurse db server
const DB: Record<string, string> = {};
Deno.serve({ port: 4000 }, (req: Request) => {
const reqUrl = new URL(req.url);
switch (reqUrl.pathname) {
case "/get": {
try {
const key = parseGetParams(reqUrl.searchParams);
if (Object.keys(DB).includes(key)) return res(200, DB[key]);
return res(404, { error: `DB key "${key}" not found in db.` });
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
addEventListener("DOMContentLoaded", () => {
let a = document.getElementById("a");
let b = document.getElementById("b");
let c = document.getElementById("c");
let ul = document.getElementById("ul");
a.addEventListener("click", () => console.log("a was clicked"))