Skip to content

Instantly share code, notes, and snippets.

Avatar

Corey O'Brien coreypobrien

View GitHub Profile
@coreypobrien
coreypobrien / imagegen-2.py
Created Jan 17, 2019
Quick and dirty animated svg of cluster upgrade
View imagegen-2.py
import svgwrite
import random
import copy
containerSide = 14
innerMargin = 2
class Node(object):
View add2dm.sh
#!/bin/bash -e
NAME=$1
DM_DIR=~/.docker/machine/machines/$NAME
if [ "$2" != "" ]; then
unzip -qojd add2dm-tmp $2
trap "rm -rf $(pwd)/add2dm-tmp" EXIT
pushd add2dm-tmp > /dev/null
fi
@coreypobrien
coreypobrien / curl.txt
Created Sep 9, 2015
lxc-cid in staging catalog
View curl.txt
{
"adminURL": "https://10.69.177.84:8000/v1",
"id": 777003,
"internalURL": "https://10.69.177.84:8000/v1",
"name": "heat-cfn",
"publicURL": "https://10.69.177.84:8000/v1",
"region": "lxc-cid",
"type": "cloudformation"
},
{
View keybase.md

Keybase proof

I hereby claim:

  • I am coreypobrien on github.
  • I am coreypobrien (https://keybase.io/coreypobrien) on keybase.
  • I have a public key whose fingerprint is 5596 4D87 6437 3E23 60C3 76E3 5521 8AA7 0EC0 F4FE

To claim this, I am signing this object:

View pymysqltest.py
from sqlalchemy import create_engine
from sqlalchemy.pool import SingletonThreadPool
engine = create_engine(
'mysql+pymysql://user3:test@192.237.225.174:443',
poolclass=SingletonThreadPool,
connect_args={'ssl': {'ca': '/Users/core7900/Source/local-scenarios/ca-cert.pem'}}
)
engine.connect().close()
@coreypobrien
coreypobrien / parallel_vows.py
Created Sep 9, 2014
This shows how pyvows parallelism can be broken by time.sleep
View parallel_vows.py
from pyvows import Vows
import time
import gevent
@Vows.batch
class GeneratedTopicParallelTest(Vows.Context):
sources = range(10)
def topic(self):
@coreypobrien
coreypobrien / currentoutput
Created Sep 3, 2014
Better handling of unexpected topic exceptions for pyvows
View currentoutput
============
Vows Results
============
A
B
Error in topic:
integer division or modulo by zero