Skip to content

Instantly share code, notes, and snippets.

@cooncesean
cooncesean / base.py
Created January 30, 2014 04:16
Synchronizer configuration.
class BaseSynchronizer(object):
"""
Provides a common interface that subclasses will implement based on the
external API that they are dealing with.
"""
def authenticate(self, *args, **kwargs):
" Authenticate against the external service. "
raise NotImplementedError
def push_data(self, crud_option, content_object):
@cooncesean
cooncesean / signal_handlers.py
Last active August 29, 2015 13:55
Signal handler configuration.
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from models import SomeModel, AnotherModel
@receiver(post_save, sender=SomeModel)
@receiver(post_save, sender=AnotherModel)
def push_object_to_external_services(sender, instance, created, **kwargs):
" Send updates to any bound external services. "
# .... logic to get all of the services this object needs to get sent to ....
@cooncesean
cooncesean / response.xml
Created January 30, 2014 04:47
API Sample Responses
<!-- Exhibitor Content Objects -->
<response>
<exhibitor_list>
<exhibitor>
<exhid>123</exhid>
<exhname>Some Exhibitor</exhname>
</exhibitor>
<exhibitor>
<exhid>456</exhid>
<exhname>Another Exhibitor</exhname>
@cooncesean
cooncesean / synchronizer.py
Created January 30, 2014 05:06
Parsing if/else logic.... not very scalable.
class ServiceSpecificSynchronizer(BaseSynchronizer):
...
def pull_data(self, user, content_type):
" Fetch data from the external service for the user and the specified content_type. "
response = self.client.read(user, content_type)
# Parse based on content type
if isinstance(content_object, SomeModel):
... parse this data like so ...
... create/update content object on our side ...
@cooncesean
cooncesean / create_mys_data.py
Created February 19, 2014 21:00
Adds a number of ToDo's and GearsScheduleItems to a user account on MapYourShow.
import sys
import xmltodict
from suds.client import Client
###### CONFIG #############################################
url = "http://api.mysstaging.com/MYSAgenda.cfc?wsdl" # agenda
client = Client(url)
guid = client.service.ValidateUser("Guidebook", "*8{T=!Rq", "c2e214")

Selecting A Technology Stack

Startups face a number of large challenges and selecting the appropriate technology stack can play a large role in the success of any venture.

My hope is you have a technical lead on your team who can help with this process -- if not, I strongly suggest finding one. It's extremely difficult to start a company (in any industry) without any technical dna built into the fabric of the company.

When picking a stack or set of frameworks to solve the specific needs of your company I would look at two things: momentum and in house experience.

Momentum

Refers to the trajectory that the framework/language/hardware/etc is on.

@cooncesean
cooncesean / JMU Tech Talk.md
Created March 14, 2014 18:59
JMU Tech Talk from Guidebook: 3/14/2014

Intro

My Background

I'm a software developer at Guidebook and I've had about ten years of experience writing code for a number of different organizations.

  1. Larger companies -- started my career at CNET.
  2. Smaller companies -- started my own company with five guys called WhiskeyMedia and we grew it to about 30 people before a successful exit.
  3. Currently at Guidebook, I feel like we're right on the precipice of transitioning from a small start up of 30x people to much larger organization within the next few years -- its something that I am very excited about.

Tee Up

@cooncesean
cooncesean / copy_static_s3_dev.py
Created April 28, 2014 16:29
Copy static files for all public guides from prod to dev.
#!/usr/bin/env python
from django.core.management import setup_environ
import settings
import boto
setup_environ(settings)
from guidebook.models import *
from guidebook.storage.s3sync import uploadFolderToS3, downloadFolderFromS3
import argparse
def copy_s3_files(s3DownloadFolder,localTempFolder,s3UploadFolder,from_bucket='media.guidebook.com',to_bucket='media-dev.guidebook.com'):
@cooncesean
cooncesean / schedule.csv
Created May 22, 2014 00:20
This is a sample csv file if you want test Schedule importing with the optional `email` field for LivePolling Invitation creation.
Session Title Date Time Start Time End Room/Location Schedule Track (Optional) Description (Optional) Email (Optional)
Opening Remarks 4/21/2011 10:00 AM 11:00 AM Main Events Key Event The conference chairman will be kicking off the event with opening remarks. foo@bar.com
Presentation XYZ 4/21/2011 4:00 PM 6:00 PM Room 101 Key Event; Track 1 John Doe will be presenting on XYZ. sean@gmail.com
Presentation ABC 4/21/2011 4:00 PM 6:00 PM Room 103 Key Event; Track 2 Bryan Dawson will be presenting. charles@gmail.com
@cooncesean
cooncesean / index.html
Created June 4, 2014 20:03
Front End Challenge
<html>
<body>
<!-- This is the search input -->
<input type="text" id="search" placeholder="Search For Something..." />
<!-- Results go here -->
<ul id="results" ></ul>
</body>
</html>