View log2.sol
function log2(uint x) returns (uint y){
assembly {
let arg := x
x := sub(x,1)
x := or(x, div(x, 0x02))
x := or(x, div(x, 0x04))
x := or(x, div(x, 0x10))
x := or(x, div(x, 0x100))
x := or(x, div(x, 0x10000))
x := or(x, div(x, 0x100000000))
View keybase.md

Keybase proof

I hereby claim:

  • I am tjade273 on github.
  • I am tjade273 (https://keybase.io/tjade273) on keybase.
  • I have a public key ASDR9HNQsRzpOcLNM6uc4IPWn_ljtln2BCEpx78JBwhNiAo

To claim this, I am signing this object:

View MultiProxy.sol
contract MultiProxy{
//Data schema: [from: 32 bytes, to: 32 bytes, value: 32 bytes, data_length: 32 bytes, data: data_length bytes]
function forward(bytes32[]) external payable {
assembly {
function next_tx (c) -> n {
let data_size := calldataload(add(c, 96))
n := add(c, add(128, mul(div(data_size, 32), 32)))
switch mod(data_size, 32)
case 0 {
View multiply.cpp
#include <gtest/gtest.h>
#include <gadgetlib2/gadget.hpp>
#include "gadgetlib2/adapters.hpp"
#include "gadgetlib2/integration.hpp"
#include "relations/constraint_satisfaction_problems/r1cs/examples/r1cs_examples.hpp"
#include "gadgetlib2/examples/simple_example.hpp"
#include "zk_proof_systems/ppzksnark/r1cs_ppzksnark/examples/run_r1cs_ppzksnark.hpp"
using namespace libsnark;
View disasm.js
function disasm(code) {
if (!code)
return code;
var codes = code.match(/(..?)/g);
var dis = "";
for(var i = 1; i < codes.length; i++) {
var opcode = opcodes[codes[i]];
dis += i+". " + codes[i]+": "
if (!opcode) {
View hash.py
rom Crypto.Cipher import AES
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import sys
class Hasher:
def __init__(self):
self.aes = AES.new('\x00'*16)
def reset(self):
View StringFetch.sol
contract StringStore {
mapping(uint => string) public myStrings;
function storeString(string str, uint i) public {
myStrings[i] = str;
}
}
contract GetString {
function getString(address store, uint i) constant returns (string s, uint l){
bytes4 sig = bytes4(sha3("myStrings(uint256)"));
View gist:a573a982b0461f5c9adee7b542d62453
library LinkedList {
struct data {
uint80 head;
uint80 last;
uint80 count;
Item[] items;
}
uint80 constant None = uint80(0);
struct Item {
uint80 prev;
View SplitFunds.sol
contract SplitFunds {
function split(address[] addrs){
if(!addrs[uint(block.blockhash(block.number-1)) % addrs.length].send(msg.value)) throw;
}
}