Skip to content

Instantly share code, notes, and snippets.

View dantrevino's full-sized avatar
💭
I may be slow to respond.

Dan Trevino dantrevino

💭
I may be slow to respond.
View GitHub Profile
@abdelghafour
abdelghafour / BTC Collateralization.md
Last active March 6, 2024 20:27
BTC Collateralization Through Flow API

Create the Stake:

import axios from "axios";


const headers = { Authorization: MY_COMPANY_API_KEY };
const data = {
  fee: SUGGESTED_NETWORK_FEES,
  staker: {
@nickfarrow
nickfarrow / malleablefrost.md
Last active May 13, 2024 05:03
Modifying FROST Threshold and Signers

Modifying FROST Signers and Threshold

FROST's distributed key generation involves N parties each creating a secret polynomial, and sharing evaluations of this polynomial with other parties to create a distributed FROST key.

The final FROST key is described by a joint polynomial, where the x=0 intercept is the jointly shared secret s=f(0). Each participant controls a single point on this polynomial at their participant index.

The degree T-1 of the polynomials determines the threshold T of the multisignature - as this sets the number of points required to interpolate the joint polynomial and compute evaluations under the joint secret.

T parties can interact in order to interpolate evaluations using the secret f[0] without ever actually reconstructing this secret in isolation (unlike Shamir Secret Sharing where you have to reconstruct the secret).


@cryptoskillz
cryptoskillz / gist:98b8e7090b7cc8d51531bb9dcfe7654a
Created December 5, 2021 16:48
Tips on how to use a KV namespace with Cloudflare Pages
This gist aims to show you how to use KV datastore using Cloudflare pages. The reason I created this quick guide is it took
me almost 2 weeks to get it working, mainly because it is very new and the documentation is not up fully fleshed out yet
https://developers.cloudflare.com/workers/runtime-apis/kv
https://developers.cloudflare.com/pages/platform/functions
https://blog.cloudflare.com/wrangler-v2-beta/
Steps:
Install wrangler 2
@RubenSomsen
RubenSomsen / Resources.md
Last active April 5, 2024 13:56
Links to my work, accessible via tiny.cc/somsen

Introduction

I'm Ruben Somsen, Bitcoin Sorcerer. I do protocol design in order to enhance Bitcoin.

I'm sponsored by Spiral, Superlunar/Gemini, HRF, and am currently working on Silent Payments with Josie, assisting Davidson with the implementation of Proof-of-Work fraud proofs into Floresta, and Raj with continuing the work on Teleport (Belcher's Coinswap protocol).

I also help maintain the bitcoin-dev mailing list, co-hosted the Unhashed Podcast, founded the Seoul Bitcoin Meetup in 2014, actively co-organizing BitDevs Amsterdam, and on the layer two funding sub-committee of OpenSats.

You can find me on [Twitter](https://twitter.com/SomsenRube

@fanvyr
fanvyr / README.md
Last active April 4, 2019 17:35
A smooth registration form

Registration Form

Demo registration-demo

Notes

API check
The snippet tries to verify if the mail is okay or bad in general by reaching out to my/a backend.
Therefor the statuscode is important: return a 2xx for okay, and a 4xx with a message for not okay.

Explanation of how using Schnorr signatures, we can achieve an atomic swap of the "scriptless script" style.

This is based on Poelstra's ideas as summarised in https://download.wpsoftware.net/bitcoin/wizardry/mw-slides/2017-05-milan-meetup/slides.pdf ; also see the earlier outline in https://lists.launchpad.net/mimblewimble/msg00086.html.

Note that the details here are just my thoughts, so if you come to this randomly, don't take it as some kind of well established protocol!

Preliminaries:

We'll use || for concatenation and capitals for elliptic curve points and lower case letters for scalars.

@PaulKinlan
PaulKinlan / getdeviceart.sh
Last active May 26, 2022 11:20
Screen Record for Android
#! /bin/bash
mkdir -p ./backgrounds
function get_google_device_art {
local device=$1
# Get the Google Device backgrounds
curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_back.png" > "./backgrounds/$1_port_back.png"
curl "https://developer.android.com/distribute/marketing-tools/device-art-resources/$1/port_fore.png" > "./backgrounds/$1_port_fore.png"
@pfleidi
pfleidi / gridstoretest.js
Created December 19, 2010 22:41
Example using the mongodb-native module and step to write to mongodb gridfs
var Db = require('mongodb').Db,
Connection = require('mongodb').Connection,
Server = require('mongodb').Server,
GridStore = require('mongodb').GridStore,
Step = require('step'),
Sys = require('sys'),
Fs = require('fs');
var database;