Skip to content

Instantly share code, notes, and snippets.

View uniibu's full-sized avatar
🏠
Don't comment bad code - rewrite it

Uni Sayo uniibu

🏠
Don't comment bad code - rewrite it
View GitHub Profile

Usecase - Integrating Monacoin to Coinomi

A simple usecase of a Bitcoin compatible coin integration. Not all coins are created equal, so it is possible that extra work must be done to successfully integrate a new cryptocurrency.

  1. Start the Monacoin daemon and in the monacoin.conf file add the option "txindex=1"
rpcuser=monacoinrpc
rpcpassword=MFfySYp9o9qQi0mYbQmxOdE1pEHVS1DQuhhHssOzkO3
rpcport=8022
@uniibu
uniibu / fastcopy_chaindata.py
Created November 30, 2017 12:51 — forked from laanwj/fastcopy_chaindata.py
Fast local copy of Bitcoin Core blockchain state
#!/usr/bin/python3
# Copyright (c) 2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Fast local copy of Bitcoin Core blockchain state.
This utility hardlinks all but the last block data file (rev and blk),
and hardlinks all .ldb files to the destination. The last data files as well
as the other leveldb data files (such as the log) are copied.
@uniibu
uniibu / async-examples.js
Created May 25, 2017 11:25 — forked from developit/async-examples.js
Async Array utilities in async/await. Now available as an npm package: https://github.com/developit/asyncro
/** Async version of Array.prototype.reduce()
* await reduce(['/foo', '/bar', '/baz'], async (acc, v) => {
* acc[v] = await (await fetch(v)).json();
* return acc;
* }, {});
*/
export async function reduce(arr, fn, val, pure) {
for (let i=0; i<arr.length; i++) {
let v = await fn(val, arr[i], i, arr);
if (pure!==false) val = v;
<?php
/* This file is hereby released to public domain */
require_once(__DIR__ . '/../lib/jsonRPCClient_bitcoin.php');
global $CONFIG;
$CONFIG = array(
'bitcoind_user' => 'change_this',
'bitcoind_pass' => 'change_this',
'bitcoind_port' => 'change_this',
'bitcoind_fee' => 0.0002, // Shoudl be enough for anybody