Skip to content

Instantly share code, notes, and snippets.

@ahmedbodi
ahmedbodi / gist:489d6122d8dec524f9f1220ad4138014
Last active September 15, 2019 21:31 — forked from pazdera/gist:1098119
Singleton example in C++
/*
* Example of a singleton design pattern.
* Copyright (C) 2011 Radek Pazdera
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
@ahmedbodi
ahmedbodi / genesis.txt
Created April 24, 2017 11:35 — forked from moh53n/genesis.txt
This code is from "http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin" with some changes for newer versions of Bitcoin. Use this for mine the genesis block for a new coin.
/**
* This code is from "http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin" with some changes for newer versions of Bitcoin.
* Use this for mine the genesis block for a new coin.
* Put this before "consensus.hashGenesisBlock = genesis.GetHash();"
*/
/////////GENESIS MINING///////////////
/*
LogPrintf("Genesis mining started\n");
genesis.nNonce = 0;
consensus.hashGenesisBlock = uint256S("0x001");
echo "Enter directory to run in: "
read dir
echo "Enter new name of coin: "
read name
namelower="$(echo $name | tr '[A-Z]' '[a-z]')"
nameupper="$(echo $name | tr '[a-z]' '[A-Z]')"
nameupperf="$(echo ${name:0:1} | tr '[a-z]' '[A-Z]')${name:1}"
cd $dir