Skip to content

Instantly share code, notes, and snippets.

View killerstorm's full-sized avatar

Alex Mizrahi killerstorm

View GitHub Profile
183 0.5 10 20
253 0.5 7 14
67 1 11 11
298 1 10 10
97 1 8 8
310 3 22 7.3333333333
247 2 13 6.5
221 3 16 5.3333333333
302 3 16 5.3333333333
161 1 5 5
(eval-when (:compile-toplevel :load-toplevel :execute)
(setf (ext:package-lock :ext) nil))
(defun non-alphanumericp (ch)
(not (alphanumericp ch)))
(defvar +hex-chars+ "0123456789ABCDEF")
(declaim (type simple-string +hex-chars+))
@killerstorm
killerstorm / gfile.lisp
Created May 29, 2012 09:39
generic files
(defpackage #:gfile (:use #:cl))
(in-package :gfile)
;; I/O API
(defgeneric read-elt (file position))
(defgeneric write-elt (file position elt))
(defgeneric read-elts (file position count)
(:documentation "Read a sequence of elements."))
@killerstorm
killerstorm / jfli-abcl.diff
Created June 12, 2012 10:20
jfli-abcl, Alex's version
--- /home/alex/jfli-abcl-orig/jfli-abcl/jfli-abcl.lisp 2004-11-20 21:03:04.000000000 +0200
+++ jfli-abcl.lisp 2012-06-12 13:39:51.395315872 +0300
@@ -6,6 +6,10 @@
; the terms of this license.
; You must not remove this notice, or any other, from this software.
+; Ported to ABCL by [email protected].
+; Minor ABCL fixes by:
+; A. Vodonosov ([email protected]).
+; Alex Mizrahi ([email protected])
@killerstorm
killerstorm / jfli.diff
Created June 12, 2012 11:10
difference between original jfli-abcl and Ole's version
--- /home/alex/jfli-abcl-orig/jfli-abcl/jfli-abcl.lisp 2004-11-20 21:03:04.000000000 +0200
+++ /home/alex/jfli/jfli.lisp 2012-05-27 19:46:23.955496247 +0300
@@ -6,6 +6,9 @@
; the terms of this license.
; You must not remove this notice, or any other, from this software.
+; Ported to ABCL by [email protected].
+; Minor ABCL fixes by A. Vodonosov ([email protected]).
+; Ripped out CLOS mirror support
@killerstorm
killerstorm / colors.cpp
Created September 27, 2012 12:25
Coin coloring algorithm demo
#include <vector>
#include <iostream>
enum color_t {
COLOR_MIXED = -1,
COLOR_UNKNOWN = -2,
COLOR_DEFAULT = 0,
COLOR_RED = 1,
COLOR_BLUE = 2
};
@killerstorm
killerstorm / gist:3793879
Created September 27, 2012 13:05
coin coloring pseudo-code
// we have three state variables, let's initialize them:
cur_amount = 0; // current amount of inputs
cur_color = COLOR_UNKNOWN; // color of those inputs
ii = inputs.begin(); // inputs iterator
oi = outputs.begin(); //output iterator
for (; oi != outputs.end(); ++oi) { // go through all outputs
want_amount = oi->amount; // amount of output we're matching
// eat inputs if needed
@killerstorm
killerstorm / color.html
Created September 30, 2012 15:46
interactive output coloring demo
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
</head>
<body>
<div id="inputs">
Inputs:<br />
<select><option>---</option><option>Red</option><option>Blue</option><option>Uncolored</option><option>Mixed</option></select><input> <br />
@killerstorm
killerstorm / p2ptrade.js
Created May 17, 2013 17:11
p2ptrade.js
var mockComm = {
postMessage : function (o) { console.log(o);}
};
var mockWallet = {
getSomeAddress : function () {
return "111111111";
}
};
@killerstorm
killerstorm / config.js
Created June 9, 2013 08:26
bitcoinjs-gui config
//
// bitcoinjs-gui server configuration defaults
//
// These settings are used as the defaults for all users connecting to
// this version of the client.
//
// If you don't wish to change a setting, it is recommended that you
// leave it commented out, so the global default will apply, which may
// be updated/improved in the future.
//