This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # https://en.bitcoin.it/wiki/Protocol_documentation#Addresses | |
| import hashlib | |
| import base58 | |
| # ECDSA bitcoin Public Key | |
| pubkey = '0450863ad64a87ae8a2fe83c1af1a8403cb53f53e486d8511dad8a04887e5b23522cd470243453a299fa9e77237716103abc11a1df38855ed6f2ee187e9c582ba6' | |
| # See 'compressed form' at https://en.bitcoin.it/wiki/Protocol_documentation#Signatures | |
| compress_pubkey = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.3) | |
| project(bitcoin) | |
| set(CMAKE_CXX_STANDARD 11) | |
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
| add_custom_target(build-bitcoin ALL | |
| COMMAND ./autogen.sh | |
| COMMAND ./configure | |
| COMMAND $(MAKE) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # instGlobal.sh | |
| echo "instGlobal.sh ...." | |
| echo "install package for GNU global..." | |
| sudo apt-get update | |
| sudo apt-get -y install curl | |
| sudo apt-get -y install wget | |
| sudo apt-get -y install ncurses-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def primes(n): | |
| x = [False] * (n + 1) | |
| for i in xrange(2, n + 1): | |
| if x[i]: continue | |
| yield i | |
| for j in xrange(2 * i, n + 1, i): | |
| x[j] = True | |
| def prime_pairs(n): | |
| ps = list(primes(n)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP TABLE currency; | |
| -- Create table variable | |
| CREATE TABLE currency ( | |
| country VARCHAR(100), | |
| currency VARCHAR(100), | |
| code VARCHAR(100), | |
| symbol VARCHAR(100) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
| sh -c 'echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list' | |
| # Install docker | |
| sudo apt-get update | |
| sudo apt-get purge lxc-docker | |
| sudo apt-get install linux-image-extra-$(uname -r) | |
| sudo apt-get install docker-engine | |
| sudo service docker start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import signal | |
| import sys | |
| start = time.time() | |
| def sigint_handler(signal, frame): | |
| duration = time.gmtime(time.time() - start) | |
| sys.stdout.write(time.strftime('%H:%M:%S', duration) + '\n') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Bitcoin=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){function BigInteger(a,b,c){if(!(this instanceof BigInteger))return new BigInteger(a,b,c);if(a!=null){if("number"==typeof a)this.fromNumber(a,b,c);else if(b==null&&"string"!=typeof a)this.fromString(a,256);else this.fromSt |
NewerOlder