Published as BIP 103
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 privateKeys = []; | |
| var publicKeys = []; | |
| var privKeysStr = []; | |
| for (var i = 0; i < 3; i++) { | |
| var privateKey = new bitcore.PrivateKey(); | |
| privKeysStr.push(privateKey.toString()); | |
| privateKeys.push(privateKey); | |
| } |
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 | |
| import hashlib | |
| import hmac | |
| import time | |
| import requests | |
| import datetime | |
| # Q. Do you have A Websocket API? | |
| # A. Yes, and we strongly recommend you to use it. Please, check our JavaScript websocket implementation for our WebSocket API here: | |
| # https://github.com/blinktrade/frontend/blob/master/jsdev/bitex/api/bitex.js |
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
| // Copie e cole este codigo no campo console do seu firefox | |
| window.username = '---'; | |
| function nameClicked(event){ | |
| window.username = event.target.textContent; | |
| } | |
| function highlightName(){ | |
| let s = new RegExp(window.username); | |
| for (e of $$(".order-book-username")){ |
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 'Nokogiri' | |
| require 'open-uri' | |
| @doc = Nokogiri::HTML(open('http://www.vivotransfer.com/')) | |
| @content = @doc.xpath('//p[@class = "valor"]').text | |
| puts @content # => *R$ 5.550 | |
| puts @content.scan(/\d/).join # => 5550 |
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
| # also have a look at the nice Takecharge Server: https://github.com/controlshift/prague-server and its BOP70 implementation this is based on | |
| class PaymentRequest | |
| def initialize(options) | |
| @options = options | |
| output = create_output | |
| details = create_payment_details(output) | |
| @payment_request = Payments::PaymentRequest.new |
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 os = require('os'); | |
| var util = require('util'); | |
| var Promise = require('promise'); | |
| var WebSocketClient = require('websocket').w3cwebsocket; | |
| var macaddress = require('macaddress'); | |
| var dgram = require('dgram'); | |
| var ip = require('ip'); | |
| /** |
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
| [ | |
| "ed1d0e1f743a7d19aa2dfb0162df73bacdbc699f67cc55bb91a98c35f7deac69", | |
| "fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f", | |
| "e668a111aa647e63ef587c17fb0e2513d5c2859cd8d389563c7640ffea1fc216", | |
| "1bbb8324577ac089607e45813bac499ebdab4621d029f8c02b2c82b4410fd3f4", | |
| "51535ad9f0e13a810f73ea8829a79b3733bd1fffb767c4885990b02f59103a13", | |
| "2508ed2c2ab3f6728a880fafbc0895a2afeacbb74eb69847255fb60564af0d85", | |
| "3707f1efc7515524dce41d3bf50bfd9fdaed3494620b5f94fcf16d2766da4ec2", | |
| "dbab9040bc1f0c436b0f92f517702498358edc1fde2c7884d0e1036c739d44f3", | |
| "ad5aab5be883a571ea37b231cd996d37522e77d0f121cedfd6787b91d848268e", |
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
| /* Cloudflare Worker Script */ | |
| import NostrEmitter from './emitter.js' | |
| const delay = (ms = 1000) => new Promise((r, _) => setTimeout(r, ms)) | |
| export default { | |
| async fetch(request) { | |
| let cache | |
| const emitter = new NostrEmitter() |
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
| const {nip19, generatePrivateKey, getPublicKey} = require('nostr-tools'); | |
| let found = false; | |
| let counter = 0; | |
| while(!found){ | |
| counter++; | |
| if(counter%100000 == 0){ | |
| console.log('Reached iteration #' + counter.toLocaleString()); | |
| } |