Skip to content

Instantly share code, notes, and snippets.

peerman = new PeerManager
network: 'testnet'
peerman.addPeer(new Peer("0.0.0.0", "18333"))
peerman.on "connection", (conn) ->
conn.on "block", (info) ->
console.log "block"
conn.on "tx", (info) ->
console.log "tx"
@Jud
Jud / gist:9492486
Created March 11, 2014 18:53
Verifying Keybase
### Keybase proof
I hereby claim:
* I am Jud on github.
* I am Jud (https://keybase.io/Jud) on keybase.
* I have a public key whose fingerprint is 7210 5A84 31C7 2F2D 84F9 E6A2 B8F5 B8FC 1167 B61E
To claim this, I am signing this object:
@Jud
Jud / gist:3932226
Created October 22, 2012 15:58 — forked from ruckus/gist:2293434
Basic setup of WAL-E for continuous archiving and recovery

WAL-E needs to be installed on all machines, masters and slaves.

How to install WAL-E

Only one machine, the master, writes WAL segments via continuous archiving. The configuration for the master postgresql.conf is:

archive_mode = on
archive_command = 'envdir /etc/wal-e.d/env wal-e wal-push %p'
archive_timeout = 60
@Jud
Jud / gist:3001460
Created June 27, 2012 04:27
Error install valgrind via homebrew
/usr/bin/clang -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -fno-builtin -mmacosx-version-min=10.5 -fno-stack-protector -dynamic -O -g -fno-omit-frame-pointer -fno-strict-aliasing -mno-dynamic-no-pic -fpic -fPIC -fno-builtin -O2 -Wno-long-long -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include -Wno-pointer-sign -fno-stack-protector -dynamic -dynamiclib -all_load -arch x86_64 ../coregrind/libreplacemalloc_toolpreload-amd64-darwin.a -
@Jud
Jud / Price-Time Matching Engine.c
Created June 1, 2012 23:56
Price-Time Matching Engine
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list
@Jud
Jud / sphinx.rb
Created May 24, 2012 14:40 — forked from assimovt/sphinx.rb
Mac homebrew Sphinx 0.9.9 formula
require 'formula'
class Libstemmer < Formula
# upstream is constantly changing the tarball,
# so doing checksum verification here would require
# constant, rapid updates to this formula.
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz'
homepage 'http://snowball.tartarus.org/'
end
if($action == true){
// Run code here
} else {
// else..
}