Skip to content

Instantly share code, notes, and snippets.

View Anderson-Juhasc's full-sized avatar
:octocat:
Looking for work

Anderson Juhasc Anderson-Juhasc

:octocat:
Looking for work
View GitHub Profile
@rjmacarthy
rjmacarthy / 2of3.js
Last active August 29, 2015 14:19
Bitcoin 2 of 3 Multisig Address Node.js
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);
}
@sipa
sipa / blocksize.mediawiki
Last active September 22, 2023 08:22
Block size according to technological growth.

Published as BIP 103

#!/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
@fczuardi
fczuardi / foxbit-highlight.js
Created September 15, 2015 22:49
Foxbit click to highlight
// 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")){
@cesardeazevedo
cesardeazevedo / vivo.rb
Created November 10, 2015 21:46
vivotransfer value
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
@bumi
bumi / payment_request.rb
Last active May 9, 2019 02:10
example client/wallet code for the Bitcoin Payment Protocol BIP70 - https://github.com/bumi/bip70-example
# 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
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');
/**
[
"ed1d0e1f743a7d19aa2dfb0162df73bacdbc699f67cc55bb91a98c35f7deac69",
"fd3fdb0d0d8d6f9a7667b53211de8ae3c5246b79bdaf64ebac849d5148b5615f",
"e668a111aa647e63ef587c17fb0e2513d5c2859cd8d389563c7640ffea1fc216",
"1bbb8324577ac089607e45813bac499ebdab4621d029f8c02b2c82b4410fd3f4",
"51535ad9f0e13a810f73ea8829a79b3733bd1fffb767c4885990b02f59103a13",
"2508ed2c2ab3f6728a880fafbc0895a2afeacbb74eb69847255fb60564af0d85",
"3707f1efc7515524dce41d3bf50bfd9fdaed3494620b5f94fcf16d2766da4ec2",
"dbab9040bc1f0c436b0f92f517702498358edc1fde2c7884d0e1036c739d44f3",
"ad5aab5be883a571ea37b231cd996d37522e77d0f121cedfd6787b91d848268e",
@cmdruid
cmdruid / cloudflare-worker.js
Last active September 5, 2024 13:59
Import a (modified) NostrEmitter into a Cloudlfare Worker
/* 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()
@earthchie
earthchie / NostrKeyFinder.js
Last active September 5, 2024 14:54
find a nip19 key with specific prefix for using on Nostr
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());
}