Skip to content

Instantly share code, notes, and snippets.

🧜 Merperson

Nikhil M niksmac

🧜 Merperson
Block or report user

Report or block niksmac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
niksmac /
Last active Jan 7, 2018
IBM Support team is not responding for 5 days

Invoice of $4186

What i was running

  • 1 CF App (512MB)
  • CF Blockchain (1 Peer, 2 CA and 3 Orderer) Which is considered as minimal

For how long

I was running this for 3 months now, last time i got an invoice of $1532

Support team is not responding for 5 days

View rankby.txt
niksmac / Donation.sol
Created Jun 17, 2017 — forked from fabdarice/Donation.sol
Relay contract that contains only one state variable 'user_amounts' - Link first to Donation contract, then update to DonationNew to add the cancelDonation function.
View Donation.sol
contract Donation {
mapping (address => uint) user_amounts;
/* DOES THIS METHODS MODIFY user_amounts of the Relay contract ??? */
function sendDonation(uint n) {
user_amounts[msg.sender] = user_amounts[msg.sender] + n
View genesis.json
"nonce": "0x0000000000000042",
"difficulty": "0x400000000",
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x322ba94575eae5dc36efa11d35923c53e75a425e",
"timestamp": "0x00",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
"gasLimit": "0x1388",
"alloc": {}
View ethereum-account-scanner.js
* Ethereum Account Scanner
* To run this, you need your own geth node, accepting RPC
* connections on a port you can access.
* Install pre-requisites:
* sudo npm install -g web3
* Usage:
niksmac /
Created Mar 7, 2017
ZMV-Examples (require autoload zmv)

rename a section of a filename, i. e. example.1.{txt,conf,db} or 12345.1.{wav,ogg,mp3} and

change the 1 to a 2 in the filename while preserving the rest of it.

$ zmv -n '(.)(<->)(.[^.]#)' '$1$(($2+1))$3' # would rename x.0001.y to x.2.y. $ zmv -n '(.0#)(<->)(.[^.]#)' '$1$(($2+1))$3'

Rename files to lower case

$ zmv '*' '${(L)f}'

serially all files ( >, >, ..)

$ autoload zmv

niksmac /
Last active Dec 28, 2017
Fixing npm permissions
#!/usr/bin/env bash
set -e
echo ''
info () {
printf "\r [ \033[00;34m..\033[0m ] $1\n"
View upgradeable.sol
* Base contract that all upgradeable contracts should use.
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
niksmac /
Last active Aug 21, 2018
Avoiding the pointless blockchain project

How to determine if you’ve found a real blockchain use case

Blockchains are overhyped. There, I said it. From Sibos to Money20/20 to cover stories of The Economist and Euromoney, everyone seems to be climbing aboard the blockchain wagon. And no doubt like others in the space, we’re seeing a rapidly increasing number of companies building proofs of concept on our platform and/or asking for our help.

As a young startup, you’d think we’d be over the moon. Surely now is the time to raise a ton of money and build that high performance next generation blockchain platform we’ve already designed. What on earth are we waiting for? censorship

I’ll tell you what. We’re waiting to gain a clearer understanding of where blockchains genuinely add value in enterprise IT. You see, a large proportion of these incoming projects have nothing to do with blockchains at all. Here’s how it plays out. Big company hears that blockchains are the next big thing. Big company finds some people internally who are interested in the su

You can’t perform that action at this time.