Skip to content

Instantly share code, notes, and snippets.

@k26dr
k26dr / eosbethacked.cpp
Created October 15, 2018 07:58
Contract used to hack EOS Bet
#include <eosiolib/eosio.hpp>
#include <eosiolib/types.hpp>
extern "C" {
[[noreturn]] void apply( uint64_t receiver, uint64_t code, uint64_t action ) {
require_recipient(N(eosbetdice11));
}
}
@k26dr
k26dr / sudo-validation.md
Last active September 24, 2018 12:45
Validate Sudo Multisig Proposals

Sudo Validation

Implementing sudo requires 15/21 BPs to approve two separate proposals. One to create the eosio.sudo account, another to deploy the eosio.sudo contract. The first transation has to be executed before the second can be proposed.

Create Sudo Account

You can review the first createsudo transaction with:

cleos multisig review libertyblock createsudo
@k26dr
k26dr / alternate-sudo.cpp
Last active July 9, 2018 15:40
Alternative eosio.sudo proposal
// Add arbitration to eosio.sudo multisig
{
"threshold": 2,
"accounts": [
{"permission": {"actor": "eosio.prods", "permission": "active"}, "weight": 1},
{"permission": {"actor": "eosio.ecaf", "permission": "active"}, "weight": 1},
]
}

Keybase proof

I hereby claim:

  • I am k26dr on github.
  • I am libertyblockapi (https://keybase.io/libertyblockapi) on keybase.
  • I have a public key whose fingerprint is D789 85C9 D3F4 C43C 2B73 46B4 86C5 AF17 AB9F B507

To claim this, I am signing this object:

@k26dr
k26dr / libertyblock-announcement.md
Last active May 16, 2018 04:34
Announcing the LibertyBlock Block Producer Candidacy

LibertyBlock is the fusion of Everipedia, The Dollar Vigilante, and Ikigai Asset Management. Our goal is to be the most transparent, accountable, and cooperative block producer.

We believe that a worldwide technology should have worldwide representation. Our block production servers will be in Bhutan and represent the voice of South Asia. In addition, we have team members in Mexico, Puerto Rico, India, and Colombia -with offices in the United States and Canada.

We are united by the cryptonarchist principles that gave birth to crypto. United in this pursuit for freedom, we place our candidacy as EOS’s LibertyBlock.

In Teotihuacan Mexico, the Nahuatl tribe- the creators of the pyramids- have partnered up with us in creating a LibertyBlock community center- for crypto learning- at their compound alongside the Pyramid of the Moon and the Path of the Milky Way.

Our Bhutanese friends, who know best the needs of their homeland, are currently spearheading research on how LibertyBlock can best assist in th

@k26dr
k26dr / transaction-relay.md
Last active March 7, 2018 21:39
Relaying Transactions from Ethereum to EOS
<script> document.getElementById('ga-logo').innerHTML = `

Everipedia `; document.getElementById('ga-logo').style.display = "flex"; document.getElementById('logo-image').style.width = "50px"; document.getElementById('logo-image').style.margin = "0 5px"; document.getElementById('logo-text').style.fontWeight = "bold"; document.getElementById('logo-text').style.color = "white";
@k26dr
k26dr / rinkeby-faucet
Last active September 8, 2017 18:11
Ethereum Testnet Rinkeby Faucet Gist
0x2fbd98e03bd62996b68cc90dd874c570a1f94dcc
@k26dr
k26dr / behavioral-cloning-alexnet-modified.py
Last active February 13, 2017 23:38
Modified CNN based off AlexNet for Behavioral Cloning CarND project
model = Sequential()
# Output = 55 x 55
model.add(Lambda(lambda x: x / 255 - 0.5, input_shape=(227, 227, 3)))
model.add(Convolution2D(48, 11, 11, subsample=(4,4)))
model.add(Activation('relu'))
# Output = 27 x 27
model.add(MaxPooling2D((3,3), strides=(2,2)))
model.add(Convolution2D(128, 5, 5, border_mode='same'))
@k26dr
k26dr / chromebook-chroot-basics.sh
Last active August 14, 2016 23:50
Install basic programs I want in all my Chromebook chroots
#!/bin/bash
# Install a bunch of programs that I want on every chroot
sudo apt-get update
sudo apt-get install git -y
git config --global user.email "kedarmail@gmail.com"
git config --global user.name "Kedar Iyer"
git config --global push.default simple
sudo apt-get install vim -y
sudo apt-get install python3-pip -y
@k26dr
k26dr / heartbeat-lcd.js
Created August 8, 2016 18:29
Linking a Johnny 5 Tessel kit LCD screen up to the heart rate sensor
var five = require("johnny-five");
var Tessel = require("tessel-io");
var tessel = require('tessel');
var board = new five.Board({
io: new Tessel()
});
var pin = tessel.port.B.pin[2];
var startTime = new Date().getTime()
var high = true