Skip to content

Instantly share code, notes, and snippets.

@imylomylo
imylomylo / data.json
Created March 29, 2018 23:04 — forked from jdarling/data.json
D3 MindMap
{
"name": "Root",
"children": [
{
"name": "Branch 1",
"children": [
{"name": "Leaf 3"},
{"name": "Leaf 4"}
]
},
@imylomylo
imylomylo / index.html
Created March 30, 2018 00:06 — forked from jdarling/index.html
Reuseable D3 MindMap (left/right tree)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
.node circle {
cursor: pointer;
fill: #fff;
stroke: steelblue;
@imylomylo
imylomylo / regtest1.txt
Created August 6, 2018 15:38
regtest generate 105 blocks, no coins
```
root@4549c288025e:/# /komodo/src/komodod -ac_cc=1 -addressindex=1 -spentindex=1 -ac_supply=100000000 -pubkey=033ace50aedf8df70035b962a805431363a61cc4e69d99d90726a2d48fb195f68c -regtest &
[1] 17
root@4549c288025e:/# running as notary.37 komodopioneers_SH
call komodo_args.(/komodo/src/komodod) NOTARY_PUBKEY.(033ace50aedf8df70035b962a805431363a61cc4e69d99d90726a2d48fb195f68c)
initialized at 1533568984
finished loading blocks
height.0 slowflag.1 possible.0 cmp.0
[] PASSPORT iteration waiting for KOMODO_INITDONE
[] PASSPORT iteration waiting for KOMODO_INITDONE
Using docker-komodo-smartcontracts
git clone https://github.com/imylomylo/docker-komodo-smartcontracts
cd docker-komodo-smartcontracts
sudo docker build -t kmd-cc .
(wait a short while)
sudo docker run -it --mount src=/home/mylo/docker-komodod-smartcontracts/node,target=/root/.komodo,type=bind --mount src=/home/mylo/.zcash-params,target=/root/.zcash-params,type=bind kmd-cc
(get dropped into a shell)
#############################################
TEST KEY
Reason this doesn't work is txindex, addressindex and spentindex were not passed in at command line start or in the config file.
This was working yesterday, here: https://gist.github.com/imylomylo/00f0dc2234d1a65860e0e4ccdd0298e0
Today's komodo.conf is
########################
rpcuser=user
rpcpassword=pass
txindex=1
@imylomylo
imylomylo / tmux.md
Last active April 15, 2019 04:18
workflow for tmux

ssh to host

Session mgmt

  • tmux ls
  • tmux a -t
  • tmux new -s dev
  • ^b n(ext)
  • ^b p(revious)
  • ^b c(reate)
@imylomylo
imylomylo / gist:d363de0a40fc6f56c0ef8d9f681e2f73
Last active October 11, 2018 15:45
RUNcoin Documentation
Example project for documentation samples called RUNcoin in the making so the tech can be cloned/expanded etc.
- manufacturer / app (step counter etc.) tracks movement/exercise/etc.
- pays RUNcoin for activity, e.g. 1 RUNcoin per day > your-goal.
- 0.1 RUNcoin for 1 day goal
- 0.5 RUNcoin bonus for 3 days in a row of goal
- 1 RUNcoin bonus for 5 days out of 7 (a week)
- 2 RUNcoin bonus for 9 out of 14
RUNcoin wallets can store RUNcoin for 60 days and 1% rewarded + reward * earned RUNcoin from running.
Using https://jsonrpcclient.readthedocs.io/en/latest/api.html
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6
sudo apt-get install python3-pip
pip3 install "jsonrpcclient[requests]"
# Start python3
sudo pip3 install peercoin_rpc
python3
>>> from peercoin_rpc import Client
>>> kmdnode = Client(testnet=False, username="user793173901", password="pass07e8702e5982abfee0cf32381716717941bcde8c04dbda147818d26ee94f9737d4", ip="localhost", port="45453")
>>> kmdnode.getinfo()
{'version': 1001550, 'testnet': False, 'rpcport': 45453, 'connections': 3, 'errors': '', 'difficulty': 5103076.631849649, 'reward': 25600000000, 'relayfee': 1e-06, 'keypoololdest': 1538907055, 'paytxfee': 0.0, 'blocks': 36719, 'p2pport': 45452, 'halving': 77777, 'notarizedhash': '0000000000000000000000000000000000000000000000000000000000000000', 'KMDversion': '0.1.1', 'proxy': '', 'notarized': 0, 'balance': 0.0, 'notarizedtxid_height': 'mempool', 'notarizedtxid': '0000000000000000000000000000000000000000000000000000000000000000', 'notarized_confirms': 0, 'timeoffset': 0, 'tiptime': 1537796161, 'KMDnotarized_height': 0, 'longestchain': 36719, 'protocolversion': 170003, 'magic': 397860952, 'prevMoMheight': 0, 'keypoolsize': 101, 'name': 'PIRA
@imylomylo
imylomylo / gist:a5f6e26db56d1c5b028e00429545928d
Created October 19, 2018 07:43
komodo java rpc wrapper
https://github.com/priiduneemre/btcd-cli4j/tree/master/examples/src/main
https://github.com/Polve/JavaBitcoindRpcClient
Start looking into one of those as a starting point