Skip to content

Instantly share code, notes, and snippets.

relentless maker.

Eric Martindale martindale

relentless maker.
Block or report user

Report or block martindale

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
martindale /
Created Feb 27, 2014
General flow for micropayment channels in Bitcoin.
  1. Create a public key (K1). Request a public key from the server (K2).
  2. Create and sign but do not broadcast a transaction (T1) that sets up a payment of (for example) 10 BTC to an output requiring both the server's public key and one of your own to be used. A good way to do this is use OP_CHECKMULTISIG. The value to be used is chosen as an efficiency tradeoff.
  3. Create a refund transaction (T2) that is connected to the output of T1 which sends all the money back to yourself. It has a time lock set for some time in the future, for instance a few hours. Don't sign it, and provide the unsigned transaction to the server. By convention, the output script is "2 K1 K2 2 CHECKMULTISIG"
  4. The server signs T2 using its public key K2 and returns the signature to the client. Note that it has not seen T1 at this point, just the hash (which is in the unsigned T2).
  5. The client verifies the servers signature is correct and aborts if not.
  6. The client signs T1 and passes the signature to the server, which now broadca


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2


View ferengi-plan.txt
# The blog post that started it all:
# Current known FCC address ranges:
# Confirm/locate FCC IP ranges with this:
# In your nginx.conf:
location / {
PyBitcoinMultiCast - A Bitcoin Local Node Discovery Test.
Loosely based on Aaron Cohen's code <>
BTC: 1Bardi4eoUvJomBEtVoxPcP8VK26E3Ayxn
LTC: LcSVL3Mj5VLSDzkwyBjufKemEVMbaC7vfp
DOGE: DKvVt6sapm6NwuWGMrcV3wVhxnrn853NFS
Licenced under The MIT License <>.
martindale /
Last active Aug 29, 2015 Template

Getting Started


One or two paragraph introduction on the objective of this library.

Quick Start

If you are unsure of our project and just want to play around, you can get things set up quickly by:

martindale / Key.prototype.js
Created Jul 31, 2014
getters / setters for keygen
View Key.prototype.js
Key.prototype = {
get public() {
return this._public;
set public(k0) {
this._public = k0.toPublic();
martindale / extract-music.js
Created Aug 18, 2014
extract an array of tracks from a Google Music playlist table
View extract-music.js
var playlist = $('table');
var tracks = [];
playlist.each(function(i , row) {
var $track = $( row );
var title = $( $track.children()[0] ).text();
var artist = $( $track.children()[2] ).text();
tracks.push( artist + ' – ' + title );
martindale / queue-to-playlist.js
Created Sep 13, 2014
add all currently queued tracks to a specific playlist
View queue-to-playlist.js
var username = 'martindale';
var playlistID = '5414c5fadda8bb926e0017e4';
$.getJSON('/playlist.json', function(tracks) { {
return x._id;
}).forEach(function(trackID) {
$.post('/' + username + '/playlists/' + playlistID, {
trackID: trackID
}, function(res) {
git grep -I -P -i '\b(TODO|FIXME|XXX)\b'

The following is a partial annotated bibliography of SNI Mempool, building the case for why Bitcoin will displace all competing currencies, including altcoins, fiat money, and precious metals:

In terms of monetary policy, Bitcoin is the greatest money the world has ever seen.

Unsurprisingly, it has gained substantial popularity, and there is no reason to believe it will not continue to grow.

You can’t perform that action at this time.