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
<?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.
*/
@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')
@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')
-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:]
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()