Skip to content

Instantly share code, notes, and snippets.

View travlr's full-sized avatar

Peter Alexander travlr

View GitHub Profile
@travlr
travlr / keybase.md
Created September 10, 2019 02:06
kebase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@travlr
travlr / fcc-prizes.csv
Last active June 10, 2019 16:33
Record of all FCC prize transactions
name email prize badgr-slug num-points timestamp
char* string = "THIS IS A FUCKING TEST!";
int rc;
zmq_msg_t m;
zmq_msg_init_size (&m, strlen (string));
memcpy (zmq_msg_data (&m), string, strlen (string));
rc = zmq_send (m_socket, &m, 0);
fprintf(stdout, "RC: %d", rc);
@travlr
travlr / python signals example 1
Created July 18, 2010 00:45
From: Introduction to python decorators -- http://www.linux-mag.com/id/5377
import logging, random, signal
logging.basicConfig(level=logging.DEBUG,
format="%(levelname)s %(asctime)s %(message)s")
class TimeoutException(Exception):
"Indicates that the function has taken too long."
pass
def handle_alarm(*args):