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
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <p>Balance: <span id="balance"></span></p> | |
| </body> |
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
| select txn_summary(data) from txns limit 1; |
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
| $ ruby x.rb | |
| Address: 1FBVmnKtjgA676Xbatqx42dcGzaaPV4BU4 contains 4 transactions. | |
| Address: 17j92xE73rEyexJSB4gwavd2YkpTKZWfAv contains 7 transactions. |
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
| package main | |
| import ( | |
| "testing" | |
| "sync" | |
| "sync/atomic" | |
| ) | |
| type EasyCond struct { | |
| m *sync.Mutex |
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
| /* | |
| Chain's Webhooks system will send an HTTP request | |
| to our app with an event type of 'address-transaction'. | |
| The body of the request will contain Chain's transaction | |
| object. We can use this payload to do whatever we want! | |
| */ | |
| app.post('/', function (req, res) { | |
| if (req.body['event'] == 'address-transaction') { | |
| sendSMS(req.body.transaction) | |
| res.send('OK\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
| var chain = require('chain-node'); | |
| var confidant = function(txid, retries, cb) { | |
| chain.getTransaction(txid, function(err, resp) { | |
| if(resp.propagation_level > 0.9) { | |
| cb(resp.propagation_level); | |
| } else { | |
| if(retries > 60) { | |
| cb(null); | |
| } else { |
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
| require 'aws-sdk' | |
| require 'json' | |
| module SQSW | |
| class SQueue | |
| MissingQueue = Class.new(StandardError) | |
| def initialize(url = nil) | |
| raise(MissingQueue, "Missing queue_url") if url.nil? | |
| @q = find_queue(url) |
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
| var express = require('express'); | |
| var bodyParser = require('body-parser'); | |
| var chain = require('chain-node'); | |
| chain.apiKeyId = 'YOUR-API-KEY-ID'; | |
| chain.apiKeySecret = 'YOUR-API-KEY-SECRET'; | |
| var app = express(); | |
| app.use(bodyParser.json()); | |
| app.post('/', function (req, res) { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <ul id="thashlist"></ul> | |
| </body> | |
| <script type="text/javascript"> | |
| $(function() { |
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
| var util = require('util'); | |
| var bitcoin = require('bitcoinjs-lib'); | |
| var Chain = require('chain-node'); | |
| var chain = new Chain({blockChain: "testnet3"}); | |
| var b = new Buffer("Hello, world."); | |
| var t = new bitcoin.Transaction(); | |
| t.addInput("ca7e12c753bd2a268e6f038509d72f3c44fd24064ed5ef8cde13ec987d495a64", 0); |