Skip to content

Instantly share code, notes, and snippets.

# Raw transaction API example work-through
# Send coins to a 2-of-3 multisig, then spend them.
#
# For this example, I'm using these three keypairs (public/private)
# 0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86 / 5JaTXbAUmfPYZFRwrYaALK48fN6sFJp4rHqq2QSXs8ucfpE4yQU
# 04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a986818a7cb624532f062c1d1f8722084861c5c3291ccffef4ec6874 / 5Jb7fCeh1Wtm4yBBg3q3XbT6B525i17kVhy3vMC9AqfR6FH2qGk
# 048d2455d2403e08708fc1f556002f1b6cd83f992d085097f9974ab08a28838f07896fbab08f39495e15fa6fad6edbfb1e754e35fa1c7844c41f322a1863d46213 / 5JFjmGo5Fww9p8gvx48qBYDJNAzR9pmH5S389axMtDyPT8ddqmw
# First: combine the three keys into a multisig address:
./bitcoind createmultisig 2 '["0491bba2510912a5bd37da1fb5b1673010e43d2c6d812c514e91bfa9f2eb129e1c183329db55bd868e209aac2fbc02cb33d98fe74bf23f0c235d6126b1d8334f86","04865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac09ef122b1a9
@zilveer
zilveer / snakeEyes.js
Created April 30, 2017 23:18 — forked from damianesteban/snakeEyes.js
Dice Game in JavaScript
function rollSingleDice()
{
return Math.floor(Math.random()*6+1);
}
//Make the rollDice function roll dice,
//check for doubles, and return the
//total score achieved by all rolls
function rollDice(player) {
var score = 0;
@zilveer
zilveer / partial_msig_verify.py
Created August 4, 2017 08:29 — forked from badmofo/partial_msig_verify.py
p2sh multisig verification test script
from pybitcointools import * # available via pip or https://github.com/vbuterin/pybitcointools
from json import dumps
# the tx you sent us
tx_hex = '0100000001f78c40e4a68a6efaea83dcc954550b0dc08b91c372d749cc0ba17934a6d618d801000000b40047304402206d805c798a0b0ae348332284435f4139aeed4935eb4c1322e8bce7d0d3e57efa0220303e13fa08326fa38143471a121cfb4bece404e1565340888587fb8f69914348814c69522103d6ab84e05bd2a9b36e09f08c43ff46358c0ef9f7bdd52ce6f6c1571de760ef852103c945afbe43b21fc864d933f498f362b682515753e9f89f71252ecb6088cc7a332103c14ed38495f194749c728ff3535f1e0286501d44735de87047ed5ef696ad1f4153aeffffffff0250c30000000000001976a914642421cbce0ac31e039ddead2207dfedd04443e488ac30750000000000001976a914c0f3ddcb9c495085252cccbd1b3e2e42d8907d0f88ac00000000'
# example: a 2 of 2 with a valid sig
#tx_hex = '01000000016dbce51ca14b5027bc714baed5bfd9218f30a83e8ef5df52cf8d530bd4627cce01000000910047304402200358faad7809a3571c36a4b18c5c47d9b28a42439d4e149725d8799e7993bf6d022073d2702eded20c9441d770b9a14a2d2b351e962f06c9a260c8fa87622af2c
@zilveer
zilveer / file0.txt
Created August 27, 2017 13:51 — forked from jhURJQVxkx/file0.txt
CentOS7にheroku toolbeltをインストール ref: http://qiita.com/kaishero/items/777323c4ec8f9fd425f9
$ sudo wget -qO- https://toolbelt.heroku.com/install.sh | sh
$ echo 'PATH="/usr/local/heroku/bin:$PATH"' >> .bash_profile
$ source .bash_profile
$ heroku version
$ heroku login
Enter your Heroku credentials.
Email: メールアドレス
Password (typing will be hidden): パスワード
@zilveer
zilveer / bind_connect.py
Created September 2, 2017 15:25 — forked from leonjza/bind_connect.py
Python Netcat Shell Connect
#!/usr/bin/python
host = "127.0.0.1"
port = 4444
# try and connect to a bind shell
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
@zilveer
zilveer / HTML5.localStorage.js
Created September 15, 2017 07:16 — forked from chappy84/HTML5.localStorage.js
HTML5 Storage without the restrictions on storing objects
if (typeof HTML5 == 'undefined') {
var HTML5 = {};
}
/**
* Wrapper class to deal with easily storing values in local storage
* without having to constantly use JSON.parse and JSON.stringify everywhere
* you want to save an object.
*
* @param {String} index the base index to use in the localStorage global object
* @author Tom Chapman
@zilveer
zilveer / LocalStorage.js
Created September 15, 2017 07:17 — forked from picode7/LocalStorage.js
LocalStorage JavaScript Module
/**
* Check if localStorage is supported const isSupported: boolean
* Check if localStorage has an Item function hasItem(key: string): boolean
* Get the amount of space left in localStorage function getRemainingSpace(): number
* Get the maximum amount of space in localStorage function getMaximumSpace(): number
* Get the used space in localStorage function getUsedSpace(): number
* Backup Assosiative Array interface Backup
* Get a Backup of localStorage function getBackup(): Backup
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true)
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false)
@zilveer
zilveer / LocalStorage.js
Created September 15, 2017 07:17 — forked from anonymous/LocalStorage.js
LocalStorage JavaScript Module
/**
* Check if localStorage is supported const isSupported: boolean
* Check if localStorage has an Item function hasItem(key: string): boolean
* Get the amount of space left in localStorage function getRemainingSpace(): number
* Get the maximum amount of space in localStorage function getMaximumSpace(): number
* Get the used space in localStorage function getUsedSpace(): number
* Backup Assosiative Array interface Backup
* Get a Backup of localStorage function getBackup(): Backup
* Apply a Backup to localStorage function applyBackup(backup: Backup, fClear: boolean = true, fOverwriteExisting: boolean = true)
* Dump all information of localStorage in the console function consoleInfo(fShowMaximumSize: boolean = false)
@zilveer
zilveer / keystone_roles_permissions.md
Created October 6, 2017 23:11 — forked from webteckie/keystone_roles_permissions.md
Keystone Roles and Permissions

Keystone Roles & Permissions Support

The following documents the user permission support in keystone based on the support being added via PR #2111. Permissions are based on roles. If a user has a role and the list also specifies that role for any of its CRUD operations then it is permissive for the user to perform whichever CRUD operation matches the role. All users must define, at least, one role. The following are guidelines for adding role/permission support to your application:

Define a Role List Model:

Node / Iquidus Explorer Setup for Dummies
Pulse Crypto is used in this example.
This Tutorial is going to create a Daemon (node) and install Explorer.
THIS IS NOT GOING TO CREATE A GUI CLIENT.
Follow the instructions in [whatever coin name] docs folder Unix build - some builds are different.
I setup this up on both Ubuntu 15.10 and 16.04 with no issues.
You can create an account on vultr and get $50 free to be used in 2 months.