Skip to content

Instantly share code, notes, and snippets.

View ravachol70's full-sized avatar

ravachol ravachol70

View GitHub Profile
/*
this bot assumes you've already enabled borrowing on compound.finance,
that you already approved transfers on behalf of DAI and USDC
(can do here https://chiragkhatri.me/compound-liquidator), and that you have
DAI and USDC on your Ether address, while having nothing lent or borrowed yet.
Author: Jarett Dunn jare@coindexlabs.com
*/
let request = require('request-promise')
const CoinbasePro = require('coinbase-pro');
const publicClient = new CoinbasePro.PublicClient();
@ravachol70
ravachol70 / FizzBuzz.hs
Created June 9, 2019 01:04 — forked from i-am-tom/FizzBuzz.hs
Arguably the fastest implementation of FizzBuzz ever written.
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UnsaturatedTypeFamilies #-}
import GHC.TypeLits
import Prelude hiding (Functor, Semigroup)
type Main = (Fizz <> Buzz) <$> (0 `To` 100)
@ravachol70
ravachol70 / Category.agda
Created May 31, 2019 01:44 — forked from mietek/Category.agda
Definition of a category as an Agda record: level polymorphic in the objects and arrows
module Category where
open import Agda.Primitive public
using (Level ; _⊔_ ; lzero ; lsuc)
open import Agda.Builtin.Equality public
using (_≡_ ; refl)
record Category ℓ ℓ′ : Set (lsuc (ℓ ⊔ ℓ′)) where
@ravachol70
ravachol70 / Coffee.sol
Created April 24, 2019 13:12 — forked from ricmoo/Coffee.sol
Contract Addresses: Coffee Contract Example
/**
* Coffee
*
* Just a very simple example of deploying a contract at a vanity address
* across several chains.
*
* See: https://blog.ricmoo.com/contract-addresses-549074919ec8
*
*/
@ravachol70
ravachol70 / Hello.java
Created March 27, 2019 20:53 — forked from martintrojer/Hello.java
clojure-akka-vision
package akka.tutorial.first.java;
import akka.actor.ActorRef;
import akka.actor.UntypedActor;
import akka.actor.UntypedActorFactory;
import akka.actor.ActorSystem;
import akka.actor.Props;
public class Hello {
@ravachol70
ravachol70 / witness
Created June 11, 2018 00:44 — forked from gavofyork/witness
The Witness Algorithm: Privacy Protection in a Fully Transparent System
# The Witness Algorithm: Privacy Protection in a Fully Transparent System
By **Vlad Gluhovsky** and **Gavin Wood**
# Introduction
Being based upon a quasi-Turing-complete (quasi because it's actually bounded) virtual machine, Ethereum is an extremely versatile system. However one of its greatest strengths---universal auditability---seems to lead to a fatal flaw, namely an inescapable lack of privacy. Here we demonstrate an algorithm in order to prove that this is not the case.
The algorithm could be used to make an Ethereum contract which, given two sets of addresses sources, `src`, and destinations, `dest`, will guarantee exactly one of two possible eventualities:
- For each address in `src`, the controller of that address controls a corresponding address in `dest` (though the two cannot be related *a priori*).