Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>
.box {
width: 100px;
height: 100px;
@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).


aahed
aalii
aapas
aargh
aarti
abaca
abaci
aback
abacs
abaft
@not94
not94 / bloom_filter.py
Last active May 13, 2024 05:02
Bloom Filter
import redis
r = redis.Redis()
class BaseBloomFilter(object):
KEY = "{}"
SHARD = 32
BITSIZE = 2 ** 21
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Delete Boxes</title>
<style>
.box {
width: 100px;
height: 100px;
@rochacbruno
rochacbruno / fastapi_session.py
Last active May 13, 2024 05:01
Session based cookie auth fastapi
from fastapi import Request, Depends, HTTPException, Response
from fastapi.responses import RedirectResponse
# This must be randomly generated
RANDON_SESSION_ID = "iskksioskassyidd"
# This must be a lookup on user database
USER_CORRECT = ("admin", "admin")
# This must be Redis, Memcached, SQLite, KV, etc...
@johshoff
johshoff / new_bashrc.sh
Created August 11, 2012 11:05 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
@TheWover
TheWover / SystemProcessInformation.cpp
Last active May 13, 2024 04:58
Demonstrates use of NtQuerySystemInformation and SystemProcessInformation variants to enumerate processes without opening handles
// Demonstrates use of NtQuerySystemInformation and SystemProcessInformation variants to enumerate processes without opening handles
// Author: TheWover
//
#include <iostream>
#include <string>
#include "ntdefs.h"
bool demoSystemProcessInformation(bool full)
{
@Klerith
Klerith / K8s.README.md
Last active May 13, 2024 04:57
Comandos que utilizaremos para configurar Kubernetes.

Helm commands

  • Crear configuración helm create <nombre>
  • Aplicar configuración inicial: helm install <nombre> .
  • Aplicar actualizaciones: helm upgrade <nombre> .

K8s commands

  • Obtener pods, deployments y services: kubectl get <pods | deployments | services>
  • Revisar todos pods: kubectl describe pods
@ciiqr
ciiqr / zod-optional-null.ts
Last active May 13, 2024 04:56
zod optional/nullable/nullish differences
// zod schema
z.object({
// valid if string or:
optional: z.string().optional(), // field not provided, or explicitly `undefined`
nullable: z.string().nullable(), // field explicitly `null`
nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined`
});
// type
{