Skip to content

Instantly share code, notes, and snippets.

./src/zcash-cli listaddressgroupings
[
[
[
"mkpysaVH6nM2jWuFwyp4eaAfpuLUuD5kvW",
0.65300000
]
],
[
[
@bitcartel
bitcartel / scriptPubKey-templates-0-400000.json
Created March 5, 2016 16:17 — forked from FelixWeis/scriptPubKey-templates-0-400000.json
Bitcoin output script types by frequency (P2PK, P2PKH, MULTISIG, P2SH, OP_RETURN, ...)
{
"OP_DUP OP_HASH160 20 OP_EQUALVERIFY OP_CHECKSIG": 319721182,
"OP_HASH160 20 OP_EQUAL": 10083919,
"65 OP_CHECKSIG": 887766,
"OP_RETURN": 288521,
"OP_1 33 33 33 OP_3 OP_CHECKMULTISIG": 224438,
"": 219175,
"OP_1 33 33 OP_2 OP_CHECKMULTISIG": 206415,
"33 OP_CHECKSIG": 101306,
"OP_RETURN 40": 65287,
@bitcartel
bitcartel / gist:96769cf2017e401d2015
Created February 17, 2016 17:22
explorer patch
now = time.time() - EPOCH1970
mempool = abe.store.get_rawmempool(chain)
print "RawMemPool = {}".format(mempool)
recenttx = abe.store.list_transactions(chain, 30) # we only want 'send' category, not 'receive' or 'move'
print "JSON-RPC Recent Tx = {}".format(recenttx)
sorted_mempool = sorted(mempool.items()[:10], key=lambda tup: tup[1]['time'], reverse=True)
print "1. Length of sorted mempool = {}".format(len(sorted_mempool))
if len(sorted_mempool) < 10:
recenttx = filter(lambda x: x['category'] == 'send' and x['confirmations']>-1, recenttx)
# recenttx = [tx for tx in recenttx if tx['category']=='send']
@bitcartel
bitcartel / sendalert.cpp
Created January 14, 2016 20:46 — forked from laanwj/sendalert.cpp
Bitcoin send alert code
/*
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
@bitcartel
bitcartel / hack.sh
Created March 31, 2012 16:03 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@bitcartel
bitcartel / tlc.lua
Created March 28, 2012 15:44 — forked from fjolnir/tlc.lua
LuaJIT ObjC bridge
-- TLC - The Tiny Lua Cocoa bridge
-- Note: Only tested with LuaJit 2 Beta 9 on x86_64 with OS X >=10.7.3 & iPhone 4 with iOS 5
-- Copyright (c) 2012, Fjölnir Ásgeirsson
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@bitcartel
bitcartel / UIImage+Resize.m
Created March 23, 2012 05:15 — forked from erans/UIImage+Resize.m
UIImage+Resize.m Fix for Rotation / Orientation on iOS 5
- (UIImage *)resizedImage:(CGSize)newSize interpolationQuality:(CGInterpolationQuality)quality {
BOOL drawTransposed;
CGAffineTransform transform = CGAffineTransformIdentity;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 5.0) {
// Apprently in iOS 5 the image is already correctly rotated, so we don't need to rotate it manually
drawTransposed = NO;
} else {
switch (self.imageOrientation) {
case UIImageOrientationLeft:
@bitcartel
bitcartel / UIImage+Additions.h
Created March 23, 2012 02:46 — forked from Shilo/UIImage+Additions.h
A UIImage category that will replace or remove colors. This allows multiple colors to be changed on a single image, until it has alpha values.
//
// UIImage+Additions.h
// Sparrow
//
// Created by Shilo White on 10/16/11.
// Copyright 2011 Shilocity Productions. All rights reserved.
//
#define COLOR_PART_RED(color) (((color) >> 16) & 0xff)
#define COLOR_PART_GREEN(color) (((color) >> 8) & 0xff)