Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / introrx.md
Last active July 19, 2024 22:21
The introduction to Reactive Programming you've been missing
@drwasho
drwasho / DEX-OB.md
Last active November 5, 2017 14:53
Distributed currency exchange in OpenBazaar

Distributed Currency Exchange on OpenBazaar

Introduction

OpenBazaar allows for the decentralised exchange of types of currencies using the flexible Ricardian contract system. Currency exchanges are not limited trades between crypto-currencies, but can also facilitate exchanges with fiat currencies using reverisble and non-reversible payment systems.

Currency Exchanges

Fundamentally, currency exchanges require a matching of buy and sell orders at a certain price for a given volume. Firstly, buy and sell orders will be created and issued as a Ricardian contract, formatted according to a specialised 'currency' template in OpenBazaar. Secondly, matching buy and sell orders theoretically will be mediated over exchange nodes, which may also function as arbiters for each exchange. Alternative, buy and sell orders may be matched over the OpenBazaar distributed hash table. Finally, private exchanges can be made bet

@adriengibrat
adriengibrat / Object.prototype.watch.js
Last active April 23, 2020 19:24
Object.prototype.watch "polyfill"
/**
* Object.prototype.watch polyfill
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch
*
* Known limitations:
* - `delete object[property]` will remove the watchpoint
*
* Based on Eli Grey gist https://gist.github.com/eligrey/384583
* Impovements based on Xose Lluis gist https://gist.github.com/XoseLluis/4750176
* This version is optimized for minification