Skip to content

Instantly share code, notes, and snippets.

View gagnec's full-sized avatar

Chris Gagne gagnec

View GitHub Profile
@gagnec
gagnec / gist:4125587
Created November 21, 2012 15:51
Worst Amazon shipment ever courtesy of Canada Post
Date Time Location Event Details
Nov 21 2012 05:42:00 AM CA Departure Scan
Nov 20 2012 11:11:00 PM CA Departure Scan
Nov 20 2012 11:01:00 PM CA Arrival Scan
Nov 20 2012 09:06:00 AM CA Departure Scan
Nov 16 2012 07:12:00 PM CA Arrival Scan
Nov 16 2012 09:47:00 AM NEPEAN ON CA Shipment forwarded to a different delivery address
Nov 16 2012 09:43:00 AM NEPEAN ON CA Out for delivery
Nov 16 2012 06:46:00 AM NEPEAN ON CA Departure Scan
Nov 14 2012 08:58:00 PM OTTAWA ON CA Arrival Scan
@gagnec
gagnec / gist:5527757
Created May 6, 2013 20:07
Sample code for a blocking amqp fanout exchange producer using Pika.
#!/usr/bin/env python
import pika
class IncrementProducer(object):
"""
A simple RabbitMQ producer that repeatedly sends an incrementing number to
the specified exchange. It blocks until interrupted by the user or
the process is terminated.
@gagnec
gagnec / gist:5542288
Created May 8, 2013 18:05
Pika async consumer example
#!/usr/bin/env python26
import logging
import pika
logging.basicConfig()
class Consumer(object):
"""
A RabbitMQ topic exchange consumer that will call the specified function