This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Benchmark = require('benchmark') | |
const ssz = require('../ssz-js/src') | |
const {serialize, deserialize, hashTreeRoot} = require('../ssz-ts/lib') | |
const suite = new Benchmark.Suite | |
const SubObj = { | |
fields: [ | |
['x', 'uint8'], | |
['y', 'uint16'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Benchmark = require('benchmark') | |
const BN = require('bn.js') | |
const suite = new Benchmark.Suite | |
// native numbers | |
let num_a, num_b | |
// BN.js numbers | |
let bn_a, bn_b | |
// native BigInt numbers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Benchmark = require('benchmark') | |
const BN = require('bn.js') | |
const suite = new Benchmark.Suite | |
let num_a, num_b | |
let bn_a, bn_b | |
const randInt = () => Math.floor(Math.random() * 2**24) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Author: helour | |
# Copyright: 2013-2015 helour | |
# Based on the cr33dog's script Export Layers as PNG (http://registry.gimp.org/node/18440) | |
# License: GPL v3+ | |
# | |
# Version: 0.7.1 | |
# | |
# GIMP plugin to export layers as a multiple pages PDF file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; multi-addr identity with address voting | |
;; | |
;; addresses have 4 commands (transaction types): | |
;; - vote_add(address,category,permission,lifespan) | |
;; - tx.data[0]==0 | |
;; - This initiates a vote for `address` to be added to the member list. | |
;; This only works on addresses with a stored state of none(0) or | |
;; adding(1). If the vote total for `address` reaches 50% of voting | |
;; members, `address` is added to the member list. The category, | |
;; permission, lifespan args are optional once vote has been started. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying myself: My Bitcoin username is +wemeetagain. https://onename.io/wemeetagain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if tx.sender != CONTRACTCREATOR: | |
stop | |
if tx.data[0] == 0: | |
contract.storage[1000+tx.value[1]] = tx.value[2] | |
elif tx.data[0] == 1: | |
suicide(CONTRACTCREATOR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// data[0] = topic | |
// data[1] = message | |
if tx.data[0]: | |
NEXTINDEX = contract.storage[sha3(tx.data[0])] | |
contract.storage[sha3(tx.data[0]) + 1 + NEXTINDEX] = tx.data[1] | |
contract.storage[sha3(tx.data[0])] = NEXTINDEX + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if tx.sender == CONTRACTCREATOR: | |
if tx.data[0] == 1: | |
suicide(CONRACTCREATOR) | |
else: | |
NEXTINDEX = contract.storage[999] | |
contract.storage[1000 + NEXTINDEX] = tx.data[0] | |
contract.storage[999] = NEXTINDEX + 1 |
NewerOlder