Skip to content

Instantly share code, notes, and snippets.

View trevorbernard's full-sized avatar

Trevor Bernard trevorbernard

View GitHub Profile
public class Example {
public static void main(String[] args) {
ZContext context = null;
try {
context = new ZContext();
new Application(args).start() // blocking call and will close it's resources when finished
} finally {
try { context.close() } catch( Exception e ) {}
}
}

Keybase proof

I hereby claim:

  • I am trevorbernard on github.
  • I am trevorbernard (https://keybase.io/trevorbernard) on keybase.
  • I have a public key whose fingerprint is 6A2F AF8B B1BC E8CA EBBF 0521 4051 0EB4 F61C 4C9E

To claim this, I am signing this object:

#!/bin/bash
function cleanTempDirectory() {
cd ~/tmp && rm -rf zeromq && mkdir zeromq && cd zeromq
}
function packageForDistribution() {
distrib="$1"
mkdir build_$distrib
cp --link *.tar.gz build_$distrib
'''
An authentication module for pyzmq modelled on zauth from czmq.
The certificates used for CURVE authentication are assumed to be identical to
those generated by czmq.
'''
import glob
import json
import os
@trevorbernard
trevorbernard / clojure.clj
Created July 31, 2013 02:49
Super simple way to send and receive Clojure data over ØMQ
(ns cljzmq-examples.serialization.clojure
(:require [clojure.edn :as edn]
[zeromq.zmq :as zmq]))
(defn send-clj
([socket clj-data]
(send-clj socket clj-data 0))
([socket clj-data flags]
(let [data (-> clj-data
(pr-str)