Skip to content

Instantly share code, notes, and snippets.

@blueplanet
blueplanet / bitcoind-ubuntu-install
Created June 17, 2020 11:58 — forked from rjmacarthy/bitcoind-ubuntu-install
Install Bitcoind Ubuntu
** Add repository and install bitcoind **
sudo apt-get install build-essential
sudo apt-get install libtool autotools-dev autoconf
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind
mkdir ~/.bitcoin/ && cd ~/.bitcoin/
@blueplanet
blueplanet / file0.txt
Last active September 15, 2018 22:12
EOS の Docker Quickstart に加えて、Account を作成するまでやってみた ref: https://qiita.com/blueplanet/items/62669b69377a031f5271
"Id": "sha256:8926b83923b11e8ea6e6be1c8f96f941fcd7731238273b2bed692b407e37fd3c",
"RepoTags": [
"eosio/eos-dev:latest"
],
"RepoDigests": [
"eosio/eos-dev@sha256:150cab925ca326293a82518bcd7d1a3cbbd5720f7e12f4545c6a616819083ab2"
],
"Parent": "",
"Comment": "",
"Created": "2018-09-12T00:24:34.401119021Z",
@blueplanet
blueplanet / file0.html
Last active June 19, 2018 00:52
iView の Table コンポネントで画像を render する方法 ref: https://qiita.com/blueplanet/items/748d255507cbe79246d1
<template>
<div>
<Table :columns="columns" :data="tokens"></Table>
</div>
</template>
<script>
export default {
data () {
return {
@blueplanet
blueplanet / file0.txt
Created April 18, 2018 00:43
QMK Firmware を使って ErgodoxEZ を設定する ref: https://qiita.com/blueplanet/items/715dc7d9e1bf207fec66
brew tap osx-cross/avr
brew tap PX4/homebrew-px4
brew update
brew install avr-gcc
brew install dfu-programmer
brew install gcc-arm-none-eabi
brew install avrdude
pragma solidity ^0.4.21;
contract EIP20 {
uint256 constant private MAX_UINT256 = 2**256 - 1;
uint256 public totalSupply;
mapping (address => uint256) public balances;
mapping (address => mapping (address => uint256)) public allowed;
string public name; //fancy name: eg Simon Bucks
uint8 public decimals; //How many decimals to show.
string public symbol; //An identifier: eg SBX
@blueplanet
blueplanet / file0.txt
Created February 2, 2018 14:13
スマートコントラクトの定時実行を調べてみた ref: https://qiita.com/blueplanet/items/bb9effd226106dd39344
contract PackedArray {
uint[] public arrays;
function push(uint[] _args) public {
arrays = _args;
}
function remove(uint index) public {
PackedArray(this).pack(arrays, index);
}
@blueplanet
blueplanet / file0.txt
Created December 23, 2017 14:17
イーサリアムの Whisper を使ってみる ref: https://qiita.com/blueplanet/items/6947a04406fa74401457
geth -dev --ws --wsport 8546 --wsaddr 0.0.0.0 --wsorigins "*" --wsapi "eth,web3,shh" console
// 上記コマンドで起動したconsoleで下記を実行して、symKeyの値をメモしておく
> web3.shh.newSymKey()
"6a255cd62f2f9989119a60ea0cac6aa71aba479e99a49cff8a6eade669f1e44e"
>
@blueplanet
blueplanet / file0.txt
Created December 22, 2017 14:42
コントラクトの Event を監視してみる ref: https://qiita.com/blueplanet/items/460f562235019a1bb07d
pragma solidity ^0.4.17;
contract MyToken {
event Deposit(
address indexed _from,
bytes32 indexed _id
);
function deposit(bytes32 _id) public {
// deposit pproc
@blueplanet
blueplanet / file0.txt
Created December 21, 2017 14:28
イーサリアムのスマートコントラクト、ビットコインのような複数署名できる? ref: https://qiita.com/blueplanet/items/1d81302f35e426e81485
pragma solidity ^0.4.17;
contract MultiVoteTransfer {
address[] voterAddresses;
mapping(address => bool) votes;
bool public transfered;
modifier onlyVoter() {
bool isVoter = false;
@blueplanet
blueplanet / file0.txt
Created December 20, 2017 08:26
アップデートできるスマートコントラクトを実装してみました ref: https://qiita.com/blueplanet/items/b639a90b44288eb29c9e
pragma solidity ^0.4.17;
contract InnerContract {
function say() public pure returns (bytes32) {
return "first ver";
}
}
contract MyContract {
address public owner;