Skip to content

Instantly share code, notes, and snippets.

View nklamann's full-sized avatar

Norbert Klamann nklamann

View GitHub Profile
@ralphbean
ralphbean / topics_pub.py
Created September 18, 2012 19:44
pub/sub zeromq testing utils
#!/usr/bin/env python
"""Simple example of publish/subscribe illustrating topics.
Publisher and subscriber can be started in any order, though if publisher
starts first, any messages sent before subscriber starts are lost. More than
one subscriber can listen, and they can listen to different topics.
Topic filtering is done simply on the start of the string, e.g. listening to
's' will catch 'sports...' and 'stocks' while listening to 'w' is enough to
catch 'weather'.
@thoas
thoas / puller.py
Created January 10, 2012 15:04
Migration script from MySQL to PostgreSQL via SQLAlchemy
#!/usr/bin/env python
import getopt
import sys
from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.dialects.mysql.base import TINYINT
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import ProgrammingError
@coordt
coordt / check_for_updates.py
Created April 8, 2011 18:39
Check locally installed packages against one or more package indexes for updates and list them.
#!/usr/bin/env python
"""
Use pip to get a list of local packages to check against one or more package
indexes for updated versions.
"""
import pip
import sys, xmlrpclib
from cStringIO import StringIO
from distutils.version import StrictVersion, LooseVersion
@nathany
nathany / Vagrantfile
Created March 7, 2011 03:19
Vagrant Fabric experiment
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "debian_squeeze_32"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box"
# Assign this VM to a host only network IP, allowing you to access it via the IP.
config.vm.network "33.33.33.10"