Skip to content

Instantly share code, notes, and snippets.

View elmariachi111's full-sized avatar
๐Ÿ—
chicken

Stefan Adolf elmariachi111

๐Ÿ—
chicken
View GitHub Profile
@elmariachi111
elmariachi111 / gist:daf738fdd9e37eaada1a3d526c8ffe1f
Last active July 21, 2026 17:28
Sample Challenge: Collatz Stopping Time of 27
---
profile: agora_markdown_bounty_challenge_v0
escrow_amount: "1234000"
submission_deadline: 1784706300
payout_policy: winner_take_all
---
# Collatz Stopping Time of 27
## Summary
@elmariachi111
elmariachi111 / bounty-ideas.md
Created July 15, 2026 13:55
Ideas for Agora Sample Bounties

Sample Bounty Ideas (playful / easy-but-not-trivial)

Highly summarized pitches, meant as raw input for the poster skill to turn into full bounty_challenge.md drafts โ€” not full specs themselves.


1. Digits of Pi

Pitch: Compute the first 100 digits of Pi after the decimal point. Input: none (self-contained math task).

What is a Sun-Synchronous Orbit?

researched, extracted and summarized by Minimax-m3, Jul 1st 2026

The short version

A sun-synchronous orbit (SSO) is a near-polar low-Earth orbit (typically 600โ€“800 km up, at an inclination of about 98ยฐ) that is carefully tuned so the satellite crosses any given point on Earth at the same local solar time every day โ€” for example, always at about 10:30 in the morning. The orbit is "in sync" with the Sun, not with the Earth's rotation.

How it works (the clever trick)

@elmariachi111
elmariachi111 / pipeline.md
Created March 11, 2026 10:11
new-session-hook-5m

PIPELINE.md โ€” Hook Agent Operating Manual

This file is read by the isolated agent that wakes up on every LiteFold webhook callback (POST to hooks/agent) and every BIOS polling cycle. It defines all decision logic.

You are a pipeline controller, not a researcher. Your job is to evaluate results, advance gates, and notify Martin at decision points. Keep responses terse and factual.


Your Environment

If you need to auth against Nillion using an external wallet (and not a keypair), e.g. Privy / Metamask, you have several options. Good to know: Tim / Nillion Core already has merged EIP-712 support for account auth against NUCs / the Nillion nodes. This will solve *a lot* that I built customly.
Here's the approach that I built at https://welshare.health to make something similar work, but we're additionally deriving purpose driven keypairs from Privy keys, using their signature over purpose-oriented EIP-712 payloads. Here's our docs: https://docs.welshare.app/basics/key-management. We're caching the private keys ephemerally on the user's client. This might change, as `did:nil` seems to be deprecated and replaced with the well understood did:key method soon (ask Nillion for reasoning, I'm just a "client" here ;) )
If you feel adventurous, Privy actually *can* sign raw data, that would imo also work for other ecdsa / secp256 based chains (like Cosmos): https://docs.privy.io/wallets/using-wallets/other-chains
@elmariachi111
elmariachi111 / skincare.questionnaire.json
Created September 21, 2025 08:21
A fhir questionnaire that captures base properties for skin care research
{
"resourceType": "Questionnaire",
"id": "dermadao-skin-care-assessment-v1",
"version": "1.0.0",
"name": "SkinCareAssessmentQuestionnaire",
"title": "Skin Care Assessment Questionnaire",
"status": "active",
"experimental": false,
"date": "2025-09-15T00:00:00Z",
"publisher": "DermaDAO",
@elmariachi111
elmariachi111 / findrisc-loinc.json
Created August 25, 2025 08:24
loinc's findrisc fhir spec
{
"resourceType": "Questionnaire",
"id": "97055-8",
"meta": {
"versionId": "9",
"lastUpdated": "2025-02-26T20:49:17.503+00:00",
"source": "#e6hBXlNCA3ym4tDd"
},
"url": "http://loinc.org/q/97055-8",
"name": "FINDRISC_pnl_FINDRISC",
@elmariachi111
elmariachi111 / nil.js
Last active July 24, 2025 18:57
secp256k1 signature verification
import { secp256k1 } from "@noble/curves/secp256k1";
import { sha256 } from "@noble/hashes/sha2";
import { bytesToHex } from "@noble/hashes/utils";
import { toHex } from "viem";
// this is some public address, which deals as the message to be signed
const ADDRESS = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8";
/**
* this is nillion's implemenation of the sign function
@elmariachi111
elmariachi111 / lit.ts
Last active June 5, 2025 08:29
Lit capacity credit delegation & session sig creation
import {
createSiweMessage,
generateAuthSig,
LitAbility,
LitAccessControlConditionResource,
newSessionCapabilityObject,
type AuthSig,
} from '@lit-protocol/auth-helpers'
import {
decryptToFile,
@elmariachi111
elmariachi111 / blind_attestation.md
Created June 2, 2025 13:13
blinded proof of participation

Proof of Study Participation

We enable users to prove that they participated in a clinical trial / study without the conducting service or company (RH) being aware of the "crypto" aspect of their user identity. On the other hand, the prover (us) shouldn't learn anything about the actual user. Welshare's protocol also neither publicy correlates any user ids or personally idenitifiable information.

To enable this blindfolded proof issuance, we require minimal action on the service company's (RH) side. To initiate the proof creation process, they must be able to

  • identify one user by an unique identifier (UID) that can be unique for a trial instance
  • store a random array of bytes ("nonce") per user, ideally using a crypograpically sufficiently safe RNG. The nonce helps deidentifying the user
  • display the UID & the indidual nonce to the user / allow them to request it
  • invite study participants by their preferred means of communication to a decentralized web application, hosted by welshare