Skip to content

Instantly share code, notes, and snippets.

#include <string>
#include <strings.h>
#include <stdint.h>
std::string hexDump( const zmq::message_t & aMessage, num = 0 ) {
// I'm going to build a hex/ascii dump like you've seen so many times before
std::string msg;
std::string ascii;
// get the pointer to the start of the message's payload - and it's size
const char *buff = (const char *)aMessage.data();
import eventlet
from datetime import datetime
from eventlet.green import zmq
from eventlet.hubs import use_hub
use_hub('zeromq')
def transmit():
context = zmq.Context()
@commandodev
commandodev / Automata.hs
Created November 14, 2011 12:00 — forked from petermarks/Automata.hs
Automata
module Automata where
import Prelude hiding (map, head, foldl, take)
import qualified Prelude as P
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as C
import Data.ByteString.Internal (c2w)
import qualified Data.Map as M
import Data.List (sort)
import Data.Tuple
{-
One process starts the master process
Other start do-nothing process
master distributes the work among the other processes
-}
module Main where
import Remote
import Control.Monad