Skip to content

Instantly share code, notes, and snippets.

View TOMOAKI12345's full-sized avatar

Tomoaki Sato TOMOAKI12345

View GitHub Profile
@TOMOAKI12345
TOMOAKI12345 / ethereum_gpu_mining_ec2.txt
Created September 1, 2015 00:16
[Ethereum] gpu mining on EC2
GPU mining on ec2
nvidia driver needed
http://markus.com/install-theano-on-aws/
Ubuntu AMI
http://thecloudmarket.com/image/ami-2cbf3e44--ubuntu-server-14-04-lts-hvm-cuda-6-5#/details
mining information
https://forum.ethereum.org/discussion/197/mining-faq-live-updates
@TOMOAKI12345
TOMOAKI12345 / bitcoin_spv_wallet_overview.md
Created August 31, 2015 11:37
Bitcoin SPV Wallet Flow Overview

@TOMOAKI12345
TOMOAKI12345 / gist:5b41d78df73fcf81fb49
Last active August 26, 2015 17:41
Bitcoin standard payment transaction

scriptSig is:

PUSHDATA
signature data (SIGHASH_ALL)
PUSHDATA
public key data

scriptPubKey is:

OP_DUP
@TOMOAKI12345
TOMOAKI12345 / gist:492ad2292299cb1f0e7c
Created August 22, 2015 11:16
geth console send ether
// sendEther(from, to, value)
function sendEther(fromAddr, toAddr, etherValue){
eth.sendTransaction({from:fromAddr, to: toAddr, value:web3.toWei(etherValue), gas:1000000})
}
@TOMOAKI12345
TOMOAKI12345 / gist:a3a0cbae31d0f741d439
Created August 22, 2015 11:15
geth console check all balances in the wallet.
$ geth console
// get all accounts balances
function getAllBalances(){
for (index in eth.accounts){
console.log(index + ' ' + eth.accounts[index] + ' ' + web3.fromWei(eth.getBalance(eth.accounts[index])));
}
}
// to see all of accounts state
function getState(){
console.log("About ether");
@TOMOAKI12345
TOMOAKI12345 / gist:d9275f5f2e067e125192
Last active August 29, 2015 14:27
fdtrack continue to do starting loop
$ build/bin/geth console
I0821 07:36:52.692526 52529 database.go:74] Alloted 16MB cache to /Users/tomoaki/Library/Ethereum/blockchain
I0821 07:36:52.697946 52529 database.go:74] Alloted 16MB cache to /Users/tomoaki/Library/Ethereum/state
I0821 07:36:52.704361 52529 database.go:74] Alloted 16MB cache to /Users/tomoaki/Library/Ethereum/extra
I0821 07:36:52.707193 52529 backend.go:291] Protocol Versions: [61 60], Network Id: 1
I0821 07:36:52.708534 52529 backend.go:328] Blockchain DB Version: 3
I0821 07:36:52.711741 52529 chain_manager.go:241] Last block (#80898) 2dc873f45d85d0cf14552e0f976071b34f817b3fc0ad80f8bc0061adbd673733 TD=107893388065006012
I0821 07:36:52.804145 52529 cmd.go:124] Starting Geth/v1.0.2-a0303ff4/darwin/go1.4.2
I0821 07:36:52.804450 52529 server.go:312] Starting Server
I0821 07:36:54.837336 52529 udp.go:207] Listening, enode://76aa6d0570fc7b698b57d2b25d43256d849501bbc72cdd817f89181140cde6081dd482106610f9ef6a4513b57092fcea7a5cf9d2c2cfbf14b3e18edf8addbbbe@49.135.72.235:3030
@TOMOAKI12345
TOMOAKI12345 / gist:9ae5c7068b3a84c5bd5d
Last active August 29, 2015 14:27
check fingerprint on mac
// OSX enviroment
ssh-keygen -lf ~/.ssh/{private_key}
> ~/.ssh/config
Host github.com
User git
Hostname github.com
IdentityFile /Users/{username}/.ssh/{private}
@TOMOAKI12345
TOMOAKI12345 / readme.md
Last active August 29, 2015 14:27
npm private module install from github private repo
vim ~/.netrx
machine github.com
  login TOMOAKI12345
  password {oauth_token}

// npm private module installation with writing at package.json 
npm install git+https://github.com/TOMOAKI12345/{private_repo} --save
This file has been truncated, but you can view the full file.
{
"nonce": "0x0000000000000042",
"difficulty": "0x400000000",
"alloc": {
"3282791d6fd713f1e94f4bfd565eaa78b3a0599d": {
"balance": "1337000000000000000000"
},
"17961d633bcf20a7b029a7d94b7df4da2ec5427f": {
"balance": "229427000000000000000"
},
@TOMOAKI12345
TOMOAKI12345 / gist:73e9f140e8449add16ff
Last active December 8, 2015 23:52
private chain geth1.x
// after geth1.x installed.
mkdir /tmp/eth/70
geth console
personal.newAccount('password')
eth.accounts[0]
// you can check the eth.accounts[0] address, copy it and memo to somewhere
// control + c then escape from geth console.
// next make the private net genesisblock json file.
vim privatenet_genesis_block.json