This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Quick python script to send a single message to the PAIR socket | |
# this will crash the device | |
import zmq | |
ctx = zmq.Context() | |
s = ctx.socket(zmq.PAIR) | |
s.connect('tcp://127.0.0.1:5555') | |
s.send('invalid') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""Script to connect req/rep pair, close them, then try to send/recv. | |
This should raise ENOTSUP, but sometimes did not in zeromq < 2.0.10.""" | |
import zmq | |
ctx = zmq.Context() | |
def create_bound_pair(ta, tb): | |
a = ctx.socket(ta) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
zmq_cli - 0MQ Server interruptability test case, client module. | |
""" | |
import zmq | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""A simply script to scrape zmq.h and zmq/core/czmq.pxd for constants, | |
and compare the two. This can be used to check for updates to zmq.h | |
that pyzmq may not yet match. | |
""" | |
from __future__ import with_statement | |
import os | |
import sys |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:function ss_to_sftp(){ | |
var host=document.location.host; | |
var path=document.location.hash; | |
if (host!='www.strongspace.com'){ | |
alert('You do not appear to be at strongspace!'); | |
return; | |
} | |
var m=path.match(/^#\w+/i); | |
if (m==null){ | |
alert('you do not appear to be viewing a file'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Two(object): | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
def __add__(self, b): | |
return Sum(self, b) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
info(){ | |
echo "****************************************" | |
echo "INFO: $@" | |
} | |
fail(){ | |
echo "****************************************" | |
echo "FAILED: $@" | |
exit -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name UnGawker | |
// @namespace net.minrk.ungawker | |
// @description Automatically view all Gawker articles via Instapaper | |
// @include http://*deadspin.com/* | |
// @include http://*gawker.com/* | |
// @include http://*gizmodo.com/* | |
// @include http://*io9.com/* | |
// @include http://*jalopnik.com/* | |
// @include http://*jezebel.com/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Hello World client in Python | |
# Connects REQ socket to tcp://localhost:5555 | |
# Sends "Hello" to server, expects "World" back | |
# | |
import zmq | |
context = zmq.Context() | |
# Socket to talk to server |
OlderNewer