Skip to content

Instantly share code, notes, and snippets.

View nourharidy's full-sized avatar
🏠
Working from home

Nour Haridy nourharidy

🏠
Working from home
View GitHub Profile
/*
Copyright 2019 Jochem Brouwer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@BjornvdLaan
BjornvdLaan / BLSExample.sol
Last active April 10, 2023 07:49
Verification of BLS signatures and BGLS aggregate signatures in Ethereum
pragma solidity ^0.4.14;
/*
Example of how to verify BLS signatures and BGLS aggregate signatures in Ethereum.
Signatures are generated using https://github.com/Project-Arda/bgls
Code is based on https://github.com/jstoxrocky/zksnarks_example
*/
contract BLSExample {
@frozeman
frozeman / rico.md
Last active January 3, 2019 17:50
Reversible ICO - RICO

Reversible ICO

To increase fairness and responsibility in the ICO space, we propose a new model for an ICO, which we call a ”Reversible ICO” (RICO). This type of ICO improves the power balance between coin buyer and project by flowing funds slowly to the project and allowing coin buyers to withdraw their funds at any point in time.

The ERC 20 Token Standard [Fab] spurred a new era of projects that run ICOs on th Ethereum Blockchain. This is mainly due to the flexibility of a smart contract interface standard, meaning it only defines how to interact with it, but not how it should internally work. This flexibility allows ERC 20 tokens to be used in all kind of smart contract based protocol, and be issued by other smart contracts, like an ICO smart contract.

Current ICOs deploy a smart contract that receives ETH and return tokens (cryptocurrencies, assets, utility tokens, protocol tokens, access tokens, etc.) based on a set ratio. This ratio is sometimes changing over time while the ICO is running, and ma

@DzikuVx
DzikuVx / pid_controller.js
Created January 21, 2017 20:54
Simple JavaScript PID controller
'use strict';
var classes = classes || {};
classes.PidController = function () {
var self = {},
privateScope = {};
/**
@dhoko
dhoko / templateSettings.js
Created February 18, 2014 14:37
Lodash/underscore custom template settings with {{ }}
_.templateSettings = {
evaluate: /{{([\s\S]+?)}}/g,
interpolate: /{{=([\s\S]+?)}}/g,
escape: /{{-([\s\S]+?)}}/g
};