Skip to content

Instantly share code, notes, and snippets.

View xwh16's full-sized avatar
💘
gotta catch 'em all

xwh16 xwh16

💘
gotta catch 'em all
View GitHub Profile
@HarryR
HarryR / bls12_381.sage
Created September 26, 2019 20:13
Sage script to derive all necessary parameters for BLS12-381 curve (including frobenius coefficients and montgomery reduction constants etc.)
field_modulus = 4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559787
desired_curve_order = 52435875175126190479447740508185965837690552500527637822603658699938581184513
Fp = GF(field_modulus)
PARAM_A4 = 0
PARAM_A6 = 4
E = EllipticCurve(Fp, [PARAM_A4, PARAM_A6])
E_order = E.order()
@zicklag
zicklag / swarm-stack.yml
Last active May 25, 2021 00:31
SeaweedFS Swarm Stack
version: '3.5'
# WARNING: Haven't tested this version of this YAML exactly, but it *should* be correct.
services:
master-1:
image: chrislusf/seaweedfs:latest
networks:
- hostnet
command: "master -port=9333 -defaultReplication=001 -peers=localhost:9333,localhost:9334,localhost:9335"
@danielepolencic
danielepolencic / README.md
Last active May 20, 2024 18:07
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@mauriciopoppe
mauriciopoppe / _README.md
Last active March 30, 2024 09:52
Generic Makefile example for a C++ project
@artjomb
artjomb / PairingLibs.md
Last active June 5, 2024 07:54
List of Pairing Libraries

Pairings can be used for all kinds of advanced cryptographic schemes such as Encryption (Identity-based, Attribute-based, Predicate-based, etc.), Signatures, Zero-Knowledge Proofs, etc. It is in no particular order.

Provides multiple types of Elliptic Curve groups with appropriate pairings on top of them. Code repository resides here.

License: LGPL
Language: C
Thesis: On the Implementation of Pairing-Based Cryptography by Ben Lynn (2007)

@soarez
soarez / ca.md
Last active June 19, 2024 19:32
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

@leifg
leifg / Vagrantfile
Last active November 12, 2023 08:31
Add a second disk to system using vagrant
file_to_disk = './tmp/large_disk.vdi'
Vagrant::Config.run do |config|
config.vm.box = 'base'
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024]
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk]
end
@eendeego
eendeego / bindings-cheat-sheet.md
Created November 28, 2012 10:26
Node/V8 bindings cheat sheet
@matthewmccullough
matthewmccullough / git-compressing-and-deltas.md
Created May 14, 2012 19:05
Git, Compression, and Deltas - An explanation

Git Compression of Blobs and Packfiles.

Many users of Git are curious about the lack of delta compression at the object (blob) level when commits are first written. This efficiency is saved until the pack file is written. Loose objects are written in compressed, but non-delta format at the time of each commit.

A simple run though of a commit sequence with only the smallest change to the image (in uncompressed TIFF format to amplify the observable behavior) aids the understanding of this deferred and different approach efficiency.

The command sequence:

Create the repo: