Skip to content

Instantly share code, notes, and snippets.

View weex's full-sized avatar
updated profile 🤔

David Sterry weex

updated profile 🤔
View GitHub Profile
diff --cc goxsh.py
index 62cdea6,590609a..0000000
--- a/goxsh.py
+++ b/goxsh.py
@@@ -165,47 -127,111 +169,138 @@@ class GoxSh(object)
self.__btc_precision = Decimal("0.00000001")
self.__usd_precision = Decimal("0.00001")
self.__usd_re = re.compile(r"^\$(\d*\.?\d+)$")
++<<<<<<< HEAD
+ #self.__mtgox_commission = mtgox.get_commission()
-def base58_check_encode(s, version=0):
+def base58_check_encode(s, version=48):
vs = chr(version) + s
check = dhash(vs)[:4]
return base58_encode_padded(vs + check)
-def base58_check_decode(s, version=0):
+def base58_check_decode(s, version=48):
k = base58_decode_padded(s)
v0, data, check0 = k[0], k[1:-4], k[-4:]
@weex
weex / gist:6435248
Created September 4, 2013 10:24
Generate Bitcoin and Litecoin address from same private key
#!/usr/bin/env python
# Joric/bitcoin-dev, june 2012, public domain
import hashlib
import ctypes
import ctypes.util
import sys
ssl = ctypes.cdll.LoadLibrary (ctypes.util.find_library ('ssl') or 'libeay32')
@weex
weex / gist:6446614
Created September 5, 2013 06:12
Use a Bitcoin privkey to generate a corresponding Litecoin (address, privkey) with the same ECDSA keypair
#!/usr/bin/env python
# Joric/bitcoin-dev, june 2012, public domain
import hashlib
import ctypes
import ctypes.util
import sys
ssl = ctypes.cdll.LoadLibrary (ctypes.util.find_library ('ssl') or 'libeay32')
<?php
/*
@author : David Sterry;
@date : 01.29.2013 ;
@version : 1.0 ;
@mybb : compatibility with MyBB 1.4.x and MyBB 1.6.x ;
@description: This plugin helps you to sell points for bitcoins.
@homepage : http://davidsterry.com/credit_from_coins
@copyright : MyBB License. All rights reserved.
*/
"use strict";
// Dependencies.
var Bitcoin = require('bitcoinjs-lib');
var Buffer = require('buffer');
var generateHdWallet = require('./generateHdWallet');
var constants = require('./constants');
var utils = require('./utils');
@weex
weex / gist:fcf0b3f179c2883927f0
Last active December 8, 2015 09:08
Up Directory Service for Machine-payable Endpoints

Up

A directory service for machine-payable endpoints

Being able to find machine-payable endpoints is essential to building interesting applications both for machine and human consumption. To help with this, I wrote a directory service backed by a crawler and now with a text-based browser front-end.

The best intro is probably to use the endpoint browser. First, it will prompt you for confirmation and purchase the latest directory results for 250 satoshis. Then it will let you curl each endpoint through a menu. Get it from here, unzip the files and start it with:

@weex
weex / coreapi.md
Last active December 18, 2015 16:31

Bitcoin Core API Endpoint

This service provides access to a number of the functions provided by a full node running Bitcoin Core 0.11.2.

Example of getting the current network difficulty:

21 buy —maxprice 99 url http://10.244.34.100:8332/api/getdifficulty

Here's a list of available commands that you can run through this tool. Each one costs 99 sat to run.

[
{
"name": "dns/1",
"url": "http://10.244.249.223:12005/"
},
{
"name": "hashfs/1",
"url": "http://10.244.249.223:8000/"
},
{

Keybase proof

I hereby claim:

  • I am weex on github.
  • I am dsterry (https://keybase.io/dsterry) on keybase.
  • I have a public key whose fingerprint is D981 9683 2341 575F B403 C8CF 8029 A76D 14B2 4807

To claim this, I am signing this object: