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
#!/bin/bash | |
# removes orphaned appledouble files | |
# by null_radix | |
DIR="/path/to/dir" | |
cd $DIR | |
for i in ./._* | |
do | |
FILE=${i:4} |
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
""" | |
Compute discrete log modulo a prime p | |
In other words finds a x such that h=g^x in ℤp. | |
Implements the meet in the middle attack | |
author: mjbecze <mjbecze@gmail.com> | |
""" | |
import gmpy2 | |
from gmpy2 import mpz |
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
.node circle { | |
fill: #fff; | |
stroke: steelblue; | |
stroke-width: 1.5px; | |
} | |
.node { | |
font: 10px sans-serif; | |
} |
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
//npm install rlp | |
//npm install levelup | |
//usage | |
//node ./dumpBlocks.js > blocks.json | |
var rlp = require('rlp'); | |
var levelup = require('levelup'); | |
var db = levelup('/path/to/home/.ethereum/blocks'); | |
var blocks = []; |
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 that +mjb is my Bitcoin username. You can send me #bitcoin here: https://onename.io/mjb |
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
//npm install ethereum-lib | |
//npm install level | |
var Ethereum = require('ethereum-lib'), | |
levelup = require('levelup'); | |
var internals = {}, | |
Trie = Ethereum.Trie, | |
rlp = Ethereum.rlp, | |
etherUtils = Ethereum.utils, |
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
eth.getKey(function(key) { | |
eth.getStorageAt("someaddr", "somelocation", function(address) { | |
eth.compile("thiscode", function(code) { | |
eth.transact({to: address, from: key, gas: 10000, gasPrice: eth.gasPrice, data:[code]}, function(tx){ | |
console.log(tx) | |
}) | |
}) | |
}) | |
}) |
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
var ecdsa = require('./'); | |
var emptyMsg = new Buffer([0]); | |
var privKey = "c85ef7d79691fe79573b1a7064c19c1a9819ebdbd1faaab1a8ec92344438aaf4"; | |
var pubKey = ecdsa.createPublicKey(new Buffer(privKey, 'hex'), true); | |
var sig = ecdsa.signCompact(new Buffer(privKey, 'hex'), emptyMsg); | |
console.log('recid: ', sig.recoveryId) |
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
t = new Buffer('020947751e3022ecf3016be03ec77ab0ce3c2662b4843898cb068d74f698ccc8ad', 'hex'); | |
var p =ecdsa.decompressPublicKey(t); | |
console.log(p.toString('hex')); | |
///040947751e3022ecf3016be03ec77ab0ce3c2662b4843898cb068d74f698ccc8ad75aa17564ae80a20bb044ee7a6d903e8e8df624b089c95d66a0570f051e5a05b |
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
{ | |
"env": { | |
"node": true | |
}, | |
"rules": { | |
"strict": 0, | |
"no-underscore-dangle": 0, | |
"quotes": [2, "single"] | |
}, | |
"globals":{ |
OlderNewer